Current time: 01-18-2018, 01:54 PM Hello There, Guest! (LoginRegister)
Post Reply 
Keepsake Rank and Curse of Vanishing
10-25-2017, 07:05 PM
Post: #16
RE: Keepsake Rank and Curse of Vanishing
(10-25-2017 09:55 AM)Gary_S_Modd Wrote:  curses and enchantments are treated the exact same way internally... not sure where you got the miss-information about that not being the case
the only difference is that they have coded that they appear red in the enchantment list of an item...

Yes, they are both handled via the net.minecraft.server.Enchantment class if that's what you mean. But method "public boolean d()" (in my decompiled version of 1.11.2.whatever), which returns false by default in the base class, is overwritten with "return true;" in the subclasses that are considered a curse. That is clearly a distinction, no?
Find all posts by this user
Quote this message in a reply
10-25-2017, 07:58 PM
Post: #17
RE: Keepsake Rank and Curse of Vanishing
Huh... Fredi ur talkin tech words again, I didn't understand a word u said. Sorry.
But ur the tech man here so I will leave it to u... and trust u know what ur talking about.

[Image: qT1sCOB.png]

Find all posts by this user
Quote this message in a reply
10-26-2017, 08:39 AM (This post was last modified: 10-26-2017 08:39 AM by Gary_S_Modd.)
Post: #18
RE: Keepsake Rank and Curse of Vanishing
(10-25-2017 07:05 PM)FrediW Wrote:  
(10-25-2017 09:55 AM)Gary_S_Modd Wrote:  curses and enchantments are treated the exact same way internally... not sure where you got the miss-information about that not being the case
the only difference is that they have coded that they appear red in the enchantment list of an item...

Yes, they are both handled via the net.minecraft.server.Enchantment class if that's what you mean. But method "public boolean d()" (in my decompiled version of 1.11.2.whatever), which returns false by default in the base class, is overwritten with "return true;" in the subclasses that are considered a curse. That is clearly a distinction, no?
yes, while true, here is the only thing it changes:
Code:
public String d(int i)
  {
    String s = LocaleI18n.get(a());
    if (isCursed()) {
      s = EnumChatFormat.RED + s;
    }
    return s + " " + LocaleI18n.get(new StringBuilder("enchantment.level.").append(i).toString());
  }
this is just saying that if its cursed, make the enchantment's name red.

~Astrorious
[Image: 49679_s.gif]
DA|YT
Find all posts by this user
Quote this message in a reply
10-26-2017, 01:12 PM
Post: #19
RE: Keepsake Rank and Curse of Vanishing
(10-26-2017 08:39 AM)Gary_S_Modd Wrote:  this is just saying that if its cursed, make the enchantment's name red.

Yes, and additionally our plugin uses that method now to find out if it's a curse or an enchantment in the traditional meaning. It's a really useful function. Smile
Find all posts by this user
Quote this message in a reply
10-26-2017, 02:07 PM
Post: #20
RE: Keepsake Rank and Curse of Vanishing
That is fancy, Fredi :3

Proud founder of Aramore, CV 6.0 First Premium Town
[Image: d6MHspO.png]

Founder of Oracle, Savannah and Edge of Nowhere (EoN)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)