Everything posted by crackedEgg
-
[1.8.9] gradlew setupDecompWorkspace error "decompileMc"
you may need to increase heap space. gradlew -Dorg.gradle.jvmargs=-Xmx2048M setupDecompWorkspace
-
[1.8.9] [SOLVED] Registering a new mob entity?
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?
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
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
-
Finding closest block downwards
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.
-
Finding closest block downwards
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
-
[Solved] Can't figure out git
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?
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?
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.
-
[solved][1.7.10] Destroying an armor
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.
-
[solved][1.7.10] Destroying an armor
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.
-
[solved][1.7.10] Destroying an armor
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?
-
[solved][1.7.10] Destroying an armor
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.
-
Player rotation pitch and yaw
func_180426_a used to be setPositionAndRotation2
-
Player rotation pitch and yaw
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
-
[1.8] Completely lost regarding textures
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.
-
addspawn method crashes game!?!
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);
-
[1.7.2] how do I now use the logger
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
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.
-
Signing the Jar file
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
-
Detecting an item and performing actions on it in a player's inventory
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
-
Separate shouldRiderSit() from isRiding()
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().
-
Trouble with mountable entities - turns, but won't move! Help???
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.
-
Any way to check if the player is touching water?
Have a look at EntityBoat.java in method onUpdate(). The boat checks to see if it is in water there.
-
Entity texture not loading
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/"
IPS spam blocked by CleanTalk.