Jump to content

ItsTheRuski

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by ItsTheRuski

  1. I couldn't find anything wrong. I went through each command,by pressing F6, being run and never saw my code being executed twice. Any suggestions? =\
  2. Your genericItem is not a public final variable of the Item class. You need to give the ItemStack constructor a specific instance of your class or an id so in this code:
  3. The static boolean is used in one of my events to remove fall damage.
  4. Ok, thanks for the advice, I will research breakpoints and see what I can derive. I'll reply soon to update my situation.
  5. For some reason when I eat my custom food, my overwritten onEaten and onFoodEaten methods get called twice, so my stack size is reduced by 2 instead of 1. Here is my custom food class. Notice that I DO check for !par2World.isRemote and my food has a custom potion effect set in the constructor that acts like getting poison from raw chicken except the probability of getting the effect is %100: Thank for helping, fellow modders. =)
  6. I haven't dealt with such advanced world gen or any custom chunk and world providers, but I did notice something abnormal in this segment of code: If you are using this.dimensionId when instantiating this.worldChunkMgr , should you set it to Main.dimensionId BEFORE instantiating this.worldChunkMgr ? So change it to: Just a thought. =)
  7. Well, I don't know much about tick handlers but it seems that you could either use a player tick handler or the EntityLiving event. You can check the Tutorials tab on the forum's main page for a link to getting started with events. Other than that, you seem like you know how to add a potioneffect, so you should be fine.
  8. Well, this would depend greatly on what you want to trigger the poison effect. You could use player ticks, Forge Events, and custom potion effects that check if the player is in air. Could you give some more insight on how you want to activate the effect?
  9. Maybe it is because your BlueChicken extends EntityAnimal instead of EntityCreature?
  10. I tried that, and it still doesn't work. At least now, it's not crashing, however, the status icon in my HUD is blank, non-existant. Even though it is in the binded texture.
  11. I tried that and it didn't work. =( Here's the crash report:
  12. Does anyone know how to bind textures in the newest Forge? I checked and my filename does match the parameters of the resourcePath. My complete path is: C:\Users\Me\Dropbox\1.6.4 Modding\forge\mcp\src\minecraft\assets\more_apples\textures\gui\container Here is my custom potion class and I though that I binded the texture correctly, but I am getting a NullPointerException. So, does anyone know how to bind texture properly? Thanks for reading! =)
  13. Right! I completely forgot about that. Thanks a bunch, that solved it.
  14. I have followed a tutorial and got my ores to generate in the regular Minecraft world, but I can't get it to generate in the Nether or the end. I already tried setting the values to get huge veins, and again, there are huge veins in the overworld but not a single ore in the Nether or the End. I have registered all the ores, and they are accessible through the Creative menu. Here is my custom generation class that implements IWorldGenerator: Does anyone know what I did wrong? Thanks for reading! =)
  15. Hello, Don't use @Init because it as been deprecated, meaning that there is a better version of it now. 1. Instead of @Init Substitute it with @EventHandler 2. Since you are now using the an EventHandler, you have to give your 'load' method a loading event. Generally, for initializing your blocks, items, and such you want to use a PreIntializationEvent, so ... Replace public void load() With public void load(FMLPreInitializationEvent event) The rest of the code can remain the same. You can use this parameter later for other purposes, but for now, this allows Forge to initialize your blocks at the proper time. Hope this helps. =)
  16. I changed it to p.worldObj.setBlock((int)(Math.floor(p.posX)), (int)(p.posY+player.yOffset), (int)(Math.floor(p.posZ)), MoreApples.customRedstoneAir.blockID); and it does what I wanted it to now. Thanks for your help. I'll credit you in my mod =)
  17. Hello, I am creating a custom potion effect that spawns a custom air block at the player's feet. The custom block acts exactly like air(transparent texture, no collisions, etc.) but it outputs a redstone signal and I have that whole part working. The problem is that I can't get the block to spawn in the same block as the player's feet. It always spawns diagonally to the right. Does anyone know how to use setBlock to set my custom block at the player's feet? Here is my custom potion effect class: And here is my custom air block class Thanks for taking the time to help a fellow modder! =)
  18. alias, for some reason, the jump boost works in the LivingJumpEvent method that you showed me but when I try to do so in the onUpdate of my custom potioneffect, I know that the code is executed(by a simple player.addChatMessage) but it doesn't work whether I use par1EntityLivingBase.motionY+= 0.2D; or EntityPlayer player = (EntityPlayer) par1EntityLivingBase and player.motionY += 0.2D; I guess I will go with using the event. Even though, optimally, I would like it to work inside my custom PotionEffect. Thanks for the help! =)
  19. Perhaps if we looked where the potion effects are given to the player, the actual code for each specific potion effect is determined by the potion id. I checked under EntityLivingBase updatePotions with no luck. Any ideas? =)
  20. I am trying to make an armor that replicates the effects of the Jump Boost potion effect without acutally giving the player the Jump Boost potion effect. I've tried player.addVelocity(0.0,5.0,0.0) and player.motionY+5 but none of them work. The values themselves change, but the height of the player jump is not changed at all. Does anyone know how I can give the player a higher jump height? Thanks for reading! =)
  21. Ok, I guess I will play around with it some more and see if I can find a fix. I will post it if I find one. Also, Draco, why was my setVals method wrong?
  22. I tried this, however, when the blocks were placed, they were placed at the player's y-value, but when I closed Minecraft and opened it up again(all in the IDE of course), the blocks were set one y value lower(beneath the player's feet). Do you know why this happens and how I can account for strafing? Thanks =)
  23. My forge version is Build 1.6.4-9.11.0.884. I am creating a custom potion effect that places a brick block in front of the player, and when the player moves, the game changes the brick block to whatever type of block was there before. For some reason, when I use setBlock(int xPos, int yPos, int zPos, int blockID), the proper block is changed and the ID of the block is changed(I checked using world.getBlockID(int x, int y, int z)). However, the block is not physically loaded into the world i.e. no texture and no collision box. Does anyone know a fix for this? Here is my custom potion effect class that handles the commands: Thanks for reading and helping! =)
  24. YES! PlayerCapabilities.disableDamage turned out to be a public variable, so it worked PERFECTLY. Thanks a bucnh TGG =, you've really helped a lot with my mod so far. I will be sure to credit you and PM you when the mod is at least a good WIP.
  25. I am trying to make a potion effect that allows the player to not be attacked by hostile mobs. I don't have much code yet, but I was looking into some AI classes and I couldn't find a flag for if(!player.capabilities.isCreative). So, I was wondering if anyone knew how the game handles hostile mobs not attacking the player when the player is in Creative Mode.
×
×
  • Create New...

Important Information

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