Naiten
Members-
Posts
325 -
Joined
-
Last visited
Everything posted by Naiten
-
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT -
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT -
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
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. -
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
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. -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways. -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways. -
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.
-
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.
-
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
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()); -
How do I make my block have a custom render> (EG Chest, signs ect)
Naiten replied to Cyani's topic in Modder Support
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()); -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
m( Show me your texture and subblocks. -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
m( Show me your texture and subblocks. -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
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); -
How would I set my blocks metadata depending on the players direction?
Naiten replied to Flenix's topic in Modder Support
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); -
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); }
-
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); }
-
public int mid = 0; makes no result.
-
public int mid = 0; makes no result.
-
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...
-
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...