Stuck on item in slot rendering
This commit is contained in:
@@ -1,7 +1,41 @@
|
|||||||
package nmd.primal.forgecraft;
|
package nmd.primal.forgecraft;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.*;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by kitsu on 11/23/2016.
|
* Created by kitsu on 11/23/2016.
|
||||||
*/
|
*/
|
||||||
public class CommonUtils {
|
public class CommonUtils {
|
||||||
|
|
||||||
|
public static int getVanillaItemBurnTime(ItemStack stack)
|
||||||
|
{
|
||||||
|
if (stack == null)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Item item = stack.getItem();
|
||||||
|
|
||||||
|
if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.AIR)
|
||||||
|
{
|
||||||
|
Block block = Block.getBlockFromItem(item);
|
||||||
|
if (block == Blocks.WOODEN_SLAB) return 150;
|
||||||
|
if (block.getDefaultState().getMaterial() == Material.WOOD) return 300;
|
||||||
|
if (block == Blocks.COAL_BLOCK) return 16000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item instanceof ItemTool && ((ItemTool)item).getToolMaterialName().equals("WOOD")) return 200;
|
||||||
|
if (item instanceof ItemSword && ((ItemSword)item).getToolMaterialName().equals("WOOD")) return 200;
|
||||||
|
if (item instanceof ItemHoe && ((ItemHoe)item).getMaterialName().equals("WOOD")) return 200;
|
||||||
|
if(item == Items.STICK) return 100;
|
||||||
|
if(item == Items.COAL) return 1600;
|
||||||
|
if (item == Item.getItemFromBlock(Blocks.SAPLING)) return 100;
|
||||||
|
if (item == Items.BLAZE_ROD) return 2400;
|
||||||
|
if (item == Items.BLAZE_POWDER) return 800;
|
||||||
|
return GameRegistry.getFuelValue(stack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package nmd.primal.forgecraft.blocks;
|
package nmd.primal.forgecraft.blocks;
|
||||||
|
|
||||||
|
import akka.actor.dsl.Creators;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
@@ -27,6 +28,7 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
import nmd.primal.forgecraft.tiles.TileFirebox;
|
import nmd.primal.forgecraft.tiles.TileFirebox;
|
||||||
|
|
||||||
@@ -39,12 +41,14 @@ public class Firebox extends CustomContainerFacing implements ITileEntityProvide
|
|||||||
|
|
||||||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
||||||
|
|
||||||
|
|
||||||
public Firebox(Material material) {
|
public Firebox(Material material) {
|
||||||
super(material);
|
super(material);
|
||||||
setUnlocalizedName(ModInfo.ForgecraftBlocks.FIREBOX.getUnlocalizedName());
|
setUnlocalizedName(ModInfo.ForgecraftBlocks.FIREBOX.getUnlocalizedName());
|
||||||
setRegistryName(ModInfo.ForgecraftBlocks.FIREBOX.getRegistryName());
|
setRegistryName(ModInfo.ForgecraftBlocks.FIREBOX.getRegistryName());
|
||||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -61,60 +65,86 @@ public class Firebox extends CustomContainerFacing implements ITileEntityProvide
|
|||||||
TileFirebox tile = (TileFirebox) world.getTileEntity(pos);
|
TileFirebox tile = (TileFirebox) world.getTileEntity(pos);
|
||||||
if (tile != null)
|
if (tile != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
ItemStack playerStack = player.getHeldItemMainhand();
|
ItemStack playerStack = player.getHeldItemMainhand();
|
||||||
Item playerItem;
|
Item playerItem;
|
||||||
|
|
||||||
ItemStack tileStack = tile.getStackInSlot(0);
|
ItemStack tileStack = tile.getStackInSlot(0);
|
||||||
|
|
||||||
//System.out.println("Player Stack = " + playerStack);
|
|
||||||
//System.out.println("TileStack = " + tileStack);
|
|
||||||
if(playerStack != null){
|
if(playerStack != null){
|
||||||
playerItem = playerStack.getItem();
|
playerItem = playerStack.getItem();
|
||||||
if (playerItem.equals(Items.FLINT_AND_STEEL)) {
|
if (playerItem.equals(Items.FLINT_AND_STEEL)) {
|
||||||
world.setBlockState(pos, state.withProperty(ACTIVE, Boolean.valueOf(true)), 2);
|
if (CommonUtils.getVanillaItemBurnTime(tileStack) > 0) {
|
||||||
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY()+1, pos.getZ());
|
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
||||||
if(world.getBlockState(tempPos).getBlock().equals(Blocks.AIR)){
|
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY()+1, pos.getZ());
|
||||||
world.setBlockState(tempPos, Blocks.FIRE.getDefaultState(), 3);
|
if(world.getBlockState(tempPos).getBlock().equals(Blocks.AIR)){
|
||||||
|
world.setBlockState(tempPos, Blocks.FIRE.getDefaultState(), 2);
|
||||||
|
this.setLightLevel(1);
|
||||||
|
tile.markDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(tileStack == null && playerStack != null){
|
|
||||||
tile.setInventorySlotContents(0, playerStack);
|
|
||||||
player.setHeldItem(EnumHand.MAIN_HAND, null);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tileStack != null && playerStack == null && player.isSneaking()){
|
if(tileStack != null && playerStack == null && player.isSneaking()){
|
||||||
|
if(state.getValue(ACTIVE)==true){
|
||||||
|
world.setBlockState(pos, state.withProperty(ACTIVE, false), 2);
|
||||||
|
ItemStack returnStack = new ItemStack(tileStack.getItem(), tileStack.stackSize - 1);
|
||||||
|
player.setHeldItem(EnumHand.MAIN_HAND, returnStack);
|
||||||
|
} else {
|
||||||
|
player.setHeldItem(EnumHand.MAIN_HAND, tileStack);
|
||||||
|
}
|
||||||
tile.setInventorySlotContents(0, null);
|
tile.setInventorySlotContents(0, null);
|
||||||
player.setHeldItem(EnumHand.MAIN_HAND, tileStack);
|
tile.markDirty();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(tileStack == null && playerStack != null) {
|
||||||
|
if(CommonUtils.getVanillaItemBurnTime(playerStack) > 0) {
|
||||||
/*
|
playerItem = playerStack.getItem();
|
||||||
if (tile.getStackInSlot(0) == null){
|
if (playerItem != Items.FLINT_AND_STEEL) {
|
||||||
if (player.inventory.getCurrentItem()!=null) {
|
tile.setInventorySlotContents(0, playerStack);
|
||||||
tile.setInventorySlotContents(0, player.inventory.getCurrentItem());
|
player.setHeldItem(EnumHand.MAIN_HAND, null);
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
tile.markDirty();
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tile.getStackInSlot(0) != null){
|
|
||||||
if (player.inventory.getCurrentItem()==null) {
|
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.getStackInSlot(0));
|
|
||||||
tile.setInventorySlotContents(0, null);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
|
{
|
||||||
|
if(state.getValue(ACTIVE) == true){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFireSource(World world, BlockPos pos, EnumFacing side)
|
||||||
|
{
|
||||||
|
if (side == EnumFacing.UP)
|
||||||
|
{
|
||||||
|
if(!world.isRemote){
|
||||||
|
TileFirebox tile = (TileFirebox) world.getTileEntity(pos);
|
||||||
|
if(tile.getStackInSlot(0) != null){
|
||||||
|
if(world.getBlockState(pos).getValue(ACTIVE)==true){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +171,7 @@ public class Firebox extends CustomContainerFacing implements ITileEntityProvide
|
|||||||
@Override
|
@Override
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
|
||||||
IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer);
|
IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer);
|
||||||
return state.withProperty(FACING, placer.getHorizontalFacing());
|
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -149,16 +179,96 @@ public class Firebox extends CustomContainerFacing implements ITileEntityProvide
|
|||||||
if (stack.hasDisplayName()){
|
if (stack.hasDisplayName()){
|
||||||
((TileFirebox) world.getTileEntity(pos)).setCustomName(stack.getDisplayName());
|
((TileFirebox) world.getTileEntity(pos)).setCustomName(stack.getDisplayName());
|
||||||
}
|
}
|
||||||
|
System.out.println(state.getBlock().getMetaFromState(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetaFromState(IBlockState state) {
|
public int getMetaFromState(IBlockState state) {
|
||||||
return state.getValue(FACING).getHorizontalIndex();
|
int i = 0;
|
||||||
|
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == false){
|
||||||
|
i = 0;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == false){
|
||||||
|
i = 1;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == false){
|
||||||
|
i = 2;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == false){
|
||||||
|
i = 3;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == true){
|
||||||
|
i = 4;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == true){
|
||||||
|
i = 5;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == true){
|
||||||
|
i = 6;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == true){
|
||||||
|
i = 7;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta(int meta) {
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
return getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta));
|
EnumFacing enumfacing;
|
||||||
|
Boolean active;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
switch (meta & 7)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
enumfacing = EnumFacing.EAST;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
enumfacing = EnumFacing.WEST;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
enumfacing = EnumFacing.SOUTH;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = false;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
enumfacing = EnumFacing.EAST;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
enumfacing = EnumFacing.WEST;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
enumfacing = EnumFacing.SOUTH;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
enumfacing = EnumFacing.NORTH;
|
||||||
|
active = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(ACTIVE, Boolean.valueOf(active));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
28
src/main/java/nmd/primal/forgecraft/compat/FuelHandler.java
Normal file
28
src/main/java/nmd/primal/forgecraft/compat/FuelHandler.java
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
package nmd.primal.forgecraft.compat;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.common.IFuelHandler;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 12/3/2016.
|
||||||
|
*/
|
||||||
|
//public class FuelHandler implements IFuelHandler {
|
||||||
|
|
||||||
|
/*@Override
|
||||||
|
public int getBurnTime(ItemStack fuelStack)
|
||||||
|
{
|
||||||
|
//if (ModConfig.FEATURE_ENABLE_FUELS) {
|
||||||
|
//CommonUtils.debugLogger(2, "fuel", "size: " + ModRegistries.FUEL_REGISTRY.size() + ", value: " + ModRegistries.FUEL_REGISTRY.get(fuelStack));
|
||||||
|
|
||||||
|
for (Map.Entry<ItemStack, Integer> entry : ForgeCraftRegistries.FUEL_REGISTRY.entrySet())
|
||||||
|
{
|
||||||
|
if (entry.getKey().isItemEqual(fuelStack))
|
||||||
|
return entry.getValue();
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}*/
|
||||||
|
//}
|
||||||
19
src/main/java/nmd/primal/forgecraft/init/ModRegistries.java
Normal file
19
src/main/java/nmd/primal/forgecraft/init/ModRegistries.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package nmd.primal.forgecraft.init;
|
||||||
|
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 12/3/2016.
|
||||||
|
*/
|
||||||
|
public class ModRegistries {
|
||||||
|
|
||||||
|
public static void registerFuels()
|
||||||
|
{
|
||||||
|
//if (ModConfig.FEATURE_ENABLE_FUELS)
|
||||||
|
//{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
package nmd.primal.forgecraft.proxy;
|
package nmd.primal.forgecraft.proxy;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import nmd.primal.forgecraft.init.ModBlocks;
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.renders.TileFireboxRender;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileFirebox;
|
||||||
|
|
||||||
import static nmd.primal.forgecraft.init.ModItems.*;
|
import static nmd.primal.forgecraft.init.ModItems.*;
|
||||||
|
|
||||||
@@ -15,6 +18,13 @@ public class ClientProxy implements CommonProxy {
|
|||||||
|
|
||||||
ModItems.registerRenders();
|
ModItems.registerRenders();
|
||||||
ModBlocks.registerRenders();
|
ModBlocks.registerRenders();
|
||||||
|
this.registerTileRendering();
|
||||||
|
}
|
||||||
|
|
||||||
|
//@Override
|
||||||
|
public void registerTileRendering()
|
||||||
|
{
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileFirebox.class, new TileFireboxRender());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package nmd.primal.forgecraft.renders;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.RenderItem;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import nmd.primal.forgecraft.blocks.Firebox;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileFirebox;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 12/4/2016.
|
||||||
|
*/
|
||||||
|
public class TileFireboxRender extends TileEntitySpecialRenderer<TileFirebox>
|
||||||
|
{
|
||||||
|
private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileFirebox tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||||
|
{
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + 0.5D, y + 0.875D, z + 0.5D);
|
||||||
|
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||||
|
//GL11.glRotatef(90.0F * (-tile.rotation + 3), 0.0F, 1.0F, 0.0F);
|
||||||
|
GL11.glTranslatef(-1.5F, -0.0F, -1.0F);
|
||||||
|
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||||
|
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||||
|
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||||
|
BlockPos pos = tile.getPos();
|
||||||
|
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||||
|
//int bright = (this.getLight(tile.getWorld(), pos) / 2);
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||||
|
|
||||||
|
IBlockState state = this.getWorld().getBlockState(pos);
|
||||||
|
Block block = state.getBlock();
|
||||||
|
|
||||||
|
float rotation = 0;
|
||||||
|
|
||||||
|
if(state.getValue(Firebox.FACING) == EnumFacing.EAST){
|
||||||
|
rotation = 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
// offset height of rendering for worktable slabs
|
||||||
|
// Think about ways to avoid instanceof
|
||||||
|
///
|
||||||
|
|
||||||
|
|
||||||
|
ItemStack stack = tile.getStackInSlot(0);
|
||||||
|
if (stack != null) {
|
||||||
|
float height = 0.2f;
|
||||||
|
float scale = 1.5F;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//RenderHelper.glItem(renderItem, stack, shelf_column, 0.0F, row_height, rotation);
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
//GL11.glTranslated(0.5F, 0.0D, 0.5D);
|
||||||
|
|
||||||
|
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||||
|
GL11.glScalef(scale, scale, scale);
|
||||||
|
//
|
||||||
|
// item/block rotation
|
||||||
|
GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F);
|
||||||
|
//GL11.glRotatef(0F , 0.0F, 0.0F, 0.0F);
|
||||||
|
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
|
}
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
18
src/main/java/nmd/primal/forgecraft/tiles/BaseTile.java
Normal file
18
src/main/java/nmd/primal/forgecraft/tiles/BaseTile.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package nmd.primal.forgecraft.tiles;
|
||||||
|
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 12/3/2016.
|
||||||
|
*/
|
||||||
|
public abstract class BaseTile extends TileEntity{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)
|
||||||
|
{
|
||||||
|
return oldState.getBlock() != newSate.getBlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
package nmd.primal.forgecraft.tiles;
|
package nmd.primal.forgecraft.tiles;
|
||||||
|
|
||||||
|
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||||
|
import net.minecraft.block.properties.PropertyBool;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.gui.GuiChat;
|
import net.minecraft.client.gui.GuiChat;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@@ -9,19 +13,53 @@ import net.minecraft.nbt.NBTTagList;
|
|||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.ITickable;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
|
import nmd.primal.forgecraft.blocks.Firebox;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
|
import org.omg.PortableInterceptor.ACTIVE;
|
||||||
|
|
||||||
|
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 11/30/16.
|
* Created by mminaie on 11/30/16.
|
||||||
*/
|
*/
|
||||||
public class TileFirebox extends TileEntity implements IInventory {
|
public class TileFirebox extends BaseTile implements IInventory, ITickable {
|
||||||
|
|
||||||
private ItemStack[] inventory;
|
private ItemStack[] inventory;
|
||||||
private String customName;
|
private String customName;
|
||||||
|
private int iteration = 0;
|
||||||
|
|
||||||
public TileFirebox() {
|
public TileFirebox() {
|
||||||
this.inventory = new ItemStack[this.getSizeInventory()];
|
this.inventory = new ItemStack[this.getSizeInventory()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update () {
|
||||||
|
if(!worldObj.isRemote){
|
||||||
|
this.iteration ++;
|
||||||
|
if(this.iteration == 200 ) {
|
||||||
|
//System.out.println(iteration);
|
||||||
|
this.iteration = 0;
|
||||||
|
IBlockState state = worldObj.getBlockState(this.getPos());
|
||||||
|
if (worldObj.getBlockState(this.getPos()).getValue(Firebox.ACTIVE)) {
|
||||||
|
if (this.getStackInSlot(0) == null) {
|
||||||
|
worldObj.setBlockState(this.getPos(), state.withProperty(Firebox.ACTIVE, false), 2);
|
||||||
|
} else {
|
||||||
|
if(this.getStackInSlot(0) != null) {
|
||||||
|
if (worldObj.rand.nextInt((int) Math.floor(getVanillaItemBurnTime(this.getStackInSlot(0)) / 20)) == 0) {
|
||||||
|
this.decrStackSize(0, 1);
|
||||||
|
//System.out.println(this.getStackInSlot(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String getCustomName() {
|
public String getCustomName() {
|
||||||
return customName;
|
return customName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"facing=north,active=false": { "model": "forgecraft:firebox" },
|
"active=false,facing=north": { "model": "forgecraft:firebox" },
|
||||||
"facing=east,active=false": { "model": "forgecraft:firebox", "y": 90 },
|
"active=false,facing=east": { "model": "forgecraft:firebox", "y": 90 },
|
||||||
"facing=south,active=false": { "model": "forgecraft:firebox", "y": 180 },
|
"active=false,facing=south": { "model": "forgecraft:firebox", "y": 180 },
|
||||||
"facing=west,active=false": { "model": "forgecraft:firebox", "y": 270 },
|
"active=false,facing=west": { "model": "forgecraft:firebox", "y": 270 },
|
||||||
"facing=north,active=true": { "model": "forgecraft:firebox" },
|
"active=true,facing=north": { "model": "forgecraft:firebox_lit" },
|
||||||
"facing=east,active=true": { "model": "forgecraft:firebox", "y": 90 },
|
"active=true,facing=east": { "model": "forgecraft:firebox_lit", "y": 90 },
|
||||||
"facing=south,active=true": { "model": "forgecraft:firebox", "y": 180 },
|
"active=true,facing=south": { "model": "forgecraft:firebox_lit", "y": 180 },
|
||||||
"facing=west,active=true": { "model": "forgecraft:firebox", "y": 270 }
|
"active=true,facing=west": { "model": "forgecraft:firebox_lit", "y": 270 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
{
|
||||||
|
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||||
|
"parent": "forgecraft:block/firebox",
|
||||||
|
"textures": {
|
||||||
|
"texture": "forgecraft:blocks/checker_test",
|
||||||
|
"texture2": "forgecraft:blocks/firebox_racks",
|
||||||
|
"firebox_leg": "forgecraft:blocks/firebox_legs",
|
||||||
|
"texture4": "forgecraft:blocks/brick",
|
||||||
|
"texture4_lit": "forgecraft:blocks/brick_lit"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"__comment": "Back",
|
||||||
|
"from": [ 0, 8, 0 ],
|
||||||
|
"to": [ 16, 16, 2 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 14.5, 16, 16 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 0, 16, 2 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture4_lit" },
|
||||||
|
"west": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture4" },
|
||||||
|
"east": { "uv": [ 14, 0, 16, 8 ], "texture": "#texture4" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Bot",
|
||||||
|
"from": [ 0, 5, 0 ],
|
||||||
|
"to": [ 16, 8, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture4_lit" },
|
||||||
|
"north": { "uv": [ 0, 8, 16, 11 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 0, 8, 16, 11 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 0, 8, 16, 11 ], "texture": "#texture4" },
|
||||||
|
"east": { "uv": [ 0, 8, 16, 11 ], "texture": "#texture4" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "AirSideLeft",
|
||||||
|
"from": [ 0, 8, 2 ],
|
||||||
|
"to": [ 2, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 2, 16 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 0, 2, 15 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 0, 0, 14, 8 ], "texture": "#texture4" },
|
||||||
|
"east": { "uv": [ 0, 0, 14, 8 ], "texture": "#texture4_lit" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "AirSideRight",
|
||||||
|
"from": [ 14, 8, 2 ],
|
||||||
|
"to": [ 16, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 2, 16 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 0, 2, 15 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 0, 0, 14, 8 ], "texture": "#texture4_lit" },
|
||||||
|
"east": { "uv": [ 0, 0, 14, 8 ], "texture": "#texture4" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Front0",
|
||||||
|
"from": [ 2, 8, 14 ],
|
||||||
|
"to": [ 4, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 2, 2 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 14, 2, 12 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" },
|
||||||
|
"east": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4_lit" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Front1",
|
||||||
|
"from": [ 12, 8, 14 ],
|
||||||
|
"to": [ 14, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 2, 2 ], "texture": "#texture4" },
|
||||||
|
"up": { "uv": [ 0, 14, 2, 12 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4_lit" },
|
||||||
|
"east": { "uv": [ 13, 0, 15, 8 ], "texture": "#texture4" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Front2",
|
||||||
|
"from": [ 4, 13, 14 ],
|
||||||
|
"to": [ 12, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 4, 5, 12, 7 ], "texture": "#texture4_lit" },
|
||||||
|
"up": { "uv": [ 4, 5, 12, 7 ], "texture": "#texture4" },
|
||||||
|
"north": { "uv": [ 4, 4, 12, 7 ], "texture": "#texture4" },
|
||||||
|
"south": { "uv": [ 4, 4, 12, 7 ], "texture": "#texture4" },
|
||||||
|
"west": { "uv": [ 15, 0, 16, 4 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 0, 0, 1, 4 ], "texture": "#texture4" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder0",
|
||||||
|
"from": [ 6.5, 15, 2 ],
|
||||||
|
"to": [ 7.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 6.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Leg0",
|
||||||
|
"from": [ 12, 0, 0 ],
|
||||||
|
"to": [ 16, 5, 4 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"up": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"north": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"south": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"west": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"east": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Leg1",
|
||||||
|
"from": [ 0, 0, 12 ],
|
||||||
|
"to": [ 4, 5, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"up": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"north": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"south": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"west": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"east": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Leg2",
|
||||||
|
"from": [ 0, 0, 0 ],
|
||||||
|
"to": [ 4, 5, 4 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"up": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"north": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"south": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"west": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"east": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Leg3",
|
||||||
|
"from": [ 12, 0, 12 ],
|
||||||
|
"to": [ 16, 5, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"up": { "uv": [ 0, 12, 4, 16 ], "texture": "#firebox_leg" },
|
||||||
|
"north": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"south": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"west": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" },
|
||||||
|
"east": { "uv": [ 0, 10.5, 4, 15.5 ], "texture": "#firebox_leg" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder1",
|
||||||
|
"from": [ 10.5, 15, 2 ],
|
||||||
|
"to": [ 11.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 10.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder2",
|
||||||
|
"from": [ 12.5, 15, 2 ],
|
||||||
|
"to": [ 13.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 12.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder3",
|
||||||
|
"from": [ 2.5, 15, 2 ],
|
||||||
|
"to": [ 3.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 2.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder4",
|
||||||
|
"from": [ 4.5, 15, 2 ],
|
||||||
|
"to": [ 5.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 4.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Holder5",
|
||||||
|
"from": [ 8.5, 15, 2 ],
|
||||||
|
"to": [ 9.3, 15.8, 14 ],
|
||||||
|
"rotation": { "origin": [ 8.5, 15, 2 ], "axis": "z", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"up": { "uv": [ 0, 0, 1, 12 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"north": { "uv": [ 0, 0, 1, 1 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"south": { "uv": [ 0, 16, 1, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"west": { "uv": [ 0, 16, 12, 15 ], "texture": "#texture2", "tintindex": 0 },
|
||||||
|
"east": { "uv": [ 16, 16, 4, 15 ], "texture": "#texture2", "tintindex": 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 721 B |
Reference in New Issue
Block a user