Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped.

DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
This commit is contained in:
LexManos committed 2019-02-14 15:08:53 -08:00
1 parent 9a1688599a
commit ca72710937
361 files changed
+3166 -3547

No files matched your search

@@ -20,6 +20,7 @@
package net.minecraftforge.event.entity;
import net.minecraft.entity.Entity;
import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event.HasResult;
@@ -39,15 +40,15 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
@Cancelable
public class EntityTravelToDimensionEvent extends EntityEvent
{
private final int dimension;
private final DimensionType dimension;
public EntityTravelToDimensionEvent(Entity entity, int dimension)
public EntityTravelToDimensionEvent(Entity entity, DimensionType dimension)
{
super(entity);
this.dimension = dimension;
}
public int getDimension()
public DimensionType getDimension()
{
return dimension;
}
@@ -45,11 +45,11 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
public class LivingSpawnEvent extends LivingEvent
{
private final IWorld world;
private final float x;
private final float y;
private final float z;
private final double x;
private final double y;
private final double z;
public LivingSpawnEvent(EntityLiving entity, IWorld world, float x, float y, float z)
public LivingSpawnEvent(EntityLiving entity, IWorld world, double x, double y, double z)
{
super(entity);
this.world = world;
@@ -59,9 +59,9 @@ public class LivingSpawnEvent extends LivingEvent
}
public IWorld getWorld() { return world; }
public float getX() { return x; }
public float getY() { return y; }
public float getZ() { return z; }
public double getX() { return x; }
public double getY() { return y; }
public double getZ() { return z; }
/**
* Fires before mob spawn events.
*
@@ -87,7 +87,7 @@ public class LivingSpawnEvent extends LivingEvent
* @param spawner position of the MobSpawner
* null if it this spawn is coming from a WorldSpawner
*/
public CheckSpawn(EntityLiving entity, IWorld world, float x, float y, float z, @Nullable MobSpawnerBaseLogic spawner)
public CheckSpawn(EntityLiving entity, IWorld world, double x, double y, double z, @Nullable MobSpawnerBaseLogic spawner)
{
super(entity, world, x, y, z);
this.spawner = spawner;
@@ -127,7 +127,7 @@ public class LivingSpawnEvent extends LivingEvent
/**
* @param spawner the position of a tileentity or approximate position of an entity that initiated the spawn if any
*/
public SpecialSpawn(EntityLiving entity, World world, float x, float y, float z, @Nullable MobSpawnerBaseLogic spawner)
public SpecialSpawn(EntityLiving entity, World world, double x, double y, double z, @Nullable MobSpawnerBaseLogic spawner)
{
super(entity, world, x, y, z);
this.spawner = spawner;
@@ -158,7 +158,7 @@ public class LivingSpawnEvent extends LivingEvent
{
public AllowDespawn(EntityLiving entity)
{
super(entity, entity.world, (float)entity.posX, (float)entity.posY, (float)entity.posZ);
super(entity, entity.world, entity.posX, entity.posY, entity.posZ);
}
}