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.

Failender

Forge Modder
  • Joined

  • Last visited

Everything posted by Failender

  1. there are several worldobjects that exist while playing minecraft. so u cant just take any worldobj and say thats the one i need. it depends on why u need it
  2. so. there are two ways. tell us why u need an worldobj. or we cant help.
  3. how do u call getCoolDown and why do u need an worldObj there.
  4. show the methods where u need it, nad most likely we will be able to show u where u get the worldObj from.
  5. because everywhere where u dont got an access to an worldObj u will most likely not need it.
  6. Alright. Managed to do a lot. (Apparently strg v code messes up the formatting a bit) Created my own class, which does nothing but reduce the inventory size. Applied the inventory every time the player joiins the world. Two problems I got right now. 1. The player picks up items, even though his inventory is already full. I am confused, this shouldnt happen since the important methods of InventoryPlayer seem to always iterate over mainInventory.length 2. The hotbar only updates after opening the custom gui public class InventoryPlayerCustom extends InventoryPlayer{ public InventoryPlayerCustom(EntityPlayer playerIn) { super(playerIn); mainInventory = new ItemStack[18]; } } @SubscribeEvent public void joining(EntityJoinWorldEvent event) { if(event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entity; player.inventory = new InventoryPlayerCustom(player); } } EDIT: I guess I could be fixxing the 2nd problem by rendering it on my own, but I dont understand it. Normally the hotbar renderer should access the first 9 slots in the InventoryPlayer, where InveotryPlayer is my class and the first 9 slots shouldnt be out of sync
  7. Look how vanilla synchronizes the furnace.. ContainerFurnace
  8. Hello guys, I am triing to change the size of the player inventory. He can upgrade it later so it gets bigger again. I would render the inventory gui on myself later. My problem is the setting of the inventory size. I thought using the entity construct event would allow me to do so, but im wrong. First problem is, that at the time the event is fired the player.inventory is null (which makes no sense to me, since it is initialized via public InventoryPlayer inventory = new InventoryPlayer(this) If I set the inventory myself via player.inventory = new InventoryPlayer(player); it gets overriden by vanilla. So my question is: How can I change the size of the inventory of the player? Do I need to create a custom class, overriding the inventory? Where do I need to apply my changes? Mfg Failender
  9. only do changes on important stuff on server side (!worldObj.isRemote) . if u need those values on client side sync them. (packets or Containers got an additional way of syncing when they are opened)
  10. dont mod when in a rush. saying "I only got five minutes left" will bring you nowhere. send the packet. when receiving the packet send the value to the opened gui.
  11. u can. but u dont. because thats total bs.
  12. http://www.minecraftforge.net/forum/index.php/topic,20135.0.html
  13. dont know about that error, but why are u taytracing three times thats waste of processing time. raytrace once, save the result, read x/y/z from it
  14. You need this in a gui right? U dont need packets then. use detect and send changes. there u can use crafter.sendProgressBarUpdate. look at vanilla furnace for example
  15. bump after less then 3 hours? seriously?
  16. you dont need to store an entire object to know of the spawner. just save the x/y/z of the spawner in the attributes and access the spawner when you need it (when the mob despawns)

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.