mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 11:59:25 +00:00
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 <[email protected]> Update EntitySpawnPlacementRegistry.java.patch
16 lines
633 B
Diff
16 lines
633 B
Diff
--- ../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);
|