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. I dont have any code at the moment so I cant tell you what to do exactly, but look at how BlockLeaves works.
  2. In the events replace the gui or container, or in your GuiHandler.
  3. slotIndex is the inventory slot that the Slot represents. slotNumber is the index of the Slot in the Container . If a Container has slots from two inventories (e.g. a chest and a player), slotIndex will be 0 to X for the first inventory and 0 to Y for the second inventory, while slotNumber will be 0 to X+Y. I don't think there is. Ah, okay! That makes sense; thanks for the explanation. I wish I could make stack transfers work, but honestly, it's such a small detail that it's not worth remaking the enchantment container entirely just for it. Players will have to be content with click-and-drop Thanks again! Just extend ContainerEnchantment and GuiEnchantment and override transferStackInSlot in the container. Ahh the wonders of OOP.
  4. Another way to do this would be like Extra Utilities. Having a master pipes and "slave" pipes.
  5. How do we help without seeing the stack trace (the log)?
  6. Create your own custom Material then one that will allow you and give you what you want. Just how to make a material which is solid, but you can move through it and it has something like air, that no shadows are thrown. I have no idea how to create such a material, even after looking into the Material class. Sadly i do not have any code available at the moment (school) so i would keep messing around with it until some makes a suggestion.
  7. Create your own custom Material then one that will allow you and give you what you want.
  8. You will also have to subscribe to the GuiOpenEvent not sure if there is a player specific version, but you need to replace the whole gui displayed because the container slot there doesn't have you slot it has the original.
  9. Ah! Sounds like the elegant way to do it, thanks! Unfortunately, it's not quite working. It's behaving oddly: it will occasionally accept the stack of amethysts (the gem item I'm trying to make it accept), but it usually won't. When I try placing the amethysts in the slot and it doesn't accept it, my player's hand blinks in the background as if switching items, even though I'm not. And if I double-click in the lapis slot with amethysts, even when it doesn't accept them, it'll still pull a full stack from my inventory as if the gems were properly in the slot. Here's my event handler code: @SubscribeEvent public void onOpenContainer(PlayerContainerEvent.Open ev) { Container cont = ev.getContainer(); if (cont instanceof ContainerEnchantment) { ContainerEnchantment ench = (ContainerEnchantment) cont; Slot newSlot = new Slot(ench.tableInventory, 1, 35, 47) { List<ItemStack> ores = OreDictionary.getOres("gemLapis"); /** * Check if the stack is a valid item for this slot. Always true * beside for the armor slots. */ public boolean isItemValid(@Nullable ItemStack stack) { if (stack.getItem() == Amethystic.items.AMETHYST) { return true; } for (ItemStack ore : ores) if (OreDictionary.itemMatches(ore, stack, false)) return true; return false; } }; ench.inventorySlots.set(1, newSlot); } } Am I missing something here? Are you talking about shift clicking or normally placing the item into the slot? Could you show some images?
  10. you would have to override the vanilla ContainerEnchantment with your own custom one.
  11. I already have a playerList that I iterate through ... is there a way to just change what I have so it won't send the message if it already sent? I added a range which at least stops the spamming in chat and console of the message, but seems to add lag to the game double inRange = this.getDistanceSqToEntity(entityplayer); if ( inRange < 1000.0D & inRange > 900.0D){ You want to send a message when your entity spawns but only once it spawns, create a boolean value on the entity and save it to NBT.
  12. Power systems are relatively simple in nature. You need 'machines' that can recieve power, 'generators' which generate power, and some way of transfering that power. Meaning atleast the old way you need three interfaces one for generators that allows you to extract power from it, another one for machines that allows input, and one that allows for both input and output. The way you handle the input and output is all up to you. There is another way, you can achieve this with capabilities there is an EnergyHandler (i believe that is its name) that you can give TileEntities and which is basically a forge energy network.
  13. "Create the subject"? What does that mean? "Put a seperate unit"? This aswell. Do you want it to function like a cake or like the vanilla potions.
  14. You would need to intercept the right clicking of the item either with an event or if it is your own item Item#.nItemRightClick(...). And in that you need to simulate left clicking either with the item probably manually.
  15. Show what you have.
  16. Instead of nbt.setTag and the reading equivalent just set the nbt parameter to the one from the ItemStackHandler
  17. Sorry, ContainerSifter. I should check the cart.....Cart works fine. The github link's ContainerSifter does not contain the transferStackInSlot method.
  18. I have personally had this alot, to me that method seems to be very fickle. You never stated which container it was...is it ContainerOreCart? When does it happen when shift clicking your slots or the players inventory slots.
  19. I do need a two output, and it is crucial to my mod. So even if it is difficult, I need to find a way to get is done. The only difference between the vanilla furnace and what you have described is the output s9 i would thoroughly read through the furnace files mainly the tileentity, block, furnace recipes, and as Draco18s stated prior to me the json files.
  20. You have to replace the instances with your own custom ones.
  21. I may be mistaken, but why dont you just add your AxisAlignedBB into the List parameter in Block#addCollisionBoxToList(...)
  22. So you have multiple blocks placed? If do i would ask why it is only reading and writing once in the log. Post the whole log.
  23. Do you happen to have two tileentities placed or is it just sending the packet twice? Also i do not see anythi g wrong with your reading and writing or getUpdatePacket and onDataPacket.
  24. Define work partly and problem.

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.