mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Added chiseled chitin
This commit is contained in:
parent
034dd107e1
commit
7e0e5cf8c1
10 changed files with 115 additions and 3 deletions
|
@ -0,0 +1,53 @@
|
||||||
|
package com.minelittlepony.unicopia.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockDirectional;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.Mirror;
|
||||||
|
import net.minecraft.util.Rotation;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlockDirected extends BlockDirectional {
|
||||||
|
|
||||||
|
public BlockDirected(Material material, String domain, String name) {
|
||||||
|
super(material);
|
||||||
|
setTranslationKey(name);
|
||||||
|
setRegistryName(domain, name);
|
||||||
|
|
||||||
|
setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState withRotation(IBlockState state, Rotation rot) {
|
||||||
|
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState withMirror(IBlockState state, Mirror mirror) {
|
||||||
|
return state.withProperty(FACING, mirror.mirror(state.getValue(FACING)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
||||||
|
return getDefaultState().withProperty(FACING, facing);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
|
return getDefaultState().withProperty(FACING, EnumFacing.byIndex(meta));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMetaFromState(IBlockState state) {
|
||||||
|
return state.getValue(FACING).getIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockStateContainer createBlockState() {
|
||||||
|
return new BlockStateContainer(this, FACING);
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ import com.minelittlepony.unicopia.block.BlockCloudAnvil;
|
||||||
import com.minelittlepony.unicopia.block.BlockCloudBanister;
|
import com.minelittlepony.unicopia.block.BlockCloudBanister;
|
||||||
import com.minelittlepony.unicopia.block.BlockCloudSlab;
|
import com.minelittlepony.unicopia.block.BlockCloudSlab;
|
||||||
import com.minelittlepony.unicopia.block.BlockCloudStairs;
|
import com.minelittlepony.unicopia.block.BlockCloudStairs;
|
||||||
|
import com.minelittlepony.unicopia.block.BlockDirected;
|
||||||
import com.minelittlepony.unicopia.block.BlockDutchDoor;
|
import com.minelittlepony.unicopia.block.BlockDutchDoor;
|
||||||
import com.minelittlepony.unicopia.block.BlockSugar;
|
import com.minelittlepony.unicopia.block.BlockSugar;
|
||||||
import com.minelittlepony.unicopia.block.BlockTomatoPlant;
|
import com.minelittlepony.unicopia.block.BlockTomatoPlant;
|
||||||
|
@ -31,6 +32,7 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.renderer.color.BlockColors;
|
import net.minecraft.client.renderer.color.BlockColors;
|
||||||
import net.minecraft.client.renderer.color.ItemColors;
|
import net.minecraft.client.renderer.color.ItemColors;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -75,6 +77,11 @@ public class UBlocks {
|
||||||
|
|
||||||
public static final BlockHiveWall hive = new BlockHiveWall(Unicopia.MODID, "hive");
|
public static final BlockHiveWall hive = new BlockHiveWall(Unicopia.MODID, "hive");
|
||||||
public static final BlockChitin chitin = new BlockChitin(Unicopia.MODID, "chitin_block");
|
public static final BlockChitin chitin = new BlockChitin(Unicopia.MODID, "chitin_block");
|
||||||
|
public static final Block chissled_chitin = new BlockDirected(UMaterials.hive, Unicopia.MODID, "chissled_chitin")
|
||||||
|
.setCreativeTab(CreativeTabs.BUILDING_BLOCKS)
|
||||||
|
.setHardness(50)
|
||||||
|
.setResistance(2000);
|
||||||
|
|
||||||
public static final BlockGrowingCuccoon cuccoon = new BlockGrowingCuccoon(Unicopia.MODID, "cuccoon");
|
public static final BlockGrowingCuccoon cuccoon = new BlockGrowingCuccoon(Unicopia.MODID, "cuccoon");
|
||||||
public static final BlockSlimeLayer slime_layer = new BlockSlimeLayer(Unicopia.MODID, "slime_layer");
|
public static final BlockSlimeLayer slime_layer = new BlockSlimeLayer(Unicopia.MODID, "slime_layer");
|
||||||
|
|
||||||
|
@ -97,7 +104,7 @@ public class UBlocks {
|
||||||
packed_cloud_slab, packed_cloud_slab.doubleSlab,
|
packed_cloud_slab, packed_cloud_slab.doubleSlab,
|
||||||
cloud_fence, cloud_banister,
|
cloud_fence, cloud_banister,
|
||||||
mist_door, library_door, bakery_door,
|
mist_door, library_door, bakery_door,
|
||||||
hive, chitin, cuccoon, slime_layer,
|
hive, chitin, chissled_chitin, cuccoon, slime_layer,
|
||||||
anvil, cloud_farmland,
|
anvil, cloud_farmland,
|
||||||
sugar_block, flower_pot,
|
sugar_block, flower_pot,
|
||||||
alfalfa,
|
alfalfa,
|
||||||
|
|
|
@ -109,6 +109,8 @@ public class UItems {
|
||||||
.setRegistryName(Unicopia.MODID, "chitin_shell");
|
.setRegistryName(Unicopia.MODID, "chitin_shell");
|
||||||
public static final Item chitin = new ItemBlock(UBlocks.chitin)
|
public static final Item chitin = new ItemBlock(UBlocks.chitin)
|
||||||
.setRegistryName(Unicopia.MODID, "chitin_block");
|
.setRegistryName(Unicopia.MODID, "chitin_block");
|
||||||
|
public static final Item chissled_chitin = new ItemBlock(UBlocks.chissled_chitin)
|
||||||
|
.setRegistryName(Unicopia.MODID, "chissled_chitin");
|
||||||
public static final Item cuccoon = new ItemBlock(UBlocks.cuccoon)
|
public static final Item cuccoon = new ItemBlock(UBlocks.cuccoon)
|
||||||
.setRegistryName(Unicopia.MODID, "cuccoon");
|
.setRegistryName(Unicopia.MODID, "cuccoon");
|
||||||
public static final Item slime_layer = new UnFuckedItemSnow(UBlocks.slime_layer)
|
public static final Item slime_layer = new UnFuckedItemSnow(UBlocks.slime_layer)
|
||||||
|
@ -249,7 +251,7 @@ public class UItems {
|
||||||
|
|
||||||
cloudsdale_tomato, tomato_seeds, tomato, moss,
|
cloudsdale_tomato, tomato_seeds, tomato, moss,
|
||||||
|
|
||||||
hive, chitin_shell, chitin, cuccoon, slime_layer,
|
hive, chitin_shell, chitin, chissled_chitin, cuccoon, slime_layer,
|
||||||
|
|
||||||
apple_seeds, apple_leaves,
|
apple_seeds, apple_leaves,
|
||||||
|
|
||||||
|
@ -282,7 +284,7 @@ public class UItems {
|
||||||
cereal, sugar_cereal, sugar_block,
|
cereal, sugar_cereal, sugar_block,
|
||||||
tomato_seeds,
|
tomato_seeds,
|
||||||
|
|
||||||
hive, chitin_shell, chitin, cuccoon, slime_layer,
|
hive, chitin_shell, chitin, chissled_chitin, cuccoon, slime_layer,
|
||||||
|
|
||||||
apple_seeds, apple_leaves,
|
apple_seeds, apple_leaves,
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=up": { "model": "unicopia:chissled_chitin" },
|
||||||
|
"facing=down": { "model": "unicopia:chissled_chitin", "x": 180 },
|
||||||
|
"facing=north": { "model": "unicopia:chissled_chitin", "x": 90 },
|
||||||
|
"facing=south": { "model": "unicopia:chissled_chitin", "x": -90 },
|
||||||
|
"facing=east": { "model": "unicopia:chissled_chitin", "x": 90, "y": 90 },
|
||||||
|
"facing=west": { "model": "unicopia:chissled_chitin", "x": 90, "y": -90 }
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ tile.cloud_farmland.name=Tilled Clouds
|
||||||
|
|
||||||
tile.hive.name=Hive Wall
|
tile.hive.name=Hive Wall
|
||||||
tile.chitin_block.name=Chitin Block
|
tile.chitin_block.name=Chitin Block
|
||||||
|
tile.chissled_chitin.name=Chiseled Chitin Block
|
||||||
tile.chitin_shell.name=Chitin Shell
|
tile.chitin_shell.name=Chitin Shell
|
||||||
tile.cuccoon.name=Cocoon
|
tile.cuccoon.name=Cocoon
|
||||||
tile.slime_layer.name=Slime
|
tile.slime_layer.name=Slime
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "unicopia:blocks/chitin_block_covered",
|
||||||
|
"particle": "unicopia:blocks/chitin_block_uncovered",
|
||||||
|
"top": "unicopia:blocks/chitin_block_chissled_full",
|
||||||
|
"side": "unicopia:blocks/chitin_block_chissled_half"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{ "from": [ 0, 0, 0 ],
|
||||||
|
"to": [ 16, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "texture": "#bottom", "cullface": "down" },
|
||||||
|
"up": { "texture": "#top", "cullface": "up" },
|
||||||
|
"north": { "texture": "#side", "cullface": "north" },
|
||||||
|
"south": { "texture": "#side", "cullface": "south" },
|
||||||
|
"west": { "texture": "#side", "cullface": "west" },
|
||||||
|
"east": { "texture": "#side", "cullface": "east" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "unicopia:block/chissled_chitin"
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
|
||||||
|
"pattern": [
|
||||||
|
"##",
|
||||||
|
"##"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"#": [
|
||||||
|
{ "item": "unicopia:chitin_block" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"result": { "item": "unicopia:chissled_chitin", "count": 4 }
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in a new issue