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. Why are people always so eager about re-inventing the wheel? Because then the wheel is yours. And as I said, only if you really really need it. It's highly likely you don't, but I had one use-case where there wasn't a more appropriate place to put data. I probably could have used worldSaveData , but due to the size it probably wouldn't have been a good idea. It was also good experience reading and writing my own NBT files, I learned a lot about some particulars of the Minecraft internals.
  2. The data I/O isn't that bad, if you really, really need it. All depends on what you're trying to do.
  3. an AABB has three dimensions: Length Width Height
  4. (I think you mean "can learn" ) But that's why that repository is public.
  5. Usually you want to pass 3 so that the change notifies neighbors. In this case a 2 is sufficient as the block placement alerted neighbors anyway.
  6. Dude. Stop. Right now. You do not know enough Java to fuck around with threads.
  7. You need a TileEntity for this. I've actually done this, see this class which will handle what you want. It's highly custom though and will allow redstone interactions within the zone (as well as allowing the breaking of some blocks, like webs).
  8. So you're looking for a block that does what, exactly? I'm not familiar with Bucket's precious stones block so you'll have to explain ( see panel 2).
  9. That was my guess, too.
  10. Soooo... are you looking for the FMLLogger? A compile directive? What?
  11. Ah, that could be. I've mostly not worried about it, as I can't trace it back to my code, thought it has been annoying at times.
  12. Ahhh, I see. I'm running my code on TickPhase.End, but if the main profiler section was already ended then its too late. Bummer. Any idea on "checkPosition < toCheckCount"? When I get a lot of lag in dev, that's the section that's using the most CPU (over a third of the total is root.tick, two thirds of that is root.tick.gameMode, two thirds of that is root.tick.gameMode.checkLight or about 17% of the grand total).
  13. System.out.println("Your message here")
  14. So I've wanted to try and get some details on how long some of my code takes to execute, and thought I'd hook right in to the Shift-F3 display and was able to dig up these calls (this being a location-agnostic call to the server's profiler) from where it is used elsewhere in the code: MinecraftServer.getServer().theProfiler.startSection("_NAME_"); MinecraftServer.getServer().theProfiler.endSection(); Though I've never been able to find any of the sections I name in the F3 overlay (and frequently see a lot of time spent in root.tick.gameMode.checkLight.checkPosition < toCheckCount , on the order of 17% of the entire game loop time, and which I have no idea what that even is). My code that I'm trying to profile is inside a tick handler, so it should be in root.tick somewhere. Anyone have any experience with this?
  15. There's also a few other ways, by overriding one of the three or so getLight() methods.
  16. It drops two (and you can only pick up one) because the code is called on both client and server. The item stack created on the client can't be picked up. Also what diesieben said.
  17. You will need to learn Java ASM. Resource packs cannot and will not do what you are trying to do.
  18. Get rid of public int metadir; Use setBlockMetadata when placing the block. A call to getBlockMetadata that you do nothing with is useless.
  19. That is not what static is for. If you want to save the direction as metadata, save it as metadata, which you're doing and then ignoring in favor of the static variable.
  20. (That's why I think its more accurate to refer to it as a "save" or "world save")
  21. On 2, look at the Iron Golem. There's an AITask that handles mob targetting and it's easy to find in the IronGolem's class. On 1, I don't think you're going to be able to accomplish that at your current skill level. Heck, I've peered into the void between worlds that is ASM and survived, and I am not sure where I'd even start to look for that.
  22. Is your block declared as being opaque? Are you rendering in pass 0?

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.