-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
e8f699e
commit 212e48a
Showing
6 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/main/java/pl/pabilo8/immersiveintelligence/common/block/simple/BlockIIHMXDynamite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} | ||
|
||
|
||
|
46 changes: 46 additions & 0 deletions
46
src/main/resources/assets/immersiveintelligence/blockstates/hmx_dynamite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
|
||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/resources/assets/immersiveintelligence/recipes/materials/hmx_dynamite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |