-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c15278
commit 9b0a159
Showing
12 changed files
with
116 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
28 changes: 28 additions & 0 deletions
28
resources/assets/enderio/blockstates/blockDarkSteelTrapdoor.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,28 @@ | ||
| { | ||
| "forge_marker": 1, | ||
| "defaults": { | ||
| "textures": { | ||
| "particle": "enderio:blocks/dark_iron_trapdoor", | ||
| "texture": "enderio:blocks/dark_iron_trapdoor" | ||
| } | ||
| }, | ||
| "variants": { | ||
| "facing=north,half=bottom,open=false": { "model": "trapdoor_bottom" }, | ||
| "facing=south,half=bottom,open=false": { "model": "trapdoor_bottom" }, | ||
| "facing=east,half=bottom,open=false": { "model": "trapdoor_bottom" }, | ||
| "facing=west,half=bottom,open=false": { "model": "trapdoor_bottom" }, | ||
| "facing=north,half=top,open=false": { "model": "trapdoor_top" }, | ||
| "facing=south,half=top,open=false": { "model": "trapdoor_top" }, | ||
| "facing=east,half=top,open=false": { "model": "trapdoor_top" }, | ||
| "facing=west,half=top,open=false": { "model": "trapdoor_top" }, | ||
| "facing=north,half=bottom,open=true": { "model": "trapdoor_open" }, | ||
| "facing=south,half=bottom,open=true": { "model": "trapdoor_open", "y": 180 }, | ||
| "facing=east,half=bottom,open=true": { "model": "trapdoor_open", "y": 90 }, | ||
| "facing=west,half=bottom,open=true": { "model": "trapdoor_open", "y": 270 }, | ||
| "facing=north,half=top,open=true": { "model": "trapdoor_open" }, | ||
| "facing=south,half=top,open=true": { "model": "trapdoor_open", "y": 180 }, | ||
| "facing=east,half=top,open=true": { "model": "trapdoor_open", "y": 90 }, | ||
| "facing=west,half=top,open=true": { "model": "trapdoor_open", "y": 270 }, | ||
| "inventory": { "model": "trapdoor_bottom" } | ||
| } | ||
| } |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
|---|---|---|
| @@ -1,10 +1,20 @@ | ||
| package crazypants.enderio; | ||
|
|
||
| import javax.annotation.Nonnull; | ||
| import javax.annotation.Nullable; | ||
|
|
||
| import net.minecraft.block.Block; | ||
| import net.minecraft.item.Item; | ||
|
|
||
| public interface IModObject { | ||
|
|
||
| @Nonnull | ||
| String getUnlocalisedName(); | ||
|
|
||
| @Nullable | ||
| Block getBlock(); | ||
|
|
||
| @Nullable | ||
| Item getItem(); | ||
|
|
||
| } |
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
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
55 changes: 55 additions & 0 deletions
55
src/main/java/crazypants/enderio/block/BlockDarkSteelTrapDoor.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,55 @@ | ||
| package crazypants.enderio.block; | ||
|
|
||
| import crazypants.enderio.EnderIOTab; | ||
| import crazypants.enderio.IModObject; | ||
| import crazypants.enderio.ModObject; | ||
| import crazypants.enderio.render.IHaveRenderers; | ||
| import crazypants.util.ClientUtil; | ||
| import net.minecraft.block.BlockTrapDoor; | ||
| import net.minecraft.block.SoundType; | ||
| import net.minecraft.block.material.Material; | ||
| import net.minecraftforge.fml.common.registry.GameRegistry; | ||
| import net.minecraftforge.fml.relauncher.Side; | ||
| import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
|
||
| public class BlockDarkSteelTrapDoor extends BlockTrapDoor implements IHaveRenderers { | ||
|
|
||
| public static BlockDarkSteelTrapDoor create() { | ||
| BlockDarkSteelTrapDoor res = new BlockDarkSteelTrapDoor(ModObject.blockDarkSteelTrapdoor, Material.IRON, true); | ||
| res.init(); | ||
| return res; | ||
| } | ||
|
|
||
| private final IModObject modObject; | ||
|
|
||
| public BlockDarkSteelTrapDoor(IModObject modObject, Material materialIn, boolean isBlastResistant) { | ||
| super(materialIn); | ||
| this.modObject = modObject; | ||
| if (isBlastResistant) { | ||
| setResistance(2000.0F); // TNT Proof | ||
| } | ||
| if (materialIn == Material.IRON) { | ||
| setHardness(5.0F); | ||
| setSoundType(SoundType.METAL); | ||
| } else { | ||
| setHardness(3.0F); | ||
| setSoundType(SoundType.WOOD); | ||
| } | ||
| disableStats(); | ||
| setUnlocalizedName(modObject.getUnlocalisedName()); | ||
| setRegistryName(modObject.getUnlocalisedName()); | ||
| setCreativeTab(EnderIOTab.tabEnderIO); | ||
| } | ||
|
|
||
| protected void init() { | ||
| GameRegistry.register(this); | ||
| GameRegistry.register(new BlastResistantItemBlock(this, modObject.getUnlocalisedName())); | ||
| } | ||
|
|
||
| @Override | ||
| @SideOnly(Side.CLIENT) | ||
| public void registerRenderers() { | ||
| ClientUtil.registerDefaultItemRenderer(modObject); | ||
| } | ||
|
|
||
| } |
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