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. Air drag is 2%. That is, velocity is multiplied by 0.98 every tick.
  2. Most of the things you program in your life will be "dirty workarounds." Some of them (like this one) is called a "helper method." http://www.stilldrinking.org/programming-sucks
  3. Newlines aren't supported in the language files. Extended character sets (like UTF) are also...less than supported. You'll find that it'll work fine in dev, then you'll compile, and it won't work. So the § symbol that Minecraft uses for colors likely won't work either. You'll have to find a substitution string to use in the lang file which you'll extract after translating the untranslated version, and replace with the desired symbol (e.g. EnumChatFormatting.WHATEVER ). I had to do this to get the degree symbol (°): //class initialization //translate from UTF-16 hex to a string of (8-bit) chars. int codePoint = 0x1D3C; char[] charPair = Character.toChars(codePoint); /*public static string*/ deg = new String(charPair); ... //waila tooltip method: currenttip.add(StatCollector.translateToLocal("description.temperature") + ": " + val + deg); And from another project where I wanted to let a symbol be used in the lang file, which was then formatted (this is closer to what you're doing): #Lang file #Comments in lang files are denoted by the # at the front of the line #{H} here will use a UTF heart symbol effect.Hearts={H} //Item tooltip String heart = StatCollector.translateToLocal("effect.Hearts"); heart.replace("{H}", EnumChatFormatting.RED + ((char) 0x2665)); par3List.add(StatCollector.translateToLocal("effect.Health Boost") + " " + EnumChatFormatting.BLUE + "+2.5 " + heart); § is the "section" character. ¶ is paragraph.
  4. Simply: You can't use the vanilla cauldron. It does not have a TE and you need a TE to store items.
  5. Well, when you right-click the block with the item, store data in the stack's NBT tag.
  6. Why are you trying to render 2D and 3D things on the same event?
  7. You're going to have to debug. It looks like the UUID isn't saving or loading properly so it ends up as null.
  8. I don't know, but line 113 of the Scythe appears to be checking for equality, not actually doing an assignment (or...whatever its supposed to be doing, as that line accomplishes nothing). My guess is that the code is running both server side and client side, causing duplication.
  9. override getBlockRelativePlayerHardness (iirc the method name correctly, search the Block class)
  10. Well, get ready to learn. http://www.falloutsoftware.com/tutorials/gl/gl3.htm The Tessellator is just a wrapper around the OpenGL calls. There are other ways to use OpenGL than drawing quads, the Tessellator just forces quads because that's what it's used for.
  11. #2 has to do with the fact that the block decides on its own metadata after being placed, ignoring the metadata passed to the setBlock method. Just do world.setBlockMetadata(...) afterwards.
  12. isRemote (a property) is used when you're performing logic updates, where the server has precedence and sends updates to the client. side (an annotation) is used when you want to remove a method, class, or field entirely when it is loaded on the other side.
  13. See, your hashmaps are useless. this.addToBaseMap(this, baseBlock); //this serves no purpose If you have the block that is the key in that map ( registry.baseBlockMap.get(theBlock) ), you can just do theBlock.baseBlock and get the same thing. What you should be doing is storing a block1 -> block2 map where block1 is "this" and block2 is the next density (or whatever) down after its mined. Then you just have to create the blocks in the correct order (densest to least dense) adding to the map as you go.
  14. AFAIK that is an accurate statement.
  15. Its still a terrible, terrible loop. I'm almost certain there is a collection that would suit your needs better than a HashMap which you aren't even using as a hash map. You're treating them as arrays for no good reason. Because seriously, currentOre.ore.equals(registry.oreMap.get(inputBlock)) //being true could be done by currentOre = registry.oreMap.get(inputBlock) AFAICT.
  16. You can't do that in the json file, you need to do that in a custom renderer. BakedModelQuad, iirc.
  17. No, not really. It's way easier to destroy a project that has a database.
  18. Ok....what are you using meta for, then?
  19. Trying to have more than 16 density values is probably messing you up.
  20. I do not even know WTF you're doing here.
  21. Or if you do, count down. Because you removed an element, the next one is at the current index, which you increment before looking at a new element.
  22. Aside from the fact that I'd originally needed some slight customization between the different ores (which has become less and less needed) you can do it all through one class. You just need to push enough things into the constructor (or have setters).

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.