Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FLUFFY2

Forge Modder
  • Joined

  • Last visited

Everything posted by FLUFFY2

  1. Hello there, I have a problem with my custom mob AI. I try to make it so it can only attack you if he sees you. So if its too dark he can only see you if you are close enough. If its light he can only see you if he saw you. I tryed the following but its not worked: if(par1World.getLightBrightness((int)this.posX, (int)this.posY, (int)this.posZ) >= 4 && getEntitySenses().canSee(player)) this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); if(par1World.getLightBrightness((int)this.posX, (int)this.posY, (int)this.posZ) < 4 && getEntitySenses().canSee(player) && getEntityAttribute(SharedMonsterAttributes.followRange).getAttributeValue() >= 5.0D) this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); Thanks!
  2. Hello there. There is any news or release dates for forge 1.7.9? Coz i see forge 1.7.2 kinda stable now and a lot of mods has been updated now. Thanks!
  3. Well i don't have an extend ItemBlock class. Only extend BlockContainer. And the @Override is gives an error.
  4. Hello everyone! I want to add informations to my blocks. In items i found "addInformation()" and it works. But for ItemBlock what should i use? There is no "addInformation()" there. Thanks for helping!
  5. I have a battery item once its crafted it has no power(fully damaged). You recharge it in a crafting table and its powered(not damaged). You can stack up to 16 but only powered or not powered can stack because of the metadata. The proble is if the powered is in the inventory and the not powered is in the hotbar you shift click and they stuck up so the powered gets no powered. Same if you drop not powered and powered on the same spot they got stacked up again. I thik thats a bug that not damaged items stuck up with damaged items and change their metadata. The only fix is to set the item max stack size to 1.
  6. Its working now! Many thanks to you!
  7. Thank you for that, but even if i try with a simple: return 0.8; Its still not showing up the 80% damage bar.
  8. @Override public double getDurabilityForDisplay(ItemStack stack) { return (double)getOilLevel(stack) / (double)Lantern.lanternFuelCapacity * 60; }
  9. You guys don't understand me. Sorry if i wrote it down wrong. I have a fuel system saved and loaded from NBTs. I don't useing damage value as fuel storing. I only want to use it for visual not for functional reasons. I use the method what diesieben sent me. I got the fuel from the NBT and devide it by the max fuel value that the item can store. There is no metatdata used! So the resoult is a number between 0,0 and 1,0. I read 1.0 mean damage bar 100% and 0.0 means 0%; But that display method not working and there is no "visual damage bar" shown. Again there is no item damageing happening in the background. Forget my previous code.
  10. Its a realy bad idea to modify base classes because it can make compatible issuses with other mods. Forge has many hooks that you can use now. But in 1.7.2 forgegradle you can't edit because its protected.
  11. Seriously, what the hell? So the method looks like this: @Override public double getDurabilityForDisplay(ItemStack stack) { return (double)stack.getItemDamageForDisplay() / (stack)stack.getMaxDamage(); } But if i get the fuel stored in NBT data and run trough a calculation that uses itemstack.setDamage(calculation(oil)) in onUpdate it still bounces when the damage bar is mooving. So please can you show me a little piace of code for me? I would apprechiate it!
  12. Thank you diesieben! But how am i supposed to use this? I get the current fuel level divided by the max fuel level. In the onUpdate method i put "getDurabilityForDisplay(par1ItemStack)" to update the damage bar. But no damage bar shown. I saw 1.0 means 100% so i just simply return 1.0 but still not showing the bar. Thanks anyway!
  13. Mayebe i should try out overlay gui. Its getting popular nowdays.
  14. You have to take your time and learn a bit then. Once you got it you can do realy cool stuffs.
  15. Its realy easy once you understand them. I used this and worked like a charm. http://www.minecraftforge.net/wiki/Netty_Packet_Handling
  16. Hello everyone! I have an item that requires fuel saving its data to NBTs and its working. I want to use the damage bar as a fuel bar. I have already wrote a quick calculation thats updates the fuel bar. The only proble is the item is unequipping and equipping because of the update. Its updateing every 1 second and not every tick. How can i slove this problem? super.onUpdate and !par1World.isremote not help. Can i save damage value into NBT datas and display that somehow? Thanks!
  17. Great new! Updated to Forge .1057 and it looks like i don't even need AT anymore. They made the field public for us. Thank you guys!
  18. Wait it has to be modid_at.cfg or anything_at.cfg?
  19. Yep i read that too and tryed it, but not working for me. There is any free src for a mod that uses AT?
  20. Yes. When i start gradlew build its say that access transformer was found.
  21. FML log(latest): https://gist.github.com/anonymous/10125856 And my _at.cfg is in the resources folder not in my assets.
  22. Please i realy need this. I can't release my mod because the crash.
  23. There is it and its tells that my mod can't access that field coz my AT isn't working.
  24. Changed to: @Override public String getAccessTransformerClass() { return "com.fluffy.lantern.asm.LAFAccessTransformer"; } Still crash.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.