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. EntityMotion += (BlockPos - EntityPos) * 0.1f; //simple and arbitrary. Hooray vectors! Breakdown: (BlockPos - EntityPos) results in a vector from Entity to Block, with a magnitude of the total distance. * 0.1f results in a vector 1/10th this distance, still pointing from Entity to Block. EntityMotion += add this directed vector to the Entity's motion, pushing it towards the Block.
  2. That's not how the OreDictionary works. The OreDictionary works on the basis of equality. "Does this item stack, registered as 'OreIron' work in this recipe? Why yes, the recipe looks for 'OreIron,' so this stack is valid." It doesn't convert things, it just treats them as equal. It's kind of like Coal and Charcoal being equivalent for the purposes of making torches and smelting ore, but they don't stack. (Not withstanding mods creating a distinction so that you can turn coal into diamonds, but not charcoal, as the latter is renewable).
  3. So how would I do this? EDIT: Also, why do you not recommend it? Locate the class, TextureAtlasCompass if I recall the class name correctly. It's how vanilla renders the compass texture (there's also one for the clock). This should be sufficient information necessary to display the correct portion of your texture file. The reason I don't recommend it, however, is that if things go south (crashes, bugs, etc) it is very hard to diagnose as the stack trace will not contain this custom class (it will be elsewhere and merely calling properties of said class). For a two-state texture file you're probably fine. Note: I am presuming that these classes still exist for 1.9 based on my knowledge of 1.7.10 and what I know about the changes made to the rendering engine: that is, I assume that there is still a class that interprets a multi-frame texture file for the clock and compass, rather than as an animation.
  4. Probably because its an event fired from the player related classes.
  5. You need a custom TextureAtlastSprite. I do not recommend.
  6. Post code and picture.
  7. There's also no reason to close the topic.
  8. Java actually doesn't care. There's all kinds of interfaces ( Comparable ) and subclassing that you/Forege/Mojang could be doing and aren't that would allow the two types to be compared meaningfully. There's no way for the IDE to determine that.
  9. I wonder what these do. this.perlinHeight = new NoiseGeneratorPerlin(rand, 4); (double)this.settings.stretchY float f5 = this.settings.biomeDepthOffSet + biomegenbase1.getBaseHeight() * this.settings.biomeDepthWeight; float f6 = this.settings.biomeScaleOffset + biomegenbase1.getHeightVariation() * this.settings.biomeScaleWeight;
  10. I suspect that you're using Vanilla's renderer for this and it does a "if block is X { render standing } else { render wall }" type check.
  11. If you're trying to charge another mod's items, there is no need to mess with the durability bar. That should happen on the other mod item's end. YOU just need to use the existent API to call ISomeInterface#someAddPowerMethod on the item (you will need to explicitly cast the Item)
  12. Specifically, <Class>#<method> refers to a method that requires an object instance, rather then a static method.
  13. I think having equals(null, null) return false is even more misleading. ...Fair. I was probably tired and not thinking.
  14. Ah, darn again. The other option is to write a custom ISimpleBlockRenderingHandler...which might run into the same issue. Hmm.
  15. container != Container
  16. Notunknown is correct. The class name got changed.
  17. That's going to be on your multiblock detection code, you'll identify a "top left" and set that one to clock:1 and work outwards from there.
  18. [me=Draco18s]facepalm.[/me] if(stack1 == null || stack2 == null) return stack1 == stack2; You should just return false here. Passing two null stacks and getting a true is misleading (would you EVER want to do anything with two null stacks?), where as a single null stack and a not-null stack will always return false.
  19. Post your Block code
  20. I'm not sure how to make the rendering update just because the player changed survival/creative off-hand, not without using a TileEntity and a TESR. You could try looking at--wait, nevermind. The barrier block was added in 1.8

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.