Jump to content

Naiten

Members
  • Posts

    325
  • Joined

  • Last visited

Everything posted by Naiten

  1. Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT
  2. Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT
  3. If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it.
  4. If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it.
  5. Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.
  6. Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.
  7. I think, placing GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); or GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F); somewhere in the beginning of the code will help you.
  8. I think, placing GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); or GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F); somewhere in the beginning of the code will help you.
  9. Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer());
  10. Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer());
  11. Put this code into your block's onBlockPlacedBy int dir = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3; world.setBlockMetadataWithNotify(i, j, k, dir, 0);
  12. Put this code into your block's onBlockPlacedBy int dir = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3; world.setBlockMetadataWithNotify(i, j, k, dir, 0);
  13. Problem solved. That helped public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.customParam1); }
  14. Problem solved. That helped public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.customParam1); }
  15. public int mid = 0; makes no result.
  16. public int mid = 0; makes no result.
  17. Hi there. Here's my code package net.railowar.src; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class TileEntityBlockZRail extends TileEntity{ public int mid; @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setInteger("mid", mid); } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.mid = par1NBTTagCompound.getInteger("mid"); } } But after i save/load, it loses all those mids...
  18. Hi there. Here's my code package net.railowar.src; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class TileEntityBlockZRail extends TileEntity{ public int mid; @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setInteger("mid", mid); } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.mid = par1NBTTagCompound.getInteger("mid"); } } But after i save/load, it loses all those mids...
×
×
  • Create New...

Important Information

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