mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 21:20:12 +00:00
Setup and import of 1.16 YEET
This commit is contained in:
931 files changed
+18847
-9127
No files matched your search
@@ -20,7 +20,8 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
@@ -40,15 +41,15 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
@Cancelable
|
||||
public class EntityTravelToDimensionEvent extends EntityEvent
|
||||
{
|
||||
private final DimensionType dimension;
|
||||
private final RegistryKey<World> dimension;
|
||||
|
||||
public EntityTravelToDimensionEvent(Entity entity, DimensionType dimension)
|
||||
public EntityTravelToDimensionEvent(Entity entity, RegistryKey<World> dimension)
|
||||
{
|
||||
super(entity);
|
||||
this.dimension = dimension;
|
||||
}
|
||||
|
||||
public DimensionType getDimension()
|
||||
public RegistryKey<World> getDimension()
|
||||
{
|
||||
return dimension;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.FireworkRocketEntity;
|
||||
import net.minecraft.entity.projectile.AbstractArrowEntity;
|
||||
import net.minecraft.entity.projectile.DamagingProjectileEntity;
|
||||
import net.minecraft.entity.projectile.FireworkRocketEntity;
|
||||
import net.minecraft.entity.projectile.ThrowableEntity;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemFishedEvent extends PlayerEvent
|
||||
|
||||
public ItemFishedEvent(List<ItemStack> stacks, int rodDamage, FishingBobberEntity hook)
|
||||
{
|
||||
super(hook.getAngler());
|
||||
super(hook.func_234606_i_());
|
||||
this.stacks.addAll(stacks);
|
||||
this.rodDamage = rodDamage;
|
||||
this.hook = hook;
|
||||
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.client.multiplayer.PlayerController;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.server.management.PlayerInteractionManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@@ -24,7 +24,8 @@ import java.io.File;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
@@ -488,21 +489,21 @@ public class PlayerEvent extends LivingEvent
|
||||
}
|
||||
|
||||
public static class PlayerChangedDimensionEvent extends PlayerEvent {
|
||||
private final DimensionType fromDim;
|
||||
private final DimensionType toDim;
|
||||
public PlayerChangedDimensionEvent(PlayerEntity player, DimensionType fromDim, DimensionType toDim)
|
||||
private final RegistryKey<World> fromDim;
|
||||
private final RegistryKey<World> toDim;
|
||||
public PlayerChangedDimensionEvent(PlayerEntity player, RegistryKey<World> fromDim, RegistryKey<World> toDim)
|
||||
{
|
||||
super(player);
|
||||
this.fromDim = fromDim;
|
||||
this.toDim = toDim;
|
||||
}
|
||||
|
||||
public DimensionType getFrom()
|
||||
public RegistryKey<World> getFrom()
|
||||
{
|
||||
return this.fromDim;
|
||||
}
|
||||
|
||||
public DimensionType getTo()
|
||||
public RegistryKey<World> getTo()
|
||||
{
|
||||
return this.toDim;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
@@ -73,12 +73,12 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
@Cancelable
|
||||
public static class EntityInteractSpecific extends PlayerInteractEvent
|
||||
{
|
||||
private final Vec3d localPos;
|
||||
private final Vector3d localPos;
|
||||
private final Entity target;
|
||||
|
||||
public EntityInteractSpecific(PlayerEntity player, Hand hand, Entity target, Vec3d localPos)
|
||||
public EntityInteractSpecific(PlayerEntity player, Hand hand, Entity target, Vector3d localPos)
|
||||
{
|
||||
super(player, hand, new BlockPos(target), null);
|
||||
super(player, hand, target.func_233580_cy_(), null);
|
||||
this.localPos = localPos;
|
||||
this.target = target;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
* [-width / 2, width / 2] while Y values will be in the range [0, height]
|
||||
* @return The local position
|
||||
*/
|
||||
public Vec3d getLocalPos()
|
||||
public Vector3d getLocalPos()
|
||||
{
|
||||
return localPos;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
|
||||
public EntityInteract(PlayerEntity player, Hand hand, Entity target)
|
||||
{
|
||||
super(player, hand, new BlockPos(target), null);
|
||||
super(player, hand, target.func_233580_cy_(), null);
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
{
|
||||
public RightClickItem(PlayerEntity player, Hand hand)
|
||||
{
|
||||
super(player, hand, new BlockPos(player), null);
|
||||
super(player, hand, player.func_233580_cy_(), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
{
|
||||
public RightClickEmpty(PlayerEntity player, Hand hand)
|
||||
{
|
||||
super(player, hand, new BlockPos(player), null);
|
||||
super(player, hand, player.func_233580_cy_(), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
||||
{
|
||||
public LeftClickEmpty(PlayerEntity player)
|
||||
{
|
||||
super(player, Hand.MAIN_HAND, new BlockPos(player), null);
|
||||
super(player, Hand.MAIN_HAND, player.func_233580_cy_(), null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user