Expose DyeColor#colorValue, remove OnlyIn from all DyeColor methods

This commit is contained in:
tterrag 2019-10-04 01:39:37 -04:00
parent 48735c3946
commit fbdfc0f95c

View file

@ -1,6 +1,15 @@
--- a/net/minecraft/item/DyeColor.java
+++ b/net/minecraft/item/DyeColor.java
@@ -43,6 +43,7 @@
@@ -7,8 +7,6 @@
import javax.annotation.Nullable;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.util.IStringSerializable;
-import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.api.distmarker.OnlyIn;
public enum DyeColor implements IStringSerializable {
WHITE(0, "white", 16383998, MaterialColor.field_151666_j, 15790320, 16777215),
@@ -43,6 +41,7 @@
private final int field_196066_w;
private final float[] field_193352_x;
private final int field_196067_y;
@ -8,7 +17,7 @@
private final int field_218390_z;
private DyeColor(int p_i50049_3_, String p_i50049_4_, int p_i50049_5_, MaterialColor p_i50049_6_, int p_i50049_7_, int p_i50049_8_) {
@@ -55,6 +56,7 @@
@@ -55,6 +54,7 @@
int j = (p_i50049_5_ & '\uff00') >> 8;
int k = (p_i50049_5_ & 255) >> 0;
this.field_196066_w = k << 16 | j << 8 | i << 0;
@ -16,11 +25,39 @@
this.field_193352_x = new float[]{(float)i / 255.0F, (float)j / 255.0F, (float)k / 255.0F};
this.field_196067_y = p_i50049_7_;
}
@@ -120,4 +122,21 @@
@@ -67,7 +67,6 @@
return this.field_176785_v;
}
- @OnlyIn(Dist.CLIENT)
public int func_196057_c() {
return this.field_196066_w;
}
@@ -84,7 +83,6 @@
return this.field_196067_y;
}
- @OnlyIn(Dist.CLIENT)
public int func_218388_g() {
return this.field_218390_z;
}
@@ -108,7 +106,6 @@
}
@Nullable
- @OnlyIn(Dist.CLIENT)
public static DyeColor func_196058_b(int p_196058_0_) {
return field_196063_r.get(p_196058_0_);
}
@@ -120,4 +117,25 @@
public String func_176610_l() {
return this.field_176785_v;
}
+
+ public int getColorValue() {
+ return field_193351_w;
+ }
+
+ public net.minecraft.tags.Tag<Item> getTag() {
+ return tag;
+ }