Clean up a lot of obfuscation helpers and impls
This fixes a bug with obfuscation helpers for attack cooldown But every other change should stay the same. Cleaning up a lot of helpers that pointed to already unobfuscated items. Also adds final to many of the obfhelpers to assist with inlining. This is pretty much a patch maintenance
This commit is contained in:
@@ -17,14 +17,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return getEnchantmentLevel(Enchantments.CHANNELING, itemstack) > 0;
|
||||
}
|
||||
|
||||
+ // Paper - OBFHELPER
|
||||
+ public static @javax.annotation.Nonnull ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) {
|
||||
+ Entry<EnumItemSlot, ItemStack> entry = b(enchantment, entityliving);
|
||||
+ return entry != null ? entry.getValue() : ItemStack.NULL_ITEM;
|
||||
+ }
|
||||
@Nullable
|
||||
public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
||||
- @Nullable
|
||||
- public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
||||
+ public static @javax.annotation.Nonnull ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) { Entry<EnumItemSlot, ItemStack> entry = b(enchantment, entityliving); return entry != null ? entry.getValue() : ItemStack.NULL_ITEM; } // Paper - OBFHELPER
|
||||
+ @Nullable public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
||||
return a(enchantment, entityliving, (itemstack) -> {
|
||||
return true;
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||
@@ -33,12 +32,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
}
|
||||
|
||||
+ public int durToXp(int i) { return b(i); } // Paper OBFHELPER
|
||||
+ public final int durToXp(int i) { return b(i); } // Paper OBFHELPER
|
||||
private int b(int i) {
|
||||
return i / 2;
|
||||
}
|
||||
|
||||
+ public int xpToDur(int i) { return c(i); } // Paper OBFHELPER
|
||||
+ public final int xpToDur(int i) { return c(i); } // Paper OBFHELPER
|
||||
private int c(int i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user