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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. It doesn't work because you have a while loop that does nothing. It continually sets the spawn point to a fixed location. Then after it leaves the infinite loop, it sets the spawn to a random location. Also, thread.sleep is not how you make things happen across time. If you want something to occur across ticks, you need to count ticks in a tick event handler.
  2. return new ContainerTestChest(player.inventory, null); null here? seriously?
  3. Oh jesus christ. He went and copied a bunch of my classes rather than using them as reference.
  4. This is true, as well. However, I tend to do things like proxy.registerEventHandlers() , as I have event handlers on both logical sides, but I only need one on the client, so I put the server one in the CommonProxy and the client-only one in the ClientProxy and call Super(). I've done something similar with my item/block registration code for 1.10 so that creating any given block or item only takes two lines in my main class. registerBlockWithItem() registers the block and itemblock on the Common side, but on the client side it additionally registers models. It's not quite "do the same thing both sides" but that extra stuff needs to happen on the client.
  5. Umm... well, you see... I've never used the debugger and I do not know how to use it... In all classes? (Only in ContainterTestChest, TileEntityTestChest, GuiHandler, and gui_test_chest I mean) I meant the TileEntityTestChest class. Basically, clean up from the IInventory stuff. You should have just deleted the methods rather than removing the @Override. [me=Draco18s]checks something[/me] Hmm. Doesn't appear to be an option to clean up -> remove unused methods, but I could be overlooking it.
  6. Is it still crashing the same way? Post the crashlog, put a breakpoint here and run it in the debugger. Figure out what is null and why. Ancilary: remove anything that doesn't have an @Override on it, unless it's being called from something that does.
  7. No no, you don't need the CombinedInvWrapper at all. Just return (T) inputSlot;
  8. If by pink you mean this color: ████████████ Then it's likely just a corner section of the MISSING_TEXTURE texture.
  9. You don't need CombinedInvWrapper. Combining one ItemHandler into one ItemHandler is meaningless.
  10. You'll probably want to genericize that at some point so you aren't casting all of your blocks to their class. Either as an interface that supplies the registerItemModels method, or another way. For example, I have this for simple blocks: private void _registerBlockResources(Block block) { Item item = Item.getItemFromBlock(block); ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(block.getRegistryName(),"normal")); }
  11. Simplify down to a single ItemHandler. Right now you have a combined wrapper that's merging two or more handlers, one of which is outputSlotWrapper which is null (crashing the combiner).
  12. Look at the ItemStack class to find the new getters and setters.
  13. CommonContainer is my own class, you would know that by checking my imports. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/internal/CommonContainer.java
  14. I'd just tell you to take a look at all my sifter stuff. Block, Entity, Container, GUI and GUI handler.
  15. *facepalm* No. Not even close. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L136
  16. You haven't implemented getCapability on your TE yet.
  17. Well your ContainerTestChest needs to be updated too.
  18. You mean this? this.mc.getTextureManager().bindTexture(SIFTER_GUI_TEXTURE); int x = (width - xSize) / 2; int y = (height - ySize) / 2; width, height, xSize, and ySize are all defined by the super class. You can set new values in your class if you want, though.
  19. Yeah, I know, I get it. I'm just scratching my head and hoping someone (cough, Choonster) can come along and say "have you tried..?" Best I can offer is to attempt to debug the model loading code (but it's a right pain in the arse, especially trying to figure out where to put the first breakpoint, I've only managed it when I've had an error that I can jump-to-line for and place a breakpoint there).
  20. You don't need the getTime() stuff. My TE is a "furnace" yours is a chest (I don't have a straight storage block).
  21. Yes, I understand what you're doing and what you think is happening. What I'm saying is: something isn't working right, I don't know what, and that's why you get a MISSING_MODEL.
  22. Ugh. I detest that proxy layout. An interface is AWFUL here, especially when you want something done regardless of if it needs to be done on the client or on the server, you now have to have that code duplicated. A "good" setup looks like this: public class CommonProxy { public void doStuff() { //... } } public class ClientProxy extends CommonProxy { public void doStuff() { super.doStuff(); //... } }

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.