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:
parent
638af63f4d
commit
848dee14d2
1 changed files with 15 additions and 0 deletions
|
@ -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);
|
Loading…
Reference in a new issue