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. Override createStackedBlock for your Block class.
  2. No need for a tick event here, Potion class has isReady and performEffect methods which will be called. I meant the visual display next to your inventory where it contains a timer (the "duration"), not the effect.
  3. world.playSoundEffect(...) ? Also, have you even looked at how the Jukebox works?
  4. Integers are a fixed size. byteBuffer.writeInt(value)
  5. It's a client-side tick notification, it can be used to keep things like potion durations updating correctly without having to wait for an update packet from the server, keeps the sun/moon/stars sliding smoothly across the heavens, etc. You'll notice during periods of extreme lag that these values keep updating even though they're wrong and will "snap" back to the correct value when an update packet from the server does finally arrive (yes, even single player!). Or at least, that's what vanilla does in between Phase.START and Phase.END, what a mod does with it is up to the mod, but that gives you an idea of the kinds of things that occur.
  6. 0) Why are you still on 1.7.10? 1) You know that with just a block you can't rotate the top face, yes?
  7. How to send a TE through a packet: packet.Encode( TE.posX, TE.posY, TE.posZ );
  8. Read: What are you adding to the method signatures and why?
  9. Cake does not exist as an itemblock, you want Items.cake Mojang removed the "technical" block items that should never be in you inventory (like unlit redsome torches)
  10. I never do my recipes in init, I always do them in postInit for precisely this reason. That and IMC messages.
  11. What I'd actually do is in the addRecipe(string input, ItemStack output) method is get the OreDict stacks there and call addRecipe(ItemStack input, ItemStack output) so you're not looking up the OreDict every time the ingredient is checked.
  12. Well, on your Git repo your init is not calling super. Do that and nothing but that, then come back here.
  13. Why the hell do you need 22,821,109,907,456 states? That's more baked models than the game even supports.
  14. That effect can't be achieved without post processing. (And for reference, the effect is called "Bloom")
  15. Why the fuck are you calling initGui() from drawScreen() ?
  16. You will need a way to add a recipe taking in a string argument, instead of an item stack, and getting all of the item stacks from the OreDict that are registered with that string. OreDictionary.getOres(...)
  17. Someone is going to inevitably ask why you're still on 1.7.10, but anyway. Go look at what the furnace and FurnaceRecipes(?) does. Single input, single output recipes are really easy to make. It's essentially just a dictionary of Item In, Item Out.
  18. findNearestEntityWithinAABB will work, provided that the volume is actually large enough to contain anything. Anyway, looking up my old artifacts code, the method I used was rayTraceBlocks_do_do which did hit entities. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/network/PacketHandlerServer.java#L160
  19. Raycasting can detect enemies, sure. I don't recall offhand which method needs to be called, there's at least two.
  20. Also doesn't help that its my own block doing it.
  21. World#doRaycast
  22. Yes, and how large of a volume will the AABB between pPos and tPos be?
  23. Unless you're Rieka. Or unless there's a good reason, in which case: 1) Mark them @Deprecated for at least 1 version and throw a warning to the console/log 2) Do your best to handle the old way if you can (e.g. if a method name, location, or paramters changed, create the new method and have the old, deprecated version point to it with a best-guess default for new parameters). I've got a few of these, from when I went "this class is handling more than it should be, I'm creating a new API interface for these" and moved them. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/api/interfaces/IHardRecipes.java#L58-L66
  24. comment this: if(GlistreMod.config.hasChanged()){ Because fuck it, if it hasn't changed, save it anyway because who's going to notice.

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.