Skip 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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. This will not happen, this is to ensure that potion effects are not changeable client side, for obvious reasons(it can and will be exploited). It is protected because Mojang had no use for it to be public, aka it wasn't intended to be used outside of an Entity. What is it that you are getting this for? This will not happen as this requires too much editing for a feature that will not really be used for much.
  2. Read it try to understand it, ask specific questions to try to understand it.
  3. I believe so, also the first string you pass in to the EnumHelper.addArmor will point to the name of the armor at "textures/entity/horse/armor/horse_armor_" + name
  4. Well then you could simulate that if you wanted to, most likely, but you could also as an alternative.
  5. Define animated if you mean like fire, return a different texture based on world time, if you dont you will have to manually render this in RenderLivingEvent.
  6. Try running it with only forge, also post your debug.log file. For the server and if you can get it the debug.log of one of your friends that time out.
  7. This isn't that hard actually. Just subscribe to DrawBlockHighlightEvent and render the lines of the bounding box you can look at how vanilla does it for an example.
  8. public String getHorseArmorTexture(net.minecraft.entity.EntityLiving wearer, ItemStack stack) Which exists inside the Item class.
  9. You can use a capability to store the loot box and a timer and you will have to sync this to all players within a certain distance. And use the RenderPlayerEvent to render the box/plane.
  10. Gui#drawModalRectWithCustomSizedTexture
  11. This is not true, openContainer is always the container the player has open, it seems to default to inventoryContainer instead of null. Try stepping through your code in the debugging when you are replacing the slots and when you are trying to put the item in the slot.
  12. Define render, do you want it to be a gui, an overlay on to the HUD, or an entity that only renders for the person who killed it?
  13. Is it ever calling the super method, is that returning false?
  14. Minecraft.getMinecraft().player
  15. Try removing the stack.isEmpty || part. If this is the case also use GuiOpenEvent and interact with EntityPlayer#openContainer, but only if it is not inventory container.
  16. Doing what I said if you do it correctly will not cause incompatibility with other mods. Edit: Also. Either way you would have to determine if the container had the hotbar. In case of my way all you would have to do is subscribe to the ContainerEvent.Open (might have the name wrong) and apply the search and change the slots.
  17. Make your own class and override the methods that allow you to drink it and apply the potion effect.
  18. You could modify Container#inventorySlots to change the mainInventorySlots to your own slots. Do this in EntityJoinWorldEvent by using the EntityPlayer#inventoryContainer field.
  19. Sadly not true. It doesn't fire for the players own inventory gui, at least in survival mode. You will need to modify EntityPlayer#inventoryContainer directly. Do this obviously, reflection is pricey. Not true, at least for the ContainerPlayer. It just doesn't allow you to shift click into the slot, but you can do so out of it. However this is true do to other mods messing with this Container. There should be some form of forge implementation around this as a proper method of doing this. @SuperKael If you do wish to do this Use OnEntityJoinWorldEvent to modify EntityPlayer#inventoryContainer and GuiScreenEvent.BackgroundDrawnEvent to render more onto the Gui if it can happen before the original gui is rendered, and if it needs to be after use GuiScreenEvent.DrawScreenEvent.Pre/Post
  20. I'm assuming that the inventory hasn't been created yet while you are trying to use it, but you see I cant say for certain because I dont know what you have done. Also you do not need the inventory in your capability at all for this.
  21. This line in your update method is causing the problem cookTime is never able to be incremented. You can combine this method and consuming fuel so you only need to call it once. There is no point in having this method in your Block class write the code in your TileEntity. You also need to override shouldRefresh and return true if the blocks are different, not the blockstates. As well as my aforementioned changes.
  22. What is the formatting on your code? Why is it all left aligned? It is such a pain to read. You have so many unnecessary methods in here. All you need are Block#onBlockActivated (to open the GUI), Block#breakBlock (to drop all the contained items), Block# hasTIleEntity, Block#createTileEntity, Block#getStateForPlacement (to apply the FACING property correctly), Block#getStateFromMeta, Block#getMetaFromState, and Block#createBlockState This method can be shortened massively, and I mean massively. Also it really needs to be formatted for me to look at without wanting to find a nice scenic cliff. You posted your Container class twice.
  23. getContainerItem(ItemStack) is a method signature, it refers to a method in the Item class. This is not a java tutorial forum learn java before you make a mod.
  24. Then in your items class override getContainerItem(ItemStack) and return the item you want to remain in your Recipe.

Important Information

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

Account

Navigation

Search

Search

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.