crackedEgg
Members-
Posts
60 -
Joined
-
Last visited
Everything posted by crackedEgg
-
[1.8.9] gradlew setupDecompWorkspace error "decompileMc"
crackedEgg replied to T3ctonic's topic in Modder Support
you may need to increase heap space. gradlew -Dorg.gradle.jvmargs=-Xmx2048M setupDecompWorkspace -
[1.8.9] [SOLVED] Registering a new mob entity?
crackedEgg replied to DragonessAtHeart's topic in Modder Support
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. -
[1.7.10] Does EntityRegistry.RemoveSpawn works?
crackedEgg replied to Frag's topic in Modder Support
Have a look at this code, it works for me. https://github.com/m1k3s/crackedzombie/blob/1.7.10/crackedzombie/common/CrackedZombie.java#L190 -
[1.8.*] Getting the KeyBinding of a vanilla Key
crackedEgg replied to xlash123's topic in Modder Support
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 -
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.
-
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
-
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)
-
[1.8] [Solved] Entity can mount w/o sitting?
crackedEgg replied to Eetmorchikn's topic in Modder Support
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. -
[1.8] [Solved] Entity can mount w/o sitting?
crackedEgg replied to Eetmorchikn's topic in Modder Support
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. -
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.
-
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.
-
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?
-
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.
-
func_180426_a used to be setPositionAndRotation2
-
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
-
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.
-
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);
-
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); }
-
[1.7.2][SOLVED] unassigned blocks & items upon reenter the World
crackedEgg replied to Zzyxz's topic in Modder Support
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. -
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
-
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
-
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().
-
Any way to check if the player is touching water?
crackedEgg replied to chimera27's topic in Modder Support
Have a look at EntityBoat.java in method onUpdate(). The boat checks to see if it is in water there. -
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/"