Jump to content

abused_master

Members
  • Posts

    235
  • Joined

  • Last visited

Everything posted by abused_master

  1. Thank you, and i am sorry, im not the best at java, i am still learning and improving, but thats all part of the process
  2. Ok i have removed BlockContainer and extended Block, and i added these methods @Override public public boolean hasTileEntity() { return new TileEntityStoneChest(); }; @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityStoneChest(); } they are erroring, so i was was wondering if i was i was doing it wrong, and if so how should i change them
  3. are there any other ways to do it while extending BlockContainer, as i have future plans on features to add using that
  4. Im not using a TESR as i want to render it only using the .json files
  5. Hello everyone, i am currently trying to register a TileEntity within my mod but am running into a few problems, when i was in 1.8.9 i was able to use the method below to register my TE using just .json files @Override public int getRenderType() { return 3; } that method no longer works though from when i have tried it, so i tried using the method below, but still no luck, public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.ENTITYBLOCK_ANIMATED; } i was wondering if i was doing something wrong with my .json files or if i am rendering the TE wrong, and just a note i do not want to render it using a TESR but if that is the only way, could someone point me to the right direction as i have never used a TESR before. here is my code: my Chest code that im trying to render: public class StoneChest extends BlockContainer { public StoneChest(Material material, String unlocalizedName) { super(material); this.setHardness(3.0F); this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(AE3.tabAE); } public StoneChest(String unlocalisedName) { this(Material.rock, unlocalisedName); } @Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override public boolean isFullCube(IBlockState state) { return false; } public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.ENTITYBLOCK_ANIMATED; } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack) { byte chestFacing = 0; int facing = MathHelper.floor_double((entityliving.rotationYaw * 4F) / 360F + 0.5D) & 3; if (facing == 0) { chestFacing = 2; } if (facing == 1) { chestFacing = 5; } if (facing == 2) { chestFacing = 3; } if (facing == 3) { chestFacing = 4; } TileEntity te = world.getTileEntity(pos); if (te != null && te instanceof TileEntityStoneChest) { TileEntityStoneChest teic = (TileEntityStoneChest) te; teic.wasPlaced(entityliving, itemStack); teic.setFacing(chestFacing); world.notifyBlockUpdate(pos, blockState, blockState, 3); } } public void dropContent(int newSize, IInventory chest, World world, BlockPos pos) { Random random = world.rand; for (int l = newSize; l < chest.getSizeInventory(); l++) { ItemStack itemstack = chest.getStackInSlot(l); if (itemstack == null) { continue; } float f = random.nextFloat() * 0.8F + 0.1F; float f1 = random.nextFloat() * 0.8F + 0.1F; float f2 = random.nextFloat() * 0.8F + 0.1F; while (itemstack.stackSize > 0) { int i1 = random.nextInt(21) + 10; if (i1 > itemstack.stackSize) { i1 = itemstack.stackSize; } itemstack.stackSize -= i1; EntityItem entityitem = new EntityItem(world, pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, pos.getZ() + f2, new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata())); float f3 = 0.05F; entityitem.motionX = (float) random.nextGaussian() * f3; entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F; entityitem.motionZ = (float) random.nextGaussian() * f3; if (itemstack.hasTagCompound()) { entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); } world.spawnEntityInWorld(entityitem); } } } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityStoneChest(); } } my TE code: public class TileEntityStoneChest extends TileEntity { private byte facing; public void setFacing(byte facing2) { this.facing = facing2; } public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack) { } } my registers in my ModBlocks: GameRegistry.register(StoneChest.setRegistryName("StoneChest")); GameRegistry.register(new ItemBlockChest(StoneChest).setRegistryName(StoneChest.getRegistryName())); GameRegistry.registerTileEntity(TileEntityStoneChest.class, "TileEntityStoneChest"); My json files, Item Model Json (this one works fine and renders fine); { "parent": "block/block", "textures": { "texture": "sc:models/StoneChest" }, "elements": [ { "from": [ 1, 0, 1 ], "to": [ 15, 10, 15 ], "faces": { "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } } }, { "from": [ 1, 9, 1 ], "to": [ 15, 14, 15 ], "faces": { "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } } }, { "from": [ 7, 7, 0 ], "to": [ 9, 11, 1 ], "faces": { "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } } } ] } My BlockStates json; { "variants": { "normal": { "model": "sc:models/StoneChest" } } } and my Block Model Json { "parent": "block/block", "textures": { "texture": "sc:models/StoneChest" }, "elements": [ { "from": [ 1, 0, 1 ], "to": [ 15, 10, 15 ], "faces": { "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } } }, { "from": [ 1, 9, 1 ], "to": [ 15, 14, 15 ], "faces": { "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } } }, { "from": [ 7, 7, 0 ], "to": [ 9, 11, 1 ], "faces": { "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } } } ] }
  6. Id say try looking at the chest code
  7. I just tried that but had no luck. Edit- I was able to fix it by overriding getRenderType() and changing my return from 2 to 3 @Override public int getRenderType() { return 3; }
  8. I have tried that, i unhooked the TESR but had no luck, my block was extending BlockContainer and tried all i can with this but had no luck rendering so now im using extends Block implements ITileEntityProvider
  9. I had the same problem and got it fixed, this should help you https://github.com/MinecraftForge/ForgeGradle/issues/324
  10. there are no errors as far as i see, the block model renders in my inventory in the game, but when placed its just an invisible block
  11. My block name is GrindingFactory and all my json files are called GrindingFactory, the unlocalized name for the block is also GrindingFactory
  12. Well i have a json model i want the block to use, but not sure how to do that, my Blockstate: { "variants": { "normal": { "model": "jatma:GrindingFactory" } } } My Model Block json, what i want the block to look like { "textures": { "0": "blocks/obsidian", "1": "blocks/beacon", "2": "blocks/bedrock", "3": "blocks/glass", "4": "jatma:blocks/powerport", "5": "jatma:blocks/powerport" }, "elements": [ { "name": "bottom", "from": [ 1.0, 0.0, 1.0 ], "to": [ 15.0, 1.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 1.0 ] }, "south": { "texture": "#0", "uv": [ 15.0, 1.0, 1.0, 0.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 1.0, 15.0, 2.0 ] }, "up": { "texture": "#1", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "down": { "texture": "#1", "uv": [ 1.0, 1.0, 15.0, 15.0 ] } } }, { "name": "pillar1", "from": [ 1.0, 1.0, 14.0 ], "to": [ 2.0, 9.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "pillar2", "from": [ 14.0, 1.0, 14.0 ], "to": [ 15.0, 9.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 2.0, 9.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, -1.0, 1.0 ] } } }, { "name": "pillar3", "from": [ 1.0, 1.0, 1.0 ], "to": [ 2.0, 9.0, 2.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "pillar4", "from": [ 14.0, 1.0, 1.0 ], "to": [ 15.0, 9.0, 2.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "top", "from": [ 3.0, 9.0, 3.0 ], "to": [ 13.0, 10.0, 13.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 10.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 10.0, 1.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 10.0, 1.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 10.0, 1.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 3.0, 13.0, 13.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 3.0, 13.0, 13.0 ] } } }, { "name": "connector", "from": [ 2.0, 8.0, 2.0 ], "to": [ 3.0, 10.0, 3.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "connector2", "from": [ 2.0, 8.0, 13.0 ], "to": [ 3.0, 10.0, 14.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "connector3", "from": [ 13.0, 8.0, 13.0 ], "to": [ 14.0, 10.0, 14.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "connector4", "from": [ 13.0, 8.0, 2.0 ], "to": [ 14.0, 10.0, 3.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "hammerconnector", "from": [ 7.0, 6.0, 7.0 ], "to": [ 9.0, 9.0, 9.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } } }, { "name": "hammerbottom", "from": [ 6.0, 1.0, 6.0 ], "to": [ 10.0, 2.0, 11.0 ], "faces": { "north": { "texture": "#2", "uv": [ 3.0, 1.0, 14.0, 13.0 ] }, "east": { "texture": "#2", "uv": [ 15.0, 14.0, -7.0, 4.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 13.0, 11.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 11.0 ] }, "up": { "texture": "#2", "uv": [ 5.0, 3.0, 15.0, 16.0 ] }, "down": { "texture": "#2", "uv": [ 3.0, 5.0, 15.0, 16.0 ] } } }, { "name": "2", "from": [ 5.0, 4.0, 5.0 ], "to": [ 11.0, 5.0, 6.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 13.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 13.0, 12.0 ] }, "south": { "texture": "#2", "uv": [ 14.0, 0.0, 3.0, 16.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 13.0, 14.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 12.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 12.0 ] } } }, { "name": "3", "from": [ 5.0, 4.0, 6.0 ], "to": [ 6.0, 5.0, 11.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 10.0, 12.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 13.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 11.0, 13.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 13.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 13.0, 15.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 10.0, 13.0 ] } } }, { "name": "4", "from": [ 10.0, 4.0, 6.0 ], "to": [ 11.0, 5.0, 11.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 9.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 12.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 12.0, 10.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 14.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 14.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 14.0 ] } } }, { "name": "hammerpart", "from": [ 5.0, 5.0, 5.0 ], "to": [ 11.0, 6.0, 11.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 12.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 15.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 12.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 14.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 13.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 16.0 ] } } }, { "name": "windowfront", "from": [ 2.0, 1.0, 1.0 ], "to": [ 14.0, 9.0, 2.0 ], "faces": { "north": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#3", "uv": [ 4.0, 4.0, 5.0, 12.0 ] }, "south": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#3", "uv": [ 8.0, 5.0, 9.0, 11.0 ] }, "up": { "texture": "#3", "uv": [ 1.0, 1.0, 14.0, 14.0 ] }, "down": { "texture": "#3", "uv": [ 4.0, 8.0, 16.0, 9.0 ] } } }, { "name": "windowfrond2", "from": [ 2.0, 1.0, 14.0 ], "to": [ 14.0, 9.0, 15.0 ], "faces": { "north": { "texture": "#3", "uv": [ 0.0, 0.0, 12.0, 8.0 ] }, "east": { "texture": "#3", "uv": [ 6.0, 4.0, 7.0, 12.0 ] }, "south": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#3", "uv": [ 8.0, 3.0, 9.0, 9.0 ] }, "up": { "texture": "#3", "uv": [ 2.0, 1.0, 14.0, 14.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 12.0, 1.0 ] } } }, { "name": "powerport", "from": [ 14.0, 1.0, 2.0 ], "to": [ 15.0, 9.0, 14.0 ], "faces": { "north": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "east": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 12.0 ] }, "down": { "texture": "#5", "uv": [ 0.0, 0.0, 1.0, 12.0 ] } } }, { "name": "powerport2", "from": [ 1.0, 1.0, 2.0 ], "to": [ 2.0, 9.0, 14.0 ], "faces": { "north": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "east": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "west": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 12.0 ] }, "down": { "texture": "#5", "uv": [ 0.0, 0.0, 1.0, 12.0 ] } } }, { "name": "glassface1", "from": [ 13.0, 9.0, 3.0 ], "to": [ 14.0, 10.0, 13.0 ], "faces": { "north": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "east": { "texture": "#3", "uv": [ 3.0, 1.0, 15.0, 14.0 ] }, "south": { "texture": "#3", "uv": [ 0.0, 0.0, 13.0, 13.0 ] }, "west": { "texture": "#3", "uv": [ 0.0, 13.0, 16.0, 0.0 ] }, "up": { "texture": "#3", "uv": [ 15.0, 6.0, 3.0, 15.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 10.0 ] } } }, { "name": "glassface2", "from": [ 2.0, 9.0, 3.0 ], "to": [ 3.0, 10.0, 13.0 ], "faces": { "north": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "east": { "texture": "#3", "uv": [ 0.0, 0.0, 10.0, 1.0 ] }, "south": { "texture": "#3", "uv": [ 0.0, 0.0, -2.0, -3.0 ] }, "west": { "texture": "#3", "uv": [ 1.0, 14.0, 15.0, 3.0 ] }, "up": { "texture": "#3", "uv": [ 14.0, 3.0, 2.0, 14.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 10.0 ] } } }, { "name": "glassface3", "from": [ 3.0, 9.0, 2.0 ], "to": [ 13.0, 10.0, 3.0 ], "faces": { "north": { "texture": "#3", "uv": [ 2.0, 2.0, 12.0, 3.0 ] }, "east": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "south": { "texture": "#3", "uv": [ 2.0, 2.0, 12.0, 13.0 ] }, "west": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "up": { "texture": "#3", "uv": [ 1.0, 2.0, 15.0, 13.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 10.0, 1.0 ] } } }, { "name": "glassface4", "from": [ 3.0, 9.0, 13.0 ], "to": [ 13.0, 10.0, 14.0 ], "faces": { "north": { "texture": "#3", "uv": [ 2.0, 2.0, 12.0, 3.0 ] }, "east": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "south": { "texture": "#3", "uv": [ 2.0, 2.0, 12.0, 13.0 ] }, "west": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "up": { "texture": "#3", "uv": [ 1.0, 2.0, 15.0, 13.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 10.0, 1.0 ] } } } ] } My model item: { "parent":"jatma:block/GrindingFactory", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } If there is a way to go about it by not using a TESR and just using the Block json Model, that would be much better
  13. Hello, so i am working on a new mod right now that involves a lot of TileEntities, but whenever i try to render one using a TESR it just loads it as an invisible block in game, My Block code: public class GrindingFactory extends Block implements ITileEntityProvider { public GrindingFactory(String unlocalizedName, Material material, float hardness) { super(material); this.setHardness(3.0F); this.setUnlocalizedName("GrindingFactory"); this.setCreativeTab(JATMA.jatma); this.isBlockContainer = true; } public GrindingFactory(String unlocalizedName, float hardness) { this(unlocalizedName, Material.rock, hardness); } public GrindingFactory(String unlocalizedName) { this(unlocalizedName, 3.0F); } @Override public boolean isOpaqueCube(){ return false; } @Override public boolean isFullCube() { return false; } public int getRenderType() { return 2; } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityGrindingFactory(); } @Override public void breakBlock(World world, BlockPos pos, IBlockState state) { super.breakBlock(world, pos, state); world.removeTileEntity(pos); } @Override public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam) { super.onBlockEventReceived(worldIn, pos, state, eventID, eventParam); TileEntity tileentity = worldIn.getTileEntity(pos); return tileentity == null ? false : tileentity.receiveClientEvent(eventID, eventParam); } } My TileEntity Code: public class TileEntityGrindingFactory extends TileEntity implements IWrenchable, IEnergyHandler { protected EnergyStorage storage = new EnergyStorage(10000); @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); storage.writeToNBT(nbt); } @Override public boolean canConnectEnergy(EnumFacing from) { return true; } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } @Override public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { return 0; } @Override public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public int getMaxEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public ArrayList<ItemStack> dismantleBlock(EntityPlayer player, World world, BlockPos pos, boolean returnDrops) { return null; } @Override public boolean canDismantle(EntityPlayer player, World world, BlockPos pos) { return true; } } My TESR class: public class RenderGrindingFactory extends TileEntitySpecialRenderer { private final ResourceLocation textureLocation = new ResourceLocation("jatma", "textures/blocks/grindingfactory.png"); @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage) { GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); bindTexture(textureLocation); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); int rotation = 0; switch (te.getBlockMetadata() % 4) { case 0: rotation = 270; break; case 1: rotation = 0; break; case 2: rotation = 90; break; case 3: rotation = 180; break; } GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F); GL11.glPopMatrix(); GL11.glPopMatrix(); } } I have binded my TileEntity class with my TESR class in my BlockRenderRegistry, public class BlockRenderRegister { public static String modid = info.MODID; public static void registerBlockRenderer() { reg(ModBlocks.GrindingFactory); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGrindingFactory.class, new RenderGrindingFactory()); } public static void reg(Block block) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(modid + ":" + block.getUnlocalizedName().substring(5), "inventory")); } } My TileEntity is registered, So i was wondering if i was rendering it wrong, or if i was doing something wrong
  14. Hello, so im currently trying to create a new mod and setup my workspace right now, but for some reason whenever i run gradlew setupDecompWorkspace it fails and gives me this error http://pastebin.com/LKNVcC1H ~Edit i ended up being able to fix this by deleting my .gradle folder and then trying to setup my dev environment
  15. yeah my cmd is on admin, and i have never had an error doing this before till recently
  16. Hello, so im currently trying to create a new mod and setup my workspace right now, but for some reason whenever i run gradlew setupDecompworkspace it fails and gives me this error http://pastebin.com/LKNVcC1H
  17. All right thank you very much i will try it
  18. yes i have and tried to make a custom spawner from the code i saw in there but when i ended up launching the game it crashed. so i was wondering if anyone had a tutorial because for me its easier to read/watch a tutorial and learn that look through the code
  19. Hello, I am working on developing a 1.8.9 minecraft mod that is based around spawners. I have looked all around for a 1.8 tutorial on how to make a custom spawner. i even looked for 1.7 tutorials to see if i was able to use it for 1.8 but i have had no luck. I was wondering if anyone has knows or has a tutorial on this.
  20. actually i ended up using this method public static boolean ThermalFoundation; ThermalFoundation = Loader.isModLoaded("ThermalFoundation"(); if (ThermalFoundation) { //added all stuff here }
  21. Hello Everyone, I am currently working on a new mod thats all about ores. I want to make it so that if a new mod is added such as thermal expansion it registers an ore that i make. but if the mod is not there the ore isnt registered. if anyone has any tutorials on how im able to do this i would be very greatful
  22. Hello Everyone I have been looking on the internet and trying for myself to make a generator that uses coal/wood ect, to make RF energy. If anyone has a tutorial that i could follow or if someone could help me as to learn how to make one id be very grateful.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.