Jump to content

crackedEgg

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by crackedEgg

  1. you may need to increase heap space. gradlew -Dorg.gradle.jvmargs=-Xmx2048M setupDecompWorkspace
  2. Here is one example of how to do this. https://github.com/m1k3s/parachute/blob/master/parachute/client/ParachuteClientProxy.java#L46 There are other projects in that github for mobs. They target java 7 though. The parachute was updated to target java 8.
  3. Have a look at this code, it works for me. https://github.com/m1k3s/crackedzombie/blob/1.7.10/crackedzombie/common/CrackedZombie.java#L190
  4. Here is an example of getting an existing keybinding. https://github.com/m1k3s/parachute/blob/1.8.9-ng/parachute/client/KeyPressTick.java#L44 The ascendkey is this: https://github.com/m1k3s/parachute/blob/1.8.9-ng/parachute/client/ParachuteClientProxy.java#L38
  5. Thanks, I've seen people link to a specific line before, I just wasn't sure how to do it. Learn something new everyday. Hopefully some of that code was useful.
  6. Have a look at this: https://github.com/m1k3s/parachute/blob/1.8.0/parachute/common/EntityParachute.java Look at lines 510, 524, and 537
  7. my workflow for github is: git add <source directory> (no slash) git add <other stuff> git commit -a ( I have an editor environment variable set ) git push origin master (or branch name)
  8. That's one way to solve it. I think the best way is for the forge method shouldRiderSit to actually work. But thanks for posting back with that solution.
  9. I have the same issue with my parachute mod. Unfortunately isRiding and shouldRiderSit are coupled to the motion packet code. Movement doesn't get updated if shouldRiderSit returns false. I thought the idea was to render a sitting player only but that's not how it works, as of 1.6.x. Post back if you find a solution.
  10. larsgerrits is correct. This code causes a silent (at least for me) NPE. It does not crash my game. Sorry for the confusion. Well, back to the drawing board... EDIT: THIS code does work without NPE. player.inventory.armorInventory[2] = (ItemStack) null; forget setting stacksize to zero. If you find a better way to do this please post back.
  11. Similar code is used in InventoryPlayer.java in both 1.7.10 and 1.8, that is where I got this from. Sorry if it's not the right way to clear an armor item from the armor inventory. But it does seem to work for me.
  12. The second line will cause a NPE. I am successfully using this very code in a mod with no NPEs. What would you suggest otherwise?
  13. this works for me, player.inventory.armorInventory[2] = (ItemStack) null; player.inventory.armorInventory[2].stackSize = 0; Although you can destroy normal items with setItemDamage(getMaxDamage() + 1) I don't know if this works with armor.
  14. func_180426_a used to be setPositionAndRotation2
  15. You're welcome to have a look at the code for my parachute mod. I think it does something like what you want to do. https://github.com/m1k3s/parachute
  16. Draco18s already gave you that info, however: change these registrations from MRCS.proxy.registerItemTexture(MRCSItems.stoneRightArm, ConstantsItem.KEY_STONE_RIGHT_ARM); to: MRCS.proxy.registerItemTexture(MRCSItems.stoneRightArm, MODID + ":" + ConstantsItem.KEY_STONE_RIGHT_ARM); You have to prepend your modID and a colon as a string to your item name string.
  17. If you are on 1.7.2 then here is what I do: BiomeGenBase[] allBiomes = Iterators.toArray(Iterators.filter(Iterators.forArray(BiomeGenBase.getBiomeGenArray()), Predicates.notNull()), BiomeGenBase.class);
  18. I use my common proxy class. import cpw.mods.fml.common.FMLLog; import org.apache.logging.log4j.Logger; private static final Logger logger = FMLLog.getLogger(); . . . public void print(String s) { logger.info(s); }
  19. I don't know if this will help you but I added this to my Init method FMLClientHandler.instance().setDefaultMissingAction(FMLMissingMappingsEvent.Action.IGNORE); This line allowed my mods to load on a world that I used to test a mod and then removed. After removing the mod I got the unassigned blocks or item message and was unable to continue.
  20. The two sources I used: Generate the keys http://docs.oracle.com/javase/tutorial/security/toolsign/step3.html Sign the jar file http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html
  21. Here is how I do this in my parachute mod. public static ItemStack inventoryContainsAAD(InventoryPlayer inventory) { ItemStack itemstack = null; for (ItemStack s : inventory.mainInventory) { if (s != null && s.getItem() instanceof ItemAutoActivateDevice) { itemstack = s; break; } } return itemstack; } you can view the code at https://github.com/m1k3s/parachute
  22. Removing shouldRiderSit() test from Entity.isRiding() would enable mods to render the player 'standing' when mounted on another entity. In my parachute mod the player would appear to 'hang' from the parachute and then when near the ground would pick up legs (sit position) and then land. A hover board mod would probably have the player standing on the board. In 1.6.2 the coupled tests in Entity.isRiding() causes motion packets not to be sent if shouldRiderSit() returns false. The code is in EntityClientPlayerMP.onUpdate().
  23. If anyone is having trouble with mountable entities not moving.... Check that shouldRiderSit() is returning true in your entity code. That's what was causing me trouble with the parachute.
  24. Have a look at EntityBoat.java in method onUpdate(). The boat checks to see if it is in water there.
  25. Try this: private static final ResourceLocation texture = new ResourceLocation("chimera27metroid","textures/entities/entitypowerbolt.png"); @Override protected ResourceLocation func_110775_a(Entity entity) { return texture; } Make sure your texture is in your mod file at "assets/chimera27metroid/textures/entities/"
×
×
  • Create New...

Important Information

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