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. There are only two passes: pass 0 and pass 1. Pass 2 will never happen.
  2. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/item/ItemArtifact.java#L106-L108
  3. Also, stackTagCompound is null by default. You need to create one, then add attributes.
  4. I'd tell you to copy the calculation and do it "manually" but there's a slight problem: If the target block has a different break speed than the one the player is actually mining, it's either going to break and drop early, or not finish.
  5. Well, insert some debugging statements and figure out what the program is doing.
  6. I don't have enough of your code to know what you're doing with the NBT.
  7. Your code never sets the NBT tag to have a value for "icon"
  8. Writing to the NBT causes Minecraft to believe that the item stack is a new item stack and therefore interrupts any in-use actions.
  9. AFAIK you don't have to include the "Default: False" portion, as the config class supplies that on its own.
  10. Encode the timer into the armor's NBT. Save the world time that the ability was used, then do if(world_time - saved_time > some_delay) { //ready }
  11. Depending on what keyboard event your listening to, you're likely asking isKeyDown(key) which will be true for the entire duration that the key is pressed. Which as the code runs 60+ times a second* and a press lasts a tenth of a second...that's at least 6 calls. *Pretty much as fast as the program runs, not tied to game ticks in any way.
  12. That is the most funniest thing I have read in a loong while Here's a rebuttal.
  13. Just double check that it compiles properly, too.
  14. Neither can most people. If that doesn't fix it, git.txt contains the phone number of a friend of mine who understands git. Just wait through a few minutes of 'It's really pretty simple, just think of branches as...' and eventually you'll learn the commands that will fix everything.
  15. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/item/ItemArtifact.java#L111-L133
  16. Well originally I was trying to display ♥ which is U+2665, and despite saving the lang file as UFT-8 it never worked properly. Kept showing up as two other characters. More recently I wanted ″ and ㎝ for WAILA info tips. Which, again, refused to work properly. Anyway, I was mistaken, those are still UTF-8. Point was, there were issues using characters from that set and I had to go to extra lengths to get them to display properly.
  17. And did you tell Eclipse to use that workspace?
  18. (UTF-16 does not save to UTF-8 While UTF-8 might be sufficient here, it is not a complete solution)
  19. Just because that's where Eclipse is doesn't mean that's where it's looking for the project file. Its like saying, "Word can't open my doc file, but it's right there next to word.exe, but I run Word and nothing! Blank!"
  20. Air drag is 2%. That is, velocity is multiplied by 0.98 every tick.
  21. 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
  22. 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.

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.