-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathGTFOMetalCasing.java
More file actions
63 lines (51 loc) · 1.88 KB
/
Copy pathGTFOMetalCasing.java
File metadata and controls
63 lines (51 loc) · 1.88 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
57
58
59
60
61
62
63
package gregtechfoodoption.block;
import gregtech.api.block.VariantBlock;
import gregtech.api.unification.material.Material;
import gregtech.client.renderer.ICubeRenderer;
import gregtechfoodoption.GTFOValues;
import net.minecraft.block.SoundType;
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;
import static gregtech.api.unification.material.Materials.BismuthBronze;
public class GTFOMetalCasing extends VariantBlock<GTFOMetalCasing.CasingType> {
public GTFOMetalCasing() {
super(net.minecraft.block.material.Material.IRON);
setTranslationKey("gtfo_metal_casing");
setHardness(5.0f);
setResistance(10.0f);
setSoundType(SoundType.METAL);
setHarvestLevel("wrench", 2);
setCreativeTab(GTFOValues.TAB_GTFO_BLOCKS);
setDefaultState(getState(CasingType.BISMUTH_BRONZE_CASING));
}
@Override
public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, EntityLiving.SpawnPlacementType type) {
return false;
}
public enum CasingType implements IStringSerializable {
BISMUTH_BRONZE_CASING("casing_bismuth_bronze", BismuthBronze);
private final String name;
private final Material material;
CasingType(String name, Material material) {
this.name = name;
this.material = material;
}
@Override
public String getName() {
return this.name;
}
public Material getMaterial() {
return this.material;
}
public ICubeRenderer getTexture() {
switch (name) {
default: {
return BISMUTH_BRONZE_CASING.getTexture();
}
}
}
}
}