Package com.minecolonies.api.util
Class CompatibilityUtils
java.lang.Object
com.minecolonies.api.util.CompatibilityUtils
This class group method use to insure compatibility between minecraft version.
This is the 1.15 version
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEntity(net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity entityToSpawn) spawn an entity in the worldstatic net.minecraft.world.level.LevelgetWorldFromCitizen(AbstractEntityCitizen baseEntityCitizen) static net.minecraft.world.level.LevelgetWorldFromEntity(net.minecraft.world.entity.Entity entity) get the world from the entity.
-
Method Details
-
getWorldFromEntity
public static net.minecraft.world.level.Level getWorldFromEntity(net.minecraft.world.entity.Entity entity) get the world from the entity.This method is aiming to hide the difference between 1.10.2 and 1.11.2
- Parameters:
entity- to which we get the world from- Returns:
- the world
-
getWorldFromCitizen
public static net.minecraft.world.level.Level getWorldFromCitizen(AbstractEntityCitizen baseEntityCitizen) -
addEntity
public static void addEntity(net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity entityToSpawn) spawn an entity in the worldThis method is aiming to hide the difference between 1.10.2 and 1.11.2
- Parameters:
world- The world which we are spawning the entity in.entityToSpawn- The entity which we are spawning.
-