mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Current spawner implementation checks the EntitySpawnPlacementRegistry hashmap to check where a entity should spawn
as there is no way to modify this without the use of reflection or a AT, you can not specify where you want your entity to spawn adding this helper method will allow developers to specify where they want their entity to spawn. Signed-off-by: Clienthax <clienthax@gmail.com> Update EntitySpawnPlacementRegistry.java.patch
This commit is contained in:
1 parent
638af63f4d
commit
848dee14d2
1 file changed
+15
@@ -0,0 +1,15 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java
|
||||
@@ -45,6 +45,10 @@
|
||||
return (EntityLiving.SpawnPlacementType)field_180110_a.get(p_180109_0_);
|
||||
}
|
||||
|
||||
+ public static void setPlacementType(Class<? extends Entity> entityClass, EntityLiving.SpawnPlacementType placementType)
|
||||
+ {
|
||||
+ if(!field_180110_a.contains(entityClass))
|
||||
+ field_180110_a.put(entityClass, placementType);
|
||||
+ }
|
||||
+
|
||||
static
|
||||
{
|
||||
field_180110_a.put(EntityBat.class, EntityLiving.SpawnPlacementType.ON_GROUND);
|
||||
Reference in new issue
Block a user