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. The redstone repeater is a diode.
  2. Your Block dirt there is the same object as Blocks.dirt , you didn't create anything new with that code. Because setHardness looks like this: public Block setHardness(float val) { this.hardness = val; return this; }
  3. He wants to give the player an item (like an empty bowl) when they eat each of item various food items (like soup) without having to create a custom class for those food items. And the answer is no.
  4. That would be dumb and would violate the whole point of a public getter/setter wrapped around a private object.
  5. I still don't know why a batch file with "gradlew setupDecompWorkspace eclipse" in it isn't included, along with another one for IntelliJ.
  6. There's a good reason for that and that's because you haven't told Eclipse to load them.
  7. It absolutely exists. Vanilla does tags-within-tags for a ton of things. For instance, chunk data is an NBT tag that contains the NBT tags of all the entities in that chunk. Enchantments are stored as an NBTTagList, IIRC, as well. So yes, it absolutely exists. Whether or not the name has been de-SRGed, I don't know.
  8. stack.setTagCompound(new NBTTagCompound()); Like that. Its magic. You now have NBT data and can start storing things into it. stack.getTagCompound().setWhatever("Key",value);
  9. Uh huh. That would be the case.
  10. https://github.com/Draco18s/HarderStuff/blob/master/main/java/com/draco18s/ores/item/ItemOreDustSmall.java#L77-L98
  11. You mean, you aren't sure how to register a renderer for an Entity?
  12. You need two presses because of this: private boolean pressedLastTick = false;
  13. Draco18s replied to Asweez's topic in Modder Support
    There is NOT another way to so it. The static downward acceleration on entities is a hard-coded float value. Is not even a variable.
  14. See this bit here? See how it occurs after this bit here? Yeah, they need to be reversed. This is why you do not define your blocks, items, and fluids outside of a method.
  15. This one's easy dude. Look for references to "magic_gem."
  16. Nope. You need to draw all 12 edges.
  17. Single simple non-disruptive ASM hook in EntityItemFrame I suppose I could, but when it was reported, I looked into existing hooks and didn't find anything and said, "Actually, that effect is really neat, I like it." So yes, with some ASM I could "fix" the bug, but I thought it was a neat trick. It adds a little something to PvP servers. If someone finds your base where you've stashed all your stat boost items and breaks them, you're no longer so uber.
  18. You can't add a parameter to a function and expect it to get called by magic.
  19. Only sort of. If you're checking onUpdate how long its been since creation (rather than incrementing a counter every tick) then it's not free. As soon as the player breaks the item frame and picks up the food, it'll go rotten. But I know what you're thinking, it turned into a kind of "phylactery" effect for my Unique Artifacts mod. If a player found an item that increased their health (or speed, etc.) they could shove it into an item frame and get the bonus permanently. Wasn't something I could prevent so I called it a feature.
  20. Items in ItemFrames basically don't exist as far as Minecraft is concerned. There's no code that triggers when an item is placed into the frame (seriously, the item stack isn't told, the item isn't told, and there's no Forge event, and no update methods are called) or when the item frame is broken (although that causes it to drop, and now that the item is an ItemEntity, there is the onEntityItemUpdate method, which runs every tick, so you could check there).
  21. Changing the acceleration is easy, just divide or multiply the vec3 values when you assign them. As for buggy, I don't know. I do know that there's a vanilla bug that the motion/acceleration values aren't saved when the game unloads, causing fireballs to get stuck mid-air (despite being reported to Mojang back in 1.4.4, they didn't fix it until last week's snapshot, 15w36c).
  22. Vec3 pos = event.player.getPosition(event.partialTicks); Which event (from net.minecraftforge.client.event package e.g.) should I use? Oh yeah, sorry. I was using the DrawBlockHighlightEvent , but there's a handful of render events that would all be appropriate. And of course, this should be in a client side only event handler, for obvious reasons. I picked DrawBlockHighlightEvent because I was interested in the block that the player was looking at, and that event gave it to me, I didn't have to ray-trace it. That will draw a very specific line in the world, from the block at (0,5,0) to (5,5,0). Every world you create, no matter where you go, that line will be drawn in the same place in the world. But for testing? Sure, it'll work. That's left over from code I removed that determined what color to draw my line. For me, the distance was important, for you it isn't. You can remove that. Here's a pic of what I was doing: http://vignette1.wikia.nocookie.net/reasonable-realism/images/b/b2/2015-08-13_01.44.38.png/revision/latest?cb=20150814171720[/img]
  23. theBest108's post is useless, as the OP isn't getting a metadata value by which to rotate by. Anyway, take a look at BlockFurnace's onBlockPlaced method.

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.