Skip to content

Commit

Permalink
Int Commit for HMX Explosive
Browse files Browse the repository at this point in the history
Team-Immersive-Intelligence/ImmersiveIntelligence-Internal#295

Recipe implemented
Blockstate added
Textures added
-Texture only shows up in hand (running into the same issue as the newspaper stand way back when)
  • Loading branch information
Avalon2106 committed Aug 14, 2024
1 parent e8f699e commit 212e48a
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -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<BlockIIHMXDynamite.IIBlockTypes_HMXDynamite> {

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;
}

}



Original file line number Diff line number Diff line change
@@ -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": {

}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 212e48a

Please sign in to comment.