mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
19 lines
770 B
Diff
19 lines
770 B
Diff
--- ../src-base/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/EntitySpawnPlacementRegistry.java
|
|
@@ -50,9 +50,14 @@
|
|
|
|
public static EntityLiving.SpawnPlacementType getPlacementForEntity(Class<?> entityClass)
|
|
{
|
|
- return ENTITY_PLACEMENTS.get(entityClass);
|
|
+ return ENTITY_PLACEMENTS.getOrDefault(entityClass, EntityLiving.SpawnPlacementType.ON_GROUND);
|
|
}
|
|
|
|
+ public static void setPlacementType(Class<? extends Entity> entityClass, EntityLiving.SpawnPlacementType placementType)
|
|
+ {
|
|
+ ENTITY_PLACEMENTS.putIfAbsent(entityClass, placementType);
|
|
+ }
|
|
+
|
|
static
|
|
{
|
|
ENTITY_PLACEMENTS.put(EntityBat.class, EntityLiving.SpawnPlacementType.ON_GROUND);
|