Jump to content

The_Fireplace

Forge Modder
  • Posts

    243
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by The_Fireplace

  1. I am fairly certain it is a bug somewhere along the line, other modders(notably, iChun) have had issues with end teleportation.
  2. I am making ammo for my gun, and I want it to render like the item used as ammo(like the egg renders when thrown). It crashes when it is fired, and it appears to be because of the rendering code. Here is what I have: RenderCoal.java ClientProxy.java EntityCoal.java In my Pre-Init in the main class And the registerEntity code(also in the main class) And lastly, the crash report If anyone knows how to fix the crash(and make it render correctly), your help would be appreciated.
  3. How exactly do I fix this issue? I have tried multiple times, and they all have failed. Here is what I have tried: private void createEntity(LivingDropsEvent event){ EntityLivingBase entity; World worldIn = event.entityLiving.worldObj; int id = EntityList.getEntityID(event.entityLiving); NBTTagCompound storedData = event.entityLiving.getEntityData(); ItemStack weapon = event.entityLiving.getHeldItem(); entity = (EntityLivingBase) EntityList.createEntityByID(id, worldIn); entity.setLocationAndAngles(event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, MathHelper.wrapAngleTo180_float(worldIn.rand.nextFloat() * 360.0F), 0.0F); entity.rotationYawHead = entity.rotationYaw; entity.renderYawOffset = entity.rotationYaw; storedData.setInteger("health", (int) event.entityLiving.getMaxHealth()); ((EntityLivingBase) entity).readFromNBT(storedData); entity.setCurrentItemOrArmor(0, weapon); worldIn.spawnEntityInWorld(entity); } private void createEntity(LivingDropsEvent event){ EntityLivingBase entity; World worldIn = event.entityLiving.worldObj; int id = EntityList.getEntityID(event.entityLiving); NBTTagCompound storedData = event.entityLiving.getEntityData(); ItemStack weapon = event.entityLiving.getHeldItem(); entity = (EntityLivingBase) EntityList.createEntityByID(id, worldIn); entity.setLocationAndAngles(event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, MathHelper.wrapAngleTo180_float(worldIn.rand.nextFloat() * 360.0F), 0.0F); entity.rotationYawHead = entity.rotationYaw; entity.renderYawOffset = entity.rotationYaw; entity.setHealth(event.entityLiving.getMaxHealth()); ((EntityLivingBase) entity).readFromNBT(storedData); entity.setCurrentItemOrArmor(0, weapon); worldIn.spawnEntityInWorld(entity); }
  4. This code (supposedly)worked in 1.7.10, but I can't find any way to update it to 1.8. Anyone have any ideas? @SubscribeEvent public void renderCape(RenderPlayerEvent event){ if(event.entityPlayer instanceof AbstractClientPlayer){ ((AbstractClientPlayer) event.entityPlayer).func_152121_a(Type.CAPE, new ResourceLocation("modid:textures/player/cape/cape.png")); } } func_152121_a does not exist in 1.8, and I can't find anything with the same parameters, or any other way to do it.
  5. I know there have been threads about this in the past, but none of the previous solutions are working for me. I run the following command to set up the workspace gradlew setupDecompWorkspace eclipse I have also, as attempts to fix this with solutions from other modders' threads, tried the following(they all resulted in the same thing when I tried opening the project): gradlew setupDecompWorkspace eclipse --refresh-dependencies gradlew setupDecompWorkspace --refresh-dependencies eclipse gradlew setupDecompWorkspace --refresh-dependencies gradlew eclipse gradlew cleancache --refresh-dependencies setupDecompWorkspace eclipse And no, there are no spaces in the path to the forgeroot/eclipse I am using forge-1.8-11.14.1.1338
  6. Yes, there is. I use MCAnimator. It can import Techne models and seems to export better code. http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/2187221-1-2-1-mcanimator-windows-mac-linux-better EDIT: I am not sure about the sliders and stuff, but it is better than Techne.
  7. Ok, I hit thank you too soon... After doing what you said, they don't spawn at all.
  8. So, I am making it so mobs are reborn at full health during LivingDropsEvent, and it works, except for some data not remaining the same as the original. Here is the void being called during the LivingDropsEvent: Some of the data not staying the same that I have noticed is: Villager color always becomes the brown one Rabbit color always becomes the brown one Baby villagers become fully grown, probably does that for other animals as well Any help would be appreciated.
  9. As the title says, the game crashes when I use bonemeal on my custom crop. Here is the crash report: And here is the crop's code:
  10. I mean the @SubscribeEvent for KeyInputEvent. I apologise for the mix up, and I am currently unable to provide code, as I am on my phone and will not be able to connect my laptop to the internet until Sunday.
  11. No, I have that. I am looking for how to register my key handler class with FML. Or Forge, if that is where it is handled now.
  12. I am trying to update code from 1.7.2 to 1.8 and FMLClientHandler.instance().bus() no longer exists. Where do I register it now?
  13. Wouldt that remove other servers the user has added every time the pack updates? Just because I want to add the official server doesn't mean no other server will be running the modpack.
  14. I have a modpack and I am working on a mod to put in it that I want to automatically a.) Check to see if the official server is on the list and b.) add it to the server list if it isn't already there. How would I go about doing that?
  15. Is it possible to make all of a block/item in a world turn in to another when the world loads?
  16. When I press Q and throw the Item, the custom EntityItem goes a random direction rather than the direction the player is facing. Here is my code: If you need to see any more code, please, let me know
  17. I have an item that spawns a Snowman when right clicked, however, the snowman vanishes after between 1/2 and 2 seconds. Here is my code: If there's any more info you need, please, let me know.
  18. Here's an example of the class you need to include in your mod to hide items from NEI: It is important that the class name be NEI[insert mod name here]Config
  19. That is not actually true. It fires on both sides. Hi DieSieben Are you sure? The only caller appears to be InventoryPlayer.decrementAnimations(), which says /** * Decrement the number of animations remaining. Only called on client side. This is used to handle the animation of * receiving a block. */ Let's see what a breakpoint in my debugger says... [....] Ah well you're right, it breaks on both client and server. Sorry about that Fireplace. onArmorTick() is probably fine. I'd suggest wrapping your damage code in if (!world.isRemote) { } and getting rid of the datawatcher (you don't need it on the server (not even sure it works on server), use isBurning() instead) and seeing if that helps. -TGG Ah, that makes sense. Fixed that part of it. It still, instead of going away when broken, spawns back in the same slot again, fully restored. Anyone know why it is doing that?
  20. Hmm... Who could have predicted that using the same package and class name as another file could cause issues? Something in NEI is trying to call a method from your class that isn't there.
  21. I've created a set of armor that, if worn, will take damage when the player is on fire. However, when it is broken, a new one appears in the same armor slot as the one that was broken. The second problem with it is that it randomly repairs itself instead of taking damage. Here is my code:
  22. Ok, I've done that, and it still does the same thing. Here is the new code: Main Class: And the ConfigChangedHandler: EDIT: Another piece of possibly important information: My config is in a subcategory of the main GUI Config, like the way the Minecraft Forge config GUI is set up.
  23. When I set my config option to true in the Config GUI, it doesn't save the change. I set up a System.out.println("[ModCompat] Code Activated"); in the onConfigChanged code, as shown below, and it doesn't activate after setting the config in the Config GUI.
  24. entity.getFlag(0); isn't visible. I would prefer not to use reflection, is there any other way?
×
×
  • Create New...

Important Information

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