diff --git a/src/main/java/pl/pabilo8/immersiveintelligence/client/ClientProxy.java b/src/main/java/pl/pabilo8/immersiveintelligence/client/ClientProxy.java index be3e1fd22..8b3d48a99 100644 --- a/src/main/java/pl/pabilo8/immersiveintelligence/client/ClientProxy.java +++ b/src/main/java/pl/pabilo8/immersiveintelligence/client/ClientProxy.java @@ -341,6 +341,7 @@ public void preInit() registerEntityRenderer(EntitySkycrateInternal.class, EntityRenderNone::new); registerEntityRenderer(EntityVehicleSeat.class, EntityRenderNone::new); + registerEntityRenderer(EntityAtomicBoom.class, AtomicBoomRenderer::new); registerEntityRenderer(EntityGasCloud.class, EntityRenderNone::new); registerEntityRenderer(EntityFlare.class, EntityRenderNone::new); diff --git a/src/main/java/pl/pabilo8/immersiveintelligence/common/IIContent.java b/src/main/java/pl/pabilo8/immersiveintelligence/common/IIContent.java index 9754725c1..456303905 100644 --- a/src/main/java/pl/pabilo8/immersiveintelligence/common/IIContent.java +++ b/src/main/java/pl/pabilo8/immersiveintelligence/common/IIContent.java @@ -285,6 +285,9 @@ public class IIContent public static final BlockIIDataDevice blockDataConnector = new BlockIIDataDevice(); public static final BlockIISmallCrate blockSmallCrate = new BlockIISmallCrate(); + //explosives + public static final BlockIIHMXDynamite blockHMXDynamite = new BlockIIHMXDynamite(); + //ammunition public static final BlockIIMineSign blockMineSign = new BlockIIMineSign(); public static final BlockIITripmine blockTripmine = new BlockIITripmine(); diff --git a/src/main/java/pl/pabilo8/immersiveintelligence/common/block/simple/BlockIIHMXDynamite.java b/src/main/java/pl/pabilo8/immersiveintelligence/common/block/simple/BlockIIHMXDynamite.java new file mode 100644 index 000000000..059b0136d --- /dev/null +++ b/src/main/java/pl/pabilo8/immersiveintelligence/common/block/simple/BlockIIHMXDynamite.java @@ -0,0 +1,68 @@ +package pl.pabilo8.immersiveintelligence.common.block.simple; + + +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; + +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockRenderLayer; + +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import pl.pabilo8.immersiveintelligence.common.util.IIReference; +import pl.pabilo8.immersiveintelligence.common.util.block.BlockIITileProvider; +import pl.pabilo8.immersiveintelligence.common.util.block.IIBlockInterfaces; +import pl.pabilo8.immersiveintelligence.common.util.block.IIBlockInterfaces.IIBlockEnum; +import pl.pabilo8.immersiveintelligence.common.util.block.IIBlockInterfaces.IIBlockProperties; +import pl.pabilo8.immersiveintelligence.common.util.block.ItemBlockIIBase; +import pl.pabilo8.immersiveintelligence.common.util.item.IICategory; + +import javax.annotation.Nonnull; +import javax.annotation.ParametersAreNonnullByDefault; + + +/** + * @author Pabilo8 + * @since 01.09.2020 + */ +public class BlockIIHMXDynamite extends BlockIITileProvider { + + public BlockIIHMXDynamite() { + super("hmx_dynamite", Material.WOOD, PropertyEnum.create("type", IIBlockTypes_HMXDynamite.class), ItemBlockIIBase::new); + setFullCube(true); + setHardness(3.0F); + setResistance(10.0F); + setCategory(IICategory.WARFARE); + setToolTypes(IIReference.TOOL_WIRECUTTER); + setBlockLayer(BlockRenderLayer.CUTOUT_MIPPED); + setLightOpacity(0); + + } + + public enum IIBlockTypes_HMXDynamite implements IIBlockEnum, IIBlockInterfaces.IITileProviderEnum { + @IIBlockProperties(oreDict = {"explosiveHMX", "explosiveOctogen"}) + MAIN + } + + @Override + @Nonnull + public BlockRenderLayer getBlockLayer() + { + return BlockRenderLayer.CUTOUT_MIPPED; + } + + @Override + @SuppressWarnings("deprecation") + @Nonnull + @ParametersAreNonnullByDefault + public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) + { + return BlockFaceShape.SOLID; + } + +} + + + diff --git a/src/main/resources/assets/immersiveintelligence/blockstates/hmx_dynamite.json b/src/main/resources/assets/immersiveintelligence/blockstates/hmx_dynamite.json new file mode 100644 index 000000000..7b30dd3b4 --- /dev/null +++ b/src/main/resources/assets/immersiveintelligence/blockstates/hmx_dynamite.json @@ -0,0 +1,46 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block", + "textures": { + "top": "immersiveintelligence:blocks/hmx/top", + "bottom": "immersiveintelligence:blocks/hmx/bottom", + "side": "immersiveintelligence:blocks/hmx/side" + }, + "model": "immersiveengineering:ie_pillar" + }, + "variants": { + "inventory,type=main": [ + { + "textures": { + "top": "immersiveintelligence:blocks/hmx/top", + "bottom": "immersiveintelligence:blocks/hmx/bottom", + "side": "immersiveintelligence:blocks/hmx/side" + } + } + ], + "type": { + "main": { + "textures": { + "top": "immersiveintelligence:blocks/hmx/top", + "bottom": "immersiveintelligence:blocks/hmx/bottom", + "side": "immersiveintelligence:blocks/hmx/side" + } + } + }, + "axis": { + "x": { + "x": 90, "y": 90 + }, + "y": { + + }, + "z": { + "x": 90 + }, + "none": { + + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/immersiveintelligence/lang/en_us.lang b/src/main/resources/assets/immersiveintelligence/lang/en_us.lang index 02138c3a5..aa1fe398f 100644 --- a/src/main/resources/assets/immersiveintelligence/lang/en_us.lang +++ b/src/main/resources/assets/immersiveintelligence/lang/en_us.lang @@ -516,6 +516,8 @@ tile.immersiveintelligence.rubber_leaves.rubber.name=Rubber Tree Leaves tile.immersiveintelligence.rubber_sapling.rubber.name=Rubber Tree Sapling tile.immersiveintelligence.charred_log.main.name=Charred Log +tile.immersiveintelligence.hmx_dynamite.name=HMX Dynamite + tile.immersiveintelligence.concrete_decoration.concrete_bricks.name=Concrete Bricks tile.immersiveintelligence.concrete_decoration_slab.concrete_bricks.name=Concrete Bricks Slab tile.immersiveintelligence.concrete_decoration_stairs_concrete_bricks.name=Concrete Bricks Slab diff --git a/src/main/resources/assets/immersiveintelligence/recipes/materials/hmx_dynamite.json b/src/main/resources/assets/immersiveintelligence/recipes/materials/hmx_dynamite.json new file mode 100644 index 000000000..dc0259177 --- /dev/null +++ b/src/main/resources/assets/immersiveintelligence/recipes/materials/hmx_dynamite.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "hhh", + "sts", + "hhh" + ], + "key": { + "h": { + "type": "forge:ore_dict", + "ore": "materialHMX" + }, + "s": { + "type": "forge:ore_dict", + "ore": "plateSteel" + }, + "t": { + "item": "minecraft:tnt" + } + }, + "result": { + "item": "immersiveintelligence:hmx_dynamite", + "data": 0, + "count": 1 + } +} \ No newline at end of file