-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathGTFOBlockCasing.java
More file actions
56 lines (44 loc) · 1.57 KB
/
GTFOBlockCasing.java
File metadata and controls
56 lines (44 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package gregtechfoodoption.block;
import gregtech.api.block.VariantBlock;
import gregtechfoodoption.GTFOValues;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
public class GTFOBlockCasing extends VariantBlock<GTFOBlockCasing.CasingType> {
public GTFOBlockCasing() {
super(Material.IRON);
setTranslationKey("gtfo_casing");
setHardness(5.0f);
setResistance(10.0f);
setSoundType(SoundType.STONE);
setHarvestLevel("wrench", 2);
setCreativeTab(GTFOValues.TAB_GTFO_BLOCKS);
setDefaultState(getState(CasingType.ADOBE_BRICKS));
}
@Override
public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, EntityLiving.SpawnPlacementType type) {
return false;
}
@Override
public IBlockState getState(CasingType variant) {
return super.getState(variant);
}
public enum CasingType implements IStringSerializable {
ADOBE_BRICKS("adobe_bricks"),
REINFORCED_ADOBE_BRICKS("reinforced_adobe_bricks"),
PORCELAIN_TILE("porcelain_tile"),
DARK_PORCELAIN_TILE("dark_porcelain_tile");
private final String name;
CasingType(String name) {
this.name = name;
}
@Override
public String getName() {
return this.name;
}
}
}