Jump to content

CreativeMD

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by CreativeMD

  1. hm, I'm not really happy with this kind of solution. Isn't there another way?
  2. That what i'm trying to do, but Minecraft crashs before i can do it. I use the event onChunkLoading, then i check the version of the Chunk .If it needs an update, i check every block and set the new ID, also i Chest and all other kind of storage. On the onPlayerLogin event, i check the iventory of the players. But the world crashs before all this.
  3. Then everything works fine, but i can't say that every world before this version of my Mod can't be used anymore.
  4. Hi, I have changed one of my block Ids. Normally, when you open a world, where some Ids haven't got a block, opens a gui where you have to click Yes and No. These gui is there, but in the next second Minecraft crashs and says Shutting down internal server.... Console: My Block is a Block, which uses Metadata, so i have also an ItemBlock. Have no idea what went wrong, so i looked into the code. Forge checks if an Id hasn't got a Block or an Item, if not it will check if the Mod irgnore it. But i find no way to say that my mod ignore it. if (!isModIgnoredForIdValidation(diff.getModId())) { foundNonIgnored = true; } The function isModIgnoredForIdValidation is checking if this map: private static Map<String,String> ignoredMods; contains my Mods. But i can't add my Mod to this list. Can anybody help me? Thanks previously.
  5. ok, so far so good. But how i have to go on? package randomadditions; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.WorldSavedData; public class WorldSaveRandomData extends WorldSavedData{ public WorldSaveRandomData(String par1Str) { super(par1Str); } @Override public void readFromNBT(NBTTagCompound var1) { RandomAdditions.WorldVersion = var1.getDouble("RAV"); } @Override public void writeToNBT(NBTTagCompound var1) { var1.setDouble("RAV", RandomAdditions.ModVersion); } }
  6. Hi, How do i save information in the World? I have no idea, i got really confused. Would be very nice, if someone could help me.
  7. Thanks a lot, i no how NBTTags work, thanks a lot.
  8. Hi, I made a Throwing Knife with different kinds of materials. The material is depedent on the itemID and every material differently. But when i render it the int itemID is 0. But it shouldn't. Is there a way of sending this int to the client? public EntityThrow(World par1World, EntityLiving par2EntityLiving, float par3, ItemMaterial Material, int ID) { super(par1World); this.damage = Material.efficiency/1.5; this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLiving; if (par2EntityLiving instanceof EntityPlayer) { this.canBePickedUp = 1; } this.itemID = ID; this.setSize(0.5F, 0.5F); this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F); }
  9. A way to add an item for an armor slot without extend your item to ItemArmor. Currently, there is no other way to do it.
  10. How to add a new item which fits in an armor slot? I don't want to make an item which extends ItemArmor. Is there an other way? Thanks previously
  11. No, i have this function in my Block code.
  12. http://www.teamviewer.com/en/index.aspx It's a programm where somebody (who is connected to you) can do something on your computer. He sees all what you see and can interact.
  13. You could help you with TeamViewer, so when you want that just PN me.
  14. We can't solve your problem without your code.
  15. Hi I made it like this: public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4){ return null; } The Player can collide with it. The player is pushed up into the air. public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { par5Entity.fallDistance = 0; if(par5Entity instanceof EntityPlayer && ((EntityPlayer)par5Entity).isJumping) //Check if the Entity is a player and is jumping { par5Entity.motionY += 1; //High jump } }
  16. Hi there, My Block doesn't make an Updatetick and i don't know why. I'm a little bit confused, because it should work. My Block Code is really huge, but i think the important lines are these: public BlockRandom(int par1, int par2, String Texture, RandomBlock[] blocks, int renderIndex, int Typ) { super(par1, par2, Material.iron); this.setRequiresSelfNotify(); this.setCreativeTab(RandomAdditions.RandomBlocks); this.setTickRandomly(true); this.Texture = Texture; this.blocks = blocks; this.renderIndex = renderIndex; this.Typ = Typ; } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { RandomBlock.getRandomBlock(par1World, par2, par3, par4, blocks).updateTick(par1World, par2, par3, par4, par5Random); } BlockCode
  17. Thannnnnnnnnnks Thanks a lot. I am so happy it has worked out. My Code for topic viewer public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { this.blockMetadata = pkt.customParam1.getInteger("Metadata"); this.direction = pkt.customParam1.getByte("direction"); } public Packet getDescriptionPacket() { NBTTagCompound par1NBTTagCompound = new NBTTagCompound(); par1NBTTagCompound.setByte("direction", this.direction); par1NBTTagCompound.setInteger("Metadata", this.blockMetadata); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 0, par1NBTTagCompound); }
  18. So, How can I fix that problem? By the way i have some problems with shortcuts, what does "FYI" mean?
  19. Hi, I make a block, which needs a TileEntity to render in the right way. But the client doesn't get the TileEntity from the server, is there a method to send the TileEntity to the client? I need the TileEntity for the right textures and the right model. When you doesn't get my problem, i can send you my source code.
×
×
  • Create New...

Important Information

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