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. Draco18s replied to leosavi25's topic in Modder Support
    Yes. Specifically:
  2. Why the hell are you storing your TE's position? TEs already do this, that's what getPos() does.
  3. There are server side player events, but the player's motion is always 0 (because the client is the authority, the server ends up just teleporting the player to where the client says the player should be).
  4. That is your "commit the changes to the world somewhere" line. You're done. The only thing wrong with your code is that instead of using LivingUpdateEvent you should use PlayerUpdateEvent. Also, those updates have Phases, you should check for one of them (START or END). You should probably also do an if(!world.isRemote) check, just to insure you're on the server. Have you tried the debugger?
  5. Here's an example (of supplying it) in a TE. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntityMillstone.java#L176-L178
  6. Look at how the potion accomplishes what it does.
  7. What, no. You should not need to do this. Looking at some old code of mine, you shouldn't even need a cast: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/industry/inventory/ContainerFilter.java#L34-L40 Called from: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/industry/GuiHandler.java#L29
  8. Look at the jump boost potion and the slowness potion.
  9. Line 30: this.addSlotToContainer(new Slot((IInventory) player, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); Player is defined as an EntityPlayer on line 22: ContainerPestle(TileEntityPestle tileentity, EntityPlayer player) { //CustomSlots This cast makes no sense and that is why it crashes.
  10. Draco18s replied to leosavi25's topic in Modder Support
    This is what you need to do:
  11. Draco18s replied to leosavi25's topic in Modder Support
    Follow these steps and everything will work out: 1) Go learn Java 2) Come back and look at your code 3) Profit
  12. new Slot((IInventory) player, ... The fuck are you casting an EntityPlayer to an IInventory for?
  13. It's a Capability. Vanilla doesn't use it, but there are wrappers around all of the IInventory implementations that return an ItemStackHandler. Not sure how you'd go about making it do its thing in this case, though.
  14. Wait, what? Why aren't you just overriding onNeighborChanged and checking to see if the block below has Material.AIR?
  15. You will probably need a custom ItemStackHandler class that prevents the extraction.
  16. world = player.getWorld(); //now you have everything you need
  17. Ok, the ItemStack.EMPTY was added in 1.11 I believe. Yes, in 1.10 you still need to manage your own destroyed stacks.
  18. state = world.getBlockState(pos); //this gets you the IBlockState (Block + Metadata combination) block = state.getBlock(); //this gets the Block (no metadata)
  19. I think he means things like this: for(int x = 0; x < 9; ++x) //Hotbar this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142 ));
  20. Rendering obj models means "put the obj path reference in your json model" and call OBJLoader.INSTANCE.addDomain(Refrence.MOD_ID);
  21. A stack of size 0 (but still with some other item) won't == ItemStack.EMPTY but it will still resolve .isEmpty() as true.
  22. What version are you on? Because in the current versions, this problem no longer exists (stack size 0 stacks are treated the same as AIR / EMPTY).
  23. https://dzone.com/articles/java-string-format-examples The translation system runs the result through String.format
  24. You need to register a custom mesh definition for your item. Registration: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L127-L129 Implementation: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L87-L118

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.