Make SpawnPlacementType extensible, remove from ArmorMaterial

This commit is contained in:
tterrag 2019-02-18 12:03:02 -05:00
parent e47fa70279
commit 3fa507d6d1
2 changed files with 7 additions and 23 deletions

View file

@ -8,13 +8,17 @@
field_209347_a.put(p_209346_0_, new EntitySpawnPlacementRegistry.Entry(p_209346_2_, p_209346_1_, p_209346_3_)); field_209347_a.put(p_209346_0_, new EntitySpawnPlacementRegistry.Entry(p_209346_2_, p_209346_1_, p_209346_3_));
} }
@@ -109,5 +110,20 @@ @@ -106,8 +107,23 @@
public static enum SpawnPlacementType { }
}
- public static enum SpawnPlacementType {
+ public static enum SpawnPlacementType implements net.minecraftforge.common.IExtensibleEnum {
ON_GROUND, ON_GROUND,
IN_WATER; IN_WATER;
+ +
+ public static SpawnPlacementType create(String name, net.minecraftforge.common.util.TriPredicate<net.minecraft.world.IWorldReaderBase, net.minecraft.util.math.BlockPos, EntityType<? extends EntityLiving>> predicate) { + public static SpawnPlacementType create(String name, net.minecraftforge.common.util.TriPredicate<net.minecraft.world.IWorldReaderBase, net.minecraft.util.math.BlockPos, EntityType<? extends EntityLiving>> predicate) {
+ return null; + throw new IllegalStateException("Enum not extended");
+ } + }
+ +
+ private net.minecraftforge.common.util.TriPredicate<net.minecraft.world.IWorldReaderBase, net.minecraft.util.math.BlockPos, EntityType<? extends EntityLiving>> predicate; + private net.minecraftforge.common.util.TriPredicate<net.minecraft.world.IWorldReaderBase, net.minecraft.util.math.BlockPos, EntityType<? extends EntityLiving>> predicate;

View file

@ -1,20 +0,0 @@
--- a/net/minecraft/item/ArmorMaterial.java
+++ b/net/minecraft/item/ArmorMaterial.java
@@ -10,7 +10,7 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
-public enum ArmorMaterial implements IArmorMaterial {
+public enum ArmorMaterial implements IArmorMaterial, net.minecraftforge.common.IExtensibleEnum {
LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.field_187728_s, 0.0F, () -> {
return Ingredient.func_199804_a(Items.field_151116_aA);
}),
@@ -77,4 +77,8 @@
public float func_200901_e() {
return this.field_189417_k;
}
+
+ public static ArmorMaterial create(String name, String p_i48533_3_, int p_i48533_4_, int[] p_i48533_5_, int p_i48533_6_, SoundEvent p_i48533_7_, float p_i48533_8_, Supplier<Ingredient> p_i48533_9_) {
+ throw new IllegalStateException("Enum not extended");
+ }
}