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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 2.2 * 10-30 is definitely greater than zero. By about 0.0000000000000000000000000000022507
  2. Yeah, you're going to have to assign it more. Close everything you can, assign it about 1.5gb, and just let it do its thing.
  3. Player spawn gives no fucks about trees. It's only mob spawn that requires a full, non-transparent, block. And even then is on a mob-by-mob basis (most mobs don't override that default though).
  4. You've stated that you understand scope and how to step through code. Please show where the code is to fetch a new, random, spawn point and explain why it should be called during the second iteration of the loop.
  5. Create a constructor and call setSoundType(...)
  6. Something is null again. NPEs are very easy to solve. Go to the line that's crashing, find the thing that is null, work backwards to find out why.
  7. It's...a chest. You're not using outputSlot at all, for anything.
  8. Loot Tables. If you want to modify one, subscribe to the LootTableLoad event.
  9. If you add a block for UP, what about DOWN? NORTH? SOUTH? EAST? WEST? If they're all the same, why have an if statement at all?
  10. Going to stop you right there. You're wrong: That's your loop. "While the biome equals ocean or the block is water, setSpawn(spawnPos);" do { /*something } while(/*condition*/); You do not have a "while loop." You have a "do-while loop" and it ends with the semicolon. Those other three lines exist inside a block that is just a block. There's no wrapper conditional or anything on it. It's just a code block. public void someMethod() { //method block { //some unnamed block. perfectly valid code. } while(/*condition*/) { //loop block } }
  11. This. Is. Not. That. Hard. if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) Is this true? We're going to assume "yes" because it's the only capability we're dealing with and the capability we're interested in. if(worldObj != null && worldObj.getBlockState(pos).getBlock() != getBlockType()) Is this true? Well, no, because it'd straight return and that didn't test what we were interested in. if(facing == null) Is this true?
  12. No. Look at the method you have written, pretend that Facing.UP was passed in. What happens?
  13. So where, if even, should I use them? Or are they now useless methods? (I had them for something earlier) Remove them. What gets returned if facing equals EnumFacing.UP?
  14. You only return the ItemStackHandler inputSlot if either: a) the block at the TE's position isn't itself (this is error handling) b) the side passed is null Hoppers don't pass null for sides. (Also, you're not using outputSlot or outputSlotWrapper )
  15. You just have to put up with the fact that I call you a moron once in a while.
  16. inputSlot = new ItemStackHandler(10); //now you have 10 slots. Done.
  17. The ItemHandler that you're using only holds 1 item.* You're trying to display 9. *https://github.com/EcapeMC/ThingsMod-1.10.2/blob/master/src/main/java/com/github/escapemc/thingsmod/tileentity/TileEntityTestChest.java#L19 That constructor takes an integer argument for how many slots. No parameter is the same thing as passing 1.
  18. The difference between "adding one slot" and "add a whole slew of slots in a loop" is dirt simple. The index, xPos, and yPos just change from fixed values to variables. It's all just math.
  19. If only there was an example you could look at...
  20. 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.
  21. return new ContainerTestChest(player.inventory, null); null here? seriously?
  22. Oh jesus christ. He went and copied a bunch of my classes rather than using them as reference.
  23. 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.
  24. 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.

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.