Mark Raid.WaveMembers as an extensible enum. (#6878)
This commit is contained in:
parent
201349f8de
commit
0f56b4c4ee
4 changed files with 52 additions and 1 deletions
31
patches/minecraft/net/minecraft/world/raid/Raid.java.patch
Normal file
31
patches/minecraft/net/minecraft/world/raid/Raid.java.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- a/net/minecraft/world/raid/Raid.java
|
||||
+++ b/net/minecraft/world/raid/Raid.java
|
||||
@@ -768,7 +768,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- static enum WaveMember {
|
||||
+ public static enum WaveMember implements net.minecraftforge.common.IExtensibleEnum {
|
||||
VINDICATOR(EntityType.field_200758_ax, new int[]{0, 0, 2, 0, 1, 4, 2, 5}),
|
||||
EVOKER(EntityType.field_200806_t, new int[]{0, 0, 0, 0, 0, 1, 1, 2}),
|
||||
PILLAGER(EntityType.field_220350_aJ, new int[]{0, 4, 3, 3, 4, 4, 4, 2}),
|
||||
@@ -783,5 +783,19 @@
|
||||
this.field_221285_g = p_i50602_3_;
|
||||
this.field_221286_h = p_i50602_4_;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * The waveCountsIn integer decides how many entities of the EntityType defined in typeIn will spawn in each wave.
|
||||
+ * For example, one ravager will always spawn in wave 3.
|
||||
+ */
|
||||
+ public static WaveMember create(String name, EntityType<? extends AbstractRaiderEntity> typeIn, int[] waveCountsIn) {
|
||||
+ throw new IllegalStateException("Enum not extended");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @Deprecated
|
||||
+ public void init() {
|
||||
+ field_221284_f = values();
|
||||
+ }
|
||||
}
|
||||
}
|
|
@ -303,6 +303,7 @@ public net.minecraft.world.biome.FrozenOceanBiome func_180626_a(Lnet/minecraft/u
|
|||
public net.minecraft.world.biome.provider.BiomeProvider field_201540_a # BIOMES_TO_SPAWN_IN
|
||||
public net.minecraft.world.chunk.ChunkStatus <init>(Ljava/lang/String;Lnet/minecraft/world/chunk/ChunkStatus;ILjava/util/EnumSet;Lnet/minecraft/world/chunk/ChunkStatus$Type;Lnet/minecraft/world/chunk/ChunkStatus$IGenerationWorker;Lnet/minecraft/world/chunk/ChunkStatus$ILoadingWorker;)V
|
||||
public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/world/gen/layer/traits/IAreaTransformer1;Lnet/minecraft/world/gen/area/IAreaFactory;ILjava/util/function/LongFunction;)Lnet/minecraft/world/gen/area/IAreaFactory; # repeat
|
||||
private-f net.minecraft.world.raid.Raid$WaveMember field_221284_f # VALUES
|
||||
private-f net.minecraft.world.server.ChunkHolder field_219320_o # block update location
|
||||
public net.minecraft.world.server.ServerChunkProvider field_186029_c # chunkGenerator
|
||||
public net.minecraft.world.server.ServerChunkProvider field_73251_h # worldObj
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package net.minecraftforge.debug.world;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.raid.Raid;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@Mod("raid_enum_test")
|
||||
public class RaidEnumTest
|
||||
{
|
||||
private static final boolean ENABLE = false;
|
||||
|
||||
public RaidEnumTest()
|
||||
{
|
||||
if (ENABLE)
|
||||
Raid.WaveMember.create("thebluemengroup", EntityType.ILLUSIONER, new int[]{0, 5, 0, 1, 0, 1, 0, 2});
|
||||
}
|
||||
}
|
|
@ -69,4 +69,6 @@ loaderVersion="[28,)"
|
|||
[[mods]]
|
||||
modId="create_entity_classification_test"
|
||||
[[mods]]
|
||||
modId="ender_mask_test"
|
||||
modId="ender_mask_test"
|
||||
[[mods]]
|
||||
modId="raid_enum_test"
|
Loading…
Reference in a new issue