Setup and import of 1.16 YEET

This commit is contained in:
cpw committed 2020-06-25 17:55:38 -04:00
1 parent 56397043bb
commit 6d15febdb3
931 files changed
+18847 -9127

No files matched your search

@@ -36,7 +36,6 @@ import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.effect.LightningBoltEntity;
import net.minecraft.entity.item.FireworkRocketEntity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.monster.ZombieEntity;
import net.minecraft.entity.passive.AnimalEntity;
@@ -45,10 +44,13 @@ import net.minecraft.entity.player.PlayerEntity.SleepResult;
import net.minecraft.entity.player.ServerPlayerEntity;
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.block.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.LootTableManager;
import net.minecraft.world.spawner.AbstractSpawner;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
@@ -71,10 +73,7 @@ import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.storage.IPlayerFileData;
import net.minecraft.world.storage.SaveHandler;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.LootTableManager;
import net.minecraft.world.storage.PlayerData;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.ClientChatEvent;
@@ -324,9 +323,9 @@ public class ForgeEventFactory
MinecraftForge.EVENT_BUS.post(new PlayerEvent.SaveToFile(player, playerDirectory, uuidString));
}
public static void firePlayerLoadingEvent(PlayerEntity player, IPlayerFileData playerFileData, String uuidString)
public static void firePlayerLoadingEvent(PlayerEntity player, PlayerData playerFileData, String uuidString)
{
MinecraftForge.EVENT_BUS.post(new PlayerEvent.LoadFromFile(player, ((SaveHandler)playerFileData).getPlayerFolder(), uuidString));
MinecraftForge.EVENT_BUS.post(new PlayerEvent.LoadFromFile(player, playerFileData.getPlayerDataFolder(), uuidString));
}
@Nullable
@@ -531,13 +530,13 @@ public class ForgeEventFactory
@OnlyIn(Dist.CLIENT)
public static boolean renderFireOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, mat, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, mat, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), player.func_233580_cy_());
}
@OnlyIn(Dist.CLIENT)
public static boolean renderWaterOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, mat, OverlayType.WATER, Blocks.WATER.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, mat, OverlayType.WATER, Blocks.WATER.getDefaultState(), player.func_233580_cy_());
}
@OnlyIn(Dist.CLIENT)
@@ -20,8 +20,8 @@
package net.minecraftforge.event;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.LootTableManager;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.LootTableManager;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
@@ -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);
}
}
@@ -1,96 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.event.terraingen;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.provider.BiomeProvider;
import net.minecraft.world.gen.layer.Layer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.Event.HasResult;
/**
* WorldTypeEvent is fired when an event involving the world occurs.<br>
* If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.<br>
* <br>
* {@link #worldType} contains the WorldType of the world this event is occurring in.<br>
* <br>
* All children of this event are fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.<br>
**/
public class WorldTypeEvent extends Event
{
private final WorldType worldType;
public WorldTypeEvent(WorldType worldType)
{
this.worldType = worldType;
}
public WorldType getWorldType()
{
return worldType;
}
/**
* BiomeSize is fired when vanilla Minecraft attempts to generate biomes.<br>
* This event is fired during biome generation in
* {@link GenLayer#initializeAllBiomeGenerators(long, WorldType, ChunkProviderSettings)}. <br>
* <br>
* {@link #originalSize} the original size of the Biome. <br>
* {@link #newSize} the new size of the biome. Initially set to the {@link #originalSize}. <br>
* If {@link #newSize} is set to a new value, that value will be used for the Biome size. <br>
* <br>
* This event is not {@link Cancelable}.<br>
* <br>
* This event does not have a result. {@link HasResult} <br>
* <br>
* This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.<br>
**/
public static class BiomeSize extends WorldTypeEvent
{
private final int originalSize;
private int newSize;
public BiomeSize(WorldType worldType, int original)
{
super(worldType);
originalSize = original;
setNewSize(original);
}
public int getOriginalSize()
{
return originalSize;
}
public int getNewSize()
{
return newSize;
}
public void setNewSize(int newSize)
{
this.newSize = newSize;
}
}
}
@@ -20,7 +20,7 @@
package net.minecraftforge.event.village;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.village.VillageSiege;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
@@ -43,9 +43,9 @@ public class VillageSiegeEvent extends Event
private final VillageSiege siege;
private final World world;
private final PlayerEntity player;
private final Vec3d attemptedSpawnPos;
private final Vector3d attemptedSpawnPos;
public VillageSiegeEvent(VillageSiege siege, World world, PlayerEntity player, Vec3d attemptedSpawnPos)
public VillageSiegeEvent(VillageSiege siege, World world, PlayerEntity player, Vector3d attemptedSpawnPos)
{
this.siege = siege;
this.world = world;
@@ -68,7 +68,7 @@ public class VillageSiegeEvent extends Event
return player;
}
public Vec3d getAttemptedSpawnPos()
public Vector3d getAttemptedSpawnPos()
{
return attemptedSpawnPos;
}
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.event.world;
/*package net.minecraftforge.event.world;
import java.util.Collections;
import java.util.Map;
@@ -35,7 +35,7 @@ import net.minecraftforge.eventbus.api.Event;
*
* Contains a list of missing entries. Registering an entry with the DimensionManger
* will remove the matching entry from the missing list.
*/
* /
public class RegisterDimensionsEvent extends Event
{
private final Map<ResourceLocation, SavedEntry> missing;
@@ -57,4 +57,4 @@ public class RegisterDimensionsEvent extends Event
{
return missing.get(key);
}
}
}*/