forked from AlmuraDev/mocreaturesdev
-
Notifications
You must be signed in to change notification settings - Fork 4
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
cda2c34
commit 5bd6747
Showing
14 changed files
with
256 additions
and
5 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
57 changes: 57 additions & 0 deletions
57
src/main/java/drzhark/mocreatures/block/MoCBlockDoorWood.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,57 @@ | ||
package drzhark.mocreatures.block; | ||
|
||
import java.util.Random; | ||
|
||
import drzhark.mocreatures.init.MoCBlocks; | ||
import drzhark.mocreatures.init.MoCItems; | ||
import net.minecraft.block.BlockDoor; | ||
import net.minecraft.block.SoundType; | ||
import net.minecraft.block.material.MapColor; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.IBlockAccess; | ||
import net.minecraft.world.World; | ||
|
||
// NOTE: Wooden doors are not flammable in vanilla | ||
public class MoCBlockDoorWood extends BlockDoor { | ||
private final MapColor mapColor; | ||
|
||
public MoCBlockDoorWood(MapColor mapColor) { | ||
super(Material.WOOD); | ||
this.setSoundType(SoundType.WOOD); | ||
this.setHardness(3.0F); | ||
this.setHarvestLevel("axe", 0); | ||
this.mapColor = mapColor; | ||
//this.enableStats = false; | ||
} | ||
|
||
@Override | ||
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { | ||
return new ItemStack(getItemBlock()); | ||
} | ||
|
||
protected Item getItemBlock() { | ||
if (this == MoCBlocks.wyvwoodDoor) { | ||
return MoCItems.wyvwoodDoor; | ||
} | ||
|
||
// If door is not listed here give an oak one instead to prevent issues | ||
else { | ||
return Items.OAK_DOOR; | ||
} | ||
} | ||
|
||
@Override | ||
public Item getItemDropped(IBlockState state, Random rand, int fortune) { | ||
return state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? Items.AIR : getItemBlock(); | ||
} | ||
|
||
@Override | ||
public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos) { | ||
return mapColor; | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package drzhark.mocreatures.item; | ||
|
||
import drzhark.mocreatures.MoCConstants; | ||
import drzhark.mocreatures.MoCreatures; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.item.ItemDoor; | ||
|
||
public class MoCItemDoor extends ItemDoor { | ||
public MoCItemDoor(Block block, String name) { | ||
super(block); | ||
this.setCreativeTab(MoCreatures.tabMoC); | ||
this.setRegistryName(MoCConstants.MOD_ID, name); | ||
this.setTranslationKey(name); | ||
} | ||
} |
149 changes: 149 additions & 0 deletions
149
src/main/resources/assets/mocreatures/blockstates/wyvwood_door.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,149 @@ | ||
{ | ||
"forge_marker": 1, | ||
"defaults": { | ||
"textures": { | ||
"bottom": "mocreatures:blocks/door_wyvwood_lower", | ||
"top": "mocreatures:blocks/door_wyvwood_upper" | ||
} | ||
}, | ||
"variants": { | ||
"normal": [ | ||
{ | ||
"transform": "forge:default-item", | ||
"model": "builtin/generated", | ||
"textures": { | ||
"layer0": "mocreatures:items/door_wyvwood" | ||
} | ||
} | ||
], | ||
"inventory": [ | ||
{ | ||
"transform": "forge:default-item", | ||
"model": "builtin/generated", | ||
"textures": { | ||
"layer0": "mocreatures:items/door_wyvwood" | ||
} | ||
} | ||
], | ||
"facing=east,half=lower,hinge=left,open=false": { | ||
"model": "door_bottom" | ||
}, | ||
"facing=south,half=lower,hinge=left,open=false": { | ||
"model": "door_bottom", | ||
"y": 90 | ||
}, | ||
"facing=west,half=lower,hinge=left,open=false": { | ||
"model": "door_bottom", | ||
"y": 180 | ||
}, | ||
"facing=north,half=lower,hinge=left,open=false": { | ||
"model": "door_bottom", | ||
"y": 270 | ||
}, | ||
"facing=east,half=lower,hinge=right,open=false": { | ||
"model": "door_bottom_rh" | ||
}, | ||
"facing=south,half=lower,hinge=right,open=false": { | ||
"model": "door_bottom_rh", | ||
"y": 90 | ||
}, | ||
"facing=west,half=lower,hinge=right,open=false": { | ||
"model": "door_bottom_rh", | ||
"y": 180 | ||
}, | ||
"facing=north,half=lower,hinge=right,open=false": { | ||
"model": "door_bottom_rh", | ||
"y": 270 | ||
}, | ||
"facing=east,half=lower,hinge=left,open=true": { | ||
"model": "door_bottom_rh", | ||
"y": 90 | ||
}, | ||
"facing=south,half=lower,hinge=left,open=true": { | ||
"model": "door_bottom_rh", | ||
"y": 180 | ||
}, | ||
"facing=west,half=lower,hinge=left,open=true": { | ||
"model": "door_bottom_rh", | ||
"y": 270 | ||
}, | ||
"facing=north,half=lower,hinge=left,open=true": { | ||
"model": "door_bottom_rh" | ||
}, | ||
"facing=east,half=lower,hinge=right,open=true": { | ||
"model": "door_bottom", | ||
"y": 270 | ||
}, | ||
"facing=south,half=lower,hinge=right,open=true": { | ||
"model": "door_bottom" | ||
}, | ||
"facing=west,half=lower,hinge=right,open=true": { | ||
"model": "door_bottom", | ||
"y": 90 | ||
}, | ||
"facing=north,half=lower,hinge=right,open=true": { | ||
"model": "door_bottom", | ||
"y": 180 | ||
}, | ||
"facing=east,half=upper,hinge=left,open=false": { | ||
"model": "door_top" | ||
}, | ||
"facing=south,half=upper,hinge=left,open=false": { | ||
"model": "door_top", | ||
"y": 90 | ||
}, | ||
"facing=west,half=upper,hinge=left,open=false": { | ||
"model": "door_top", | ||
"y": 180 | ||
}, | ||
"facing=north,half=upper,hinge=left,open=false": { | ||
"model": "door_top", | ||
"y": 270 | ||
}, | ||
"facing=east,half=upper,hinge=right,open=false": { | ||
"model": "door_top_rh" | ||
}, | ||
"facing=south,half=upper,hinge=right,open=false": { | ||
"model": "door_top_rh", | ||
"y": 90 | ||
}, | ||
"facing=west,half=upper,hinge=right,open=false": { | ||
"model": "door_top_rh", | ||
"y": 180 | ||
}, | ||
"facing=north,half=upper,hinge=right,open=false": { | ||
"model": "door_top_rh", | ||
"y": 270 | ||
}, | ||
"facing=east,half=upper,hinge=left,open=true": { | ||
"model": "door_top_rh", | ||
"y": 90 | ||
}, | ||
"facing=south,half=upper,hinge=left,open=true": { | ||
"model": "door_top_rh", | ||
"y": 180 | ||
}, | ||
"facing=west,half=upper,hinge=left,open=true": { | ||
"model": "door_top_rh", | ||
"y": 270 | ||
}, | ||
"facing=north,half=upper,hinge=left,open=true": { | ||
"model": "door_top_rh" | ||
}, | ||
"facing=east,half=upper,hinge=right,open=true": { | ||
"model": "door_top", | ||
"y": 270 | ||
}, | ||
"facing=south,half=upper,hinge=right,open=true": { | ||
"model": "door_top" | ||
}, | ||
"facing=west,half=upper,hinge=right,open=true": { | ||
"model": "door_top", | ||
"y": 90 | ||
}, | ||
"facing=north,half=upper,hinge=right,open=true": { | ||
"model": "door_top", | ||
"y": 180 | ||
} | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/main/resources/assets/mocreatures/recipes/wyvwood_door.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,17 @@ | ||
{ | ||
"type": "forge:ore_shaped", | ||
"pattern": [ | ||
"XX", | ||
"XX", | ||
"XX" | ||
], | ||
"key": { | ||
"X": { | ||
"item": "mocreatures:wyvwood_planks" | ||
} | ||
}, | ||
"result": { | ||
"item": "mocreatures:wyvwood_door", | ||
"count": 3 | ||
} | ||
} |
Binary file added
BIN
+374 Bytes
src/main/resources/assets/mocreatures/textures/blocks/door_wyvwood_lower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+427 Bytes
src/main/resources/assets/mocreatures/textures/blocks/door_wyvwood_upper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+208 Bytes
src/main/resources/assets/mocreatures/textures/items/door_wyvwood.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.