From b4feee8046ab50aa90aa1907d52c994bb303f0c7 Mon Sep 17 00:00:00 2001
From: sciwhiz12
* Use of this class after startup is not possible. At that
- * point, {@link IThreadListener} should be used instead.
+ * point, {@code ReentrantBlockableEventLoop} should be used instead.
*
* Exceptions from tasks will be handled gracefully, causing a mod loading
* error. Tasks that take egregiously long times to run will be logged.
diff --git a/fmlcore/src/main/java/net/minecraftforge/fml/DistExecutor.java b/fmlcore/src/main/java/net/minecraftforge/fml/DistExecutor.java
index c85afac084..d6ebad279d 100644
--- a/fmlcore/src/main/java/net/minecraftforge/fml/DistExecutor.java
+++ b/fmlcore/src/main/java/net/minecraftforge/fml/DistExecutor.java
@@ -46,7 +46,7 @@ public final class DistExecutor
private DistExecutor() {}
/**
- * Run the callable in the supplier only on the specified {@link Side}.
+ * Run the callable in the supplier only on the specified {@link Dist}.
* This method is NOT sided-safe and special care needs to be taken in code using this method that implicit class
* loading is not triggered by the Callable.
*
diff --git a/fmlcore/src/main/java/net/minecraftforge/fml/IExtensionPoint.java b/fmlcore/src/main/java/net/minecraftforge/fml/IExtensionPoint.java
index dbe9c95aeb..3b665b922a 100644
--- a/fmlcore/src/main/java/net/minecraftforge/fml/IExtensionPoint.java
+++ b/fmlcore/src/main/java/net/minecraftforge/fml/IExtensionPoint.java
@@ -32,30 +32,30 @@ public interface IExtensionPoint Return {@link net.minecraftforge.fml.network.FMLNetworkConstants#IGNORESERVERONLY} in the supplier, if you wish to be ignored
+ * Return {@code net.minecraftforge.fmllegacy.network.FMLNetworkConstants#IGNORESERVERONLY} in the supplier, if you wish to be ignored
* as a server side only mod. Return true in the predicate for all values of the input string (when network boolean is true) if you are client side,
* and don't care about matching any potential server version.
* Examples: A server only mod
- *
- *
* Examples: A client only mod
- *
+ *
{@code
* registerExtensionPoint(DISPLAYTEST, ()->Pair.of(
* ()->FMLNetworkConstants.IGNORESERVERONLY, // ignore me, I'm a server only mod
* (s,b)->true // i accept anything from the server or the save, if I'm asked
* )
- *
- *
+ *
{@code
* registerExtensionPoint(DISPLAYTEST, ()->Pair.of(
* ()->"anything. i don't care", // if i'm actually on the server, this string is sent but i'm a client only mod, so it won't be
* (remoteversionstring,networkbool)->networkbool // i accept anything from the server, by returning true if it's asking about the server
* )
- *
- *
See {@code MinecraftForge#EVENT_BUS}
*/ FORGE(Bindings.getForgeBus()), /** diff --git a/javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java b/javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java index 43d1512ce0..b67a897dad 100644 --- a/javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java +++ b/javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java @@ -41,7 +41,7 @@ import static net.minecraftforge.fml.Logging.LOADING; /** * Automatic eventbus subscriber - reads {@link net.minecraftforge.fml.common.Mod.EventBusSubscriber} * annotations and passes the class instances to the {@link net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus} - * defined by the annotation. Defaults to {@link MinecraftForge#EVENT_BUS} + * defined by the annotation. Defaults to {@code MinecraftForge#EVENT_BUS} */ public class AutomaticEventSubscriber { diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransform.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransform.java.patch index aca09cc555..ea9a2ca9d0 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransform.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransform.java.patch @@ -5,7 +5,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; +/** -+ * @deprecated use {@link net.minecraft.util.math.vector.TransformationMatrix} through {@link net.minecraftforge.client.extensions.IForgeBakedModel#handlePerspective} ++ * @deprecated use {@link com.mojang.math.Transformation} through {@link net.minecraftforge.client.extensions.IForgeBakedModel#handlePerspective} + */ @OnlyIn(Dist.CLIENT) +@Deprecated diff --git a/patches/minecraft/net/minecraft/world/item/enchantment/Enchantment.java.patch b/patches/minecraft/net/minecraft/world/item/enchantment/Enchantment.java.patch index 23736553fd..b57e79c3ab 100644 --- a/patches/minecraft/net/minecraft/world/item/enchantment/Enchantment.java.patch +++ b/patches/minecraft/net/minecraft/world/item/enchantment/Enchantment.java.patch @@ -42,7 +42,7 @@ + } + + /** -+ * This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)} ++ * This applies specifically to applying at the enchanting table. The other method {@link #canEnchant(ItemStack)} + * applies for all possible enchantments. + * @param stack + * @return diff --git a/patches/minecraft/net/minecraft/world/level/block/FlowerPotBlock.java.patch b/patches/minecraft/net/minecraft/world/level/block/FlowerPotBlock.java.patch index 41765d73a9..910de9bc0c 100644 --- a/patches/minecraft/net/minecraft/world/level/block/FlowerPotBlock.java.patch +++ b/patches/minecraft/net/minecraft/world/level/block/FlowerPotBlock.java.patch @@ -20,7 +20,7 @@ + * flower pots from altering vanilla behavior. + * + * @param emptyPot The empty pot for this pot, or null for self. -+ * @param block The flower block. ++ * @param p_53528_ The flower block. + * @param properties + */ + public FlowerPotBlock(@javax.annotation.Nullable java.util.function.SupplierIf your new plant grows on blocks like any one of them above, never create a new {@link PlantType}. * This Type is only functioning in - * {@link net.minecraft.block.Block#canSustainPlant(BlockState, IBlockReader, BlockPos, Direction, IPlantable)}, + * {@link Block#canSustainPlant(BlockState, BlockGetter, BlockPos, Direction, IPlantable)}, * which you are supposed to override this function in your new block and create a new plant type to grow on that block. * * This method can be called during parallel loading diff --git a/src/main/java/net/minecraftforge/common/ToolActions.java b/src/main/java/net/minecraftforge/common/ToolActions.java index f3128291ac..8c3da4a3cc 100644 --- a/src/main/java/net/minecraftforge/common/ToolActions.java +++ b/src/main/java/net/minecraftforge/common/ToolActions.java @@ -82,7 +82,7 @@ public class ToolActions /** * Used during player attack to figure out if a sweep attack should be performed * - * @see {@link IForgeItem#getSweepHitBox} + * @see IForgeItem#getSweepHitBox */ public static final ToolAction SWORD_SWEEP = ToolAction.get("sword_sweep"); diff --git a/src/main/java/net/minecraftforge/common/capabilities/CapabilityInject.java b/src/main/java/net/minecraftforge/common/capabilities/CapabilityInject.java index bf24e4f365..11660546f9 100644 --- a/src/main/java/net/minecraftforge/common/capabilities/CapabilityInject.java +++ b/src/main/java/net/minecraftforge/common/capabilities/CapabilityInject.java @@ -28,20 +28,20 @@ import java.lang.annotation.*; * of 'Capability' * * Example: - *
- * {@literal @}CapabilityInject(IExampleCapability.class)
+ * {@code
+ * @CapabilityInject(IExampleCapability.class)
* private static final Capability TEST_CAP = null;
- *
+ * }
*
* When placed on a METHOD, the method will be invoked once the
* capability is registered. This allows you to have a 'enable features'
* callback. It MUST have one parameter of type 'Capability;
*
* Example:
- *
- * {@literal @}CapabilityInject(IExampleCapability.class)
+ * {@code
+ * @CapabilityInject(IExampleCapability.class)
* private static void capRegistered(Capability cap) {}
- *
+ * }
*
* Warning: Capability injections are run in the thread that the capablity is registered.
* Due to parallel mod loading, this can potentially be off of the main thread.
diff --git a/src/main/java/net/minecraftforge/common/capabilities/CapabilityToken.java b/src/main/java/net/minecraftforge/common/capabilities/CapabilityToken.java
index 19e3466474..ac720ab4a9 100644
--- a/src/main/java/net/minecraftforge/common/capabilities/CapabilityToken.java
+++ b/src/main/java/net/minecraftforge/common/capabilities/CapabilityToken.java
@@ -30,8 +30,7 @@ package net.minecraftforge.common.capabilities;
* {@code
* public static Capability DATA_HOLDER_CAPABILITY
* = CapabilityManager.get(new CapabilityToken<>(){});
- *
- *
+ * }
*
*/
public abstract class CapabilityToken* Note that entities may reduce slipperiness by a certain factor of their own; - * for {@link net.minecraft.world.entity.LivingEntity}, this is {@code .91}. - * {@link net.minecraft.world.entity.item.ItemEntity} uses {@code .98}, and - * {@link net.minecraft.world.entity.projectile.FishingHook} uses {@code .92}. + * for {@link LivingEntity}, this is {@code .91}. + * {@link ItemEntity} uses {@code .98}, and + * {@link FishingHook} uses {@code .92}. * * @param state state of the block * @param world the world @@ -476,7 +479,7 @@ public interface IForgeBlock /** * Used to determine the state 'viewed' by an entity (see - * {@link ActiveRenderInfo#getBlockStateAtEntityViewpoint(World, Entity, float)}). + * {@link Camera#getBlockAtCamera()}). * Can be used by fluid blocks to determine if the viewpoint is within the fluid or not. * * @param state the state @@ -724,7 +727,7 @@ public interface IForgeBlock * Whether redstone dust should visually connect to this block on a given side *
* The default implementation is identical to - * {@link RedStoneWireBlock#shouldConnectTo(BlockState, Direction)} + * {@code RedStoneWireBlock#shouldConnectTo(BlockState, Direction)} * *
* {@link RedStoneWireBlock} updates its visual connection when
diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockEntity.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockEntity.java
index 6454b10bb2..c2ea57392f 100644
--- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockEntity.java
+++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockEntity.java
@@ -21,6 +21,9 @@ package net.minecraftforge.common.extensions;
import javax.annotation.Nonnull;
+import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
+import net.minecraft.client.resources.model.BakedModel;
+import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.Blocks;
@@ -66,11 +69,11 @@ public interface IForgeBlockEntity extends ICapabilitySerializable
- * Used to handle this tag in a special way. By default this simply calls {@link #readFromNBT(NBTTagCompound)}.
+ * Used to handle this tag in a special way. By default this simply calls {@link BlockEntity#load(CompoundTag)}.
*
- * @param tag The {@link NBTTagCompound} sent from {@link #getUpdateTag()}
+ * @param tag The {@link CompoundTag} sent from {@link BlockEntity#getUpdateTag()}
*/
default void handleUpdateTag(CompoundTag tag)
{
@@ -78,7 +81,7 @@ public interface IForgeBlockEntity extends ICapabilitySerializable
* Note that entities may reduce slipperiness by a certain factor of their own;
- * for {@link net.minecraft.entity.LivingEntity}, this is {@code .91}.
- * {@link net.minecraft.entity.item.ItemEntity} uses {@code .98}, and
- * {@link net.minecraft.entity.projectile.FishingBobberEntity} uses {@code .92}.
+ * for {@link LivingEntity}, this is {@code .91}.
+ * {@link ItemEntity} uses {@code .98}, and
+ * {@link FishingHook} uses {@code .92}.
*
* @param world the world
* @param pos the position in the world
@@ -247,7 +250,7 @@ public interface IForgeBlockState
}
/**
* Allows a block to override the standard vanilla running particles.
- * This is called from {@link Entity#handleRunningEffect} and is called both,
+ * This is called from {@code Entity#spawnSprintParticle()} and is called both,
* Client and server side, it's up to the implementor to client check / server check.
* By default vanilla spawns particles only on the client and the server methods no-op.
*
@@ -413,7 +416,7 @@ public interface IForgeBlockState
/**
* Used to determine the state 'viewed' by an entity (see
- * {@link net.minecraft.client.Camera#getBlockAtCamera()}).
+ * {@link Camera#getBlockAtCamera()}).
* Can be used by fluid blocks to determine if the viewpoint is within the fluid or not.
*
* @param world the world
@@ -621,7 +624,7 @@ public interface IForgeBlockState
* @param pos The block position in world
* @param player The player clicking the block
* @param stack The stack being used by the player
- * @param toolType The tool type to be considered when performing the action
+ * @param toolAction The tool type to be considered when performing the action
* @return The resulting state after the action has been performed
*/
@Nullable
diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java b/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java
index aa52348b6f..cd700e1fd6 100644
--- a/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java
+++ b/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java
@@ -21,6 +21,9 @@ package net.minecraftforge.common.extensions;
import java.util.Collection;
import javax.annotation.Nullable;
+
+import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
+import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.MobCategory;
@@ -141,8 +144,7 @@ public interface IForgeEntity extends ICapabilitySerializable
return new MyModifier(conditionsIn)
- * See the {@link net.minecraft.world.Teleporter} class, which has
+ * See the {@link PortalForcer} class, which has
* been patched to implement this interface, for a vanilla example.
*/
public interface ITeleporter
@@ -57,7 +58,7 @@ public interface ITeleporter
* @param yaw the suggested yaw value to apply
* @param repositionEntity a function to reposition the entity, which returns the new entity in the new dimension. This is the vanilla implementation of the dimension travel logic. If the supplied boolean is true, it is attempted to spawn a new portal.
*
- * @return the entity in the new World. Vanilla creates for most {@link Entity}s a new instance and copy the data. But you are not allowed to create a new instance for {@link PlayerEntity}s! Move the player and update its state, see {@link ServerPlayerEntity#changeDimension(net.minecraft.world.server.ServerWorld, ITeleporter)}
+ * @return the entity in the new World. Vanilla creates for most {@link Entity}s a new instance and copy the data. But you are not allowed to create a new instance for {@link Player}s! Move the player and update its state, see {@link ServerPlayer#changeDimension(ServerLevel, ITeleporter)}
*/
default Entity placeEntity(Entity entity, ServerLevel currentWorld, ServerLevel destWorld, float yaw, Function
* A reference implementation is provided {@link TileFluidHandler}.
*/
public interface IFluidHandler
@@ -110,7 +110,7 @@ public interface IFluidHandler
/**
* Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
- *
* This method is not Fluid-sensitive.
*
* @param maxDrain Maximum amount of fluid to drain.
diff --git a/src/main/java/net/minecraftforge/fluids/capability/wrappers/BlockWrapper.java b/src/main/java/net/minecraftforge/fluids/capability/wrappers/BlockWrapper.java
index 0104eb3272..18f64b00e1 100644
--- a/src/main/java/net/minecraftforge/fluids/capability/wrappers/BlockWrapper.java
+++ b/src/main/java/net/minecraftforge/fluids/capability/wrappers/BlockWrapper.java
@@ -33,8 +33,8 @@ import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
/**
* Wrapper around any block, only accounts for fluid placement, otherwise the block acts a void.
- * If the block in question inherits from the default Vanilla or Forge implementations,
- * consider using {@link BlockLiquidWrapper} or {@link FluidBlockWrapper} respectively.
+ * If the block in question inherits from the Forge implementations,
+ * consider using {@link FluidBlockWrapper}.
*/
public class BlockWrapper extends VoidFluidHandler
{
diff --git a/src/main/java/net/minecraftforge/fmllegacy/network/FMLHandshakeHandler.java b/src/main/java/net/minecraftforge/fmllegacy/network/FMLHandshakeHandler.java
index 4662e37b40..36e16ca5fe 100644
--- a/src/main/java/net/minecraftforge/fmllegacy/network/FMLHandshakeHandler.java
+++ b/src/main/java/net/minecraftforge/fmllegacy/network/FMLHandshakeHandler.java
@@ -21,8 +21,12 @@ package net.minecraftforge.fmllegacy.network;
import com.google.common.collect.Multimap;
import net.minecraft.network.Connection;
+import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
+import net.minecraft.network.protocol.login.ClientboundCustomQueryPacket;
+import net.minecraft.network.protocol.login.ServerboundCustomQueryPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.network.chat.TextComponent;
+import net.minecraft.server.network.ServerLoginPacketListenerImpl;
import net.minecraftforge.common.util.LogMessageAdapter;
import net.minecraftforge.fmllegacy.network.simple.SimpleChannel;
import net.minecraftforge.fmllegacy.util.ThreeConsumer;
@@ -47,24 +51,24 @@ import static net.minecraftforge.registries.ForgeRegistry.REGISTRIES;
/**
* Instance responsible for handling the overall FML network handshake.
*
- * An instance is created during {@link net.minecraft.network.handshake.client.CHandshakePacket} handling, and attached
- * to the {@link NetworkManager#channel} via {@link FMLNetworkConstants#FML_HANDSHAKE_HANDLER}.
+ * An instance is created during {@link ClientIntentionPacket} handling, and attached
+ * to the {@link Connection#channel()} via {@link FMLNetworkConstants#FML_HANDSHAKE_HANDLER}.
*
* The {@link FMLNetworkConstants#handshakeChannel} is a {@link SimpleChannel} with standard messages flowing in both directions.
*
- * The {@link #loginWrapper} transforms these messages into {@link net.minecraft.network.login.client.CCustomPayloadLoginPacket}
- * and {@link net.minecraft.network.login.server.SCustomPayloadLoginPacket} compatible messages, by means of wrapping.
+ * The {@link #loginWrapper} transforms these messages into {@link ServerboundCustomQueryPacket}
+ * and {@link ClientboundCustomQueryPacket} compatible messages, by means of wrapping.
*
- * The handshake is ticked {@link #tickLogin(NetworkManager)} from the {@link ServerLoginNetHandler#update()} method,
- * utilizing the {@link ServerLoginNetHandler.State#NEGOTIATING} state, which is otherwise unused in vanilla code.
+ * The handshake is ticked {@code #tickLogin(NetworkManager)} from the {@link ServerLoginPacketListenerImpl#tick()} method,
+ * utilizing the {@code ServerLoginPacketListenerImpl.State#NEGOTIATING} state, which is otherwise unused in vanilla code.
*
* During client to server initiation, on the server, the {@link NetworkEvent.GatherLoginPayloadsEvent} is fired,
* which solicits all registered channels at the {@link NetworkRegistry} for any
* {@link NetworkRegistry.LoginPayload} they wish to supply.
*
* The collected {@link NetworkRegistry.LoginPayload} are sent, one per tick, via
- * the {@link FMLLoginWrapper#wrapPacket(ResourceLocation, PacketBuffer)} mechanism to the incoming client connection. Each
- * packet is indexed via {@link net.minecraft.network.login.client.CCustomPayloadLoginPacket#transaction}, which is
+ * the {@code FMLLoginWrapper#wrapPacket(ResourceLocation, net.minecraft.network.FriendlyByteBuf)} mechanism to the incoming client connection. Each
+ * packet is indexed via {@link ServerboundCustomQueryPacket#getTransactionId()}, which is
* the only mechanism available for tracking request/response pairs.
*
* Each packet sent from the server should be replied by the client, though not necessarily in sent order. The reply
@@ -84,7 +88,7 @@ public class FMLHandshakeHandler {
}
/**
- * Create a new handshake instance. Called when connection is first created during the {@link net.minecraft.network.handshake.client.CHandshakePacket}
+ * Create a new handshake instance. Called when connection is first created during the {@link ClientIntentionPacket}
* handling.
*
* @param manager The network manager for this connection
@@ -141,7 +145,7 @@ public class FMLHandshakeHandler {
}
/**
- * Transforms a two-argument instance method reference into a {@link BiConsumer} {@link #biConsumerFor(ThreeConsumer)}, first calling the {@link #handleIndexedMessage(FMLHandshakeMessages.LoginIndexedMessage, Supplier)}
+ * Transforms a two-argument instance method reference into a {@link BiConsumer} {@link #biConsumerFor(ThreeConsumer)}, first calling the {@link #handleIndexedMessage(IntSupplier, Supplier)}
* method to handle index tracking. Used for client to server replies.
*
* This should only be used for login messages.
diff --git a/src/main/java/net/minecraftforge/fmllegacy/network/FMLNetworkConstants.java b/src/main/java/net/minecraftforge/fmllegacy/network/FMLNetworkConstants.java
index a5f6fe5697..26d0f70749 100644
--- a/src/main/java/net/minecraftforge/fmllegacy/network/FMLNetworkConstants.java
+++ b/src/main/java/net/minecraftforge/fmllegacy/network/FMLNetworkConstants.java
@@ -21,6 +21,7 @@ package net.minecraftforge.fmllegacy.network;
import io.netty.util.AttributeKey;
import net.minecraft.resources.ResourceLocation;
+import net.minecraftforge.fml.IExtensionPoint.DisplayTest;
import net.minecraftforge.fmllegacy.network.event.EventNetworkChannel;
import net.minecraftforge.fmllegacy.network.simple.SimpleChannel;
import org.apache.logging.log4j.Marker;
@@ -50,7 +51,7 @@ public class FMLNetworkConstants
static final SimpleChannel playChannel = NetworkInitialization.getPlayChannel();
static final List
- * This function re-implements the vanilla function {@link IInventory#isItemValidForSlot(int, ItemStack)}.
+ * This function re-implements the vanilla function {@link Container#canPlaceItem(int, ItemStack)}.
* It should be used instead of simulated insertions in cases where the contents and state of the inventory are
* irrelevant, mainly for the purpose of automation and logic (for instance, testing if a minecart can wait
* to deposit its items into a full inventory, or if the items in the minecart can never be placed into the
diff --git a/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java
index 308001f3a2..dc532e05c0 100644
--- a/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java
+++ b/src/main/java/net/minecraftforge/items/wrapper/EntityArmorInvWrapper.java
@@ -21,10 +21,12 @@ package net.minecraftforge.items.wrapper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
+import net.minecraft.world.item.ItemStack;
+import net.minecraftforge.items.IItemHandler;
/**
- * Exposes the armor inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and
- * {@link EntityLivingBase#setItemStackToSlot}.
+ * Exposes the armor inventory of an {@link LivingEntity} as an {@link IItemHandler} using {@link LivingEntity#getItemBySlot(EquipmentSlot)} and
+ * {@link LivingEntity#setItemSlot(EquipmentSlot, ItemStack)}.
*/
public class EntityArmorInvWrapper extends EntityEquipmentInvWrapper
{
diff --git a/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java
index 1403a937f2..3183d26163 100644
--- a/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java
+++ b/src/main/java/net/minecraftforge/items/wrapper/EntityEquipmentInvWrapper.java
@@ -24,6 +24,7 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.util.LazyOptional;
+import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import java.util.ArrayList;
@@ -32,8 +33,8 @@ import javax.annotation.Nonnull;
/**
- * Exposes the armor or hands inventory of an {@link EntityLivingBase} as an {@link IItemHandler} using {@link EntityLivingBase#getItemStackFromSlot} and
- * {@link EntityLivingBase#setItemStackToSlot}.
+ * Exposes the armor or hands inventory of an {@link LivingEntity} as an {@link IItemHandler} using {@link LivingEntity#getItemBySlot(EquipmentSlot)} and
+ * {@link LivingEntity#setItemSlot(EquipmentSlot, ItemStack)}.
*/
public abstract class EntityEquipmentInvWrapper implements IItemHandlerModifiable
{
@@ -43,7 +44,7 @@ public abstract class EntityEquipmentInvWrapper implements IItemHandlerModifiabl
protected final LivingEntity entity;
/**
- * The slots exposed by this wrapper, with {@link EntityEquipmentSlot#index} as the index.
+ * The slots exposed by this wrapper, with {@link EquipmentSlot#getIndex()} as the index.
*/
protected final List
- * It is called from {@link RepairContainer#updateRepairOutput}.
+ * It is called from {@link AnvilMenu#createResult()}.
* If the event is canceled, vanilla behavior will not run, and the output will be set to {@link ItemStack#EMPTY}.
* If the event is not canceled, but the output is not empty, it will set the output and not run vanilla behavior.
* if the output is empty, and the event is not canceled, vanilla behavior will execute.
diff --git a/src/main/java/net/minecraftforge/event/CommandEvent.java b/src/main/java/net/minecraftforge/event/CommandEvent.java
index c117b972b3..dde8f91ccb 100644
--- a/src/main/java/net/minecraftforge/event/CommandEvent.java
+++ b/src/main/java/net/minecraftforge/event/CommandEvent.java
@@ -21,12 +21,14 @@ package net.minecraftforge.event;
import com.mojang.brigadier.ParseResults;
import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.commands.Commands;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
* CommandEvent is fired after a command is parsed, but before it is executed.
- * This event is fired during the invocation of {@link Commands#handleCommand(CommandSource, String)}.
+ * This event is fired during the invocation of {@link Commands#performCommand(CommandSourceStack, String)}.
*
* {@link #parse} contains the instance of {@link ParseResults} for the parsed command.
* {@link #exception} begins null, but can be populated with an exception to be thrown within the command.
diff --git a/src/main/java/net/minecraftforge/event/DifficultyChangeEvent.java b/src/main/java/net/minecraftforge/event/DifficultyChangeEvent.java
index 2eb084cb82..f71c9b5ded 100644
--- a/src/main/java/net/minecraftforge/event/DifficultyChangeEvent.java
+++ b/src/main/java/net/minecraftforge/event/DifficultyChangeEvent.java
@@ -20,12 +20,14 @@
package net.minecraftforge.event;
import net.minecraft.world.Difficulty;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
/**
* DifficultyChangeEvent is fired when difficulty is changing.
*
- * This event is fired via the {@link ForgeHooks#onDifficultyChange(EnumDifficulty, EnumDifficulty)}.
+ * This event is fired via the {@link ForgeHooks#onDifficultyChange(Difficulty, Difficulty)}.
*
* This event does not have a result. {@link HasResult}
*
diff --git a/src/main/java/net/minecraftforge/event/RegisterCommandsEvent.java b/src/main/java/net/minecraftforge/event/RegisterCommandsEvent.java
index 75ced83137..c89da87b10 100644
--- a/src/main/java/net/minecraftforge/event/RegisterCommandsEvent.java
+++ b/src/main/java/net/minecraftforge/event/RegisterCommandsEvent.java
@@ -20,6 +20,8 @@
package net.minecraftforge.event;
import com.mojang.brigadier.CommandDispatcher;
+import net.minecraft.server.ServerResources;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
@@ -27,8 +29,8 @@ import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
/**
- * Commands are rebuilt whenever {@link DataPackRegistries} is recreated.
- * You can use this event to register your commands whenever the {@link net.minecraft.command.Commands} class in constructed.
+ * Commands are rebuilt whenever {@link ServerResources} is recreated.
+ * You can use this event to register your commands whenever the {@link Commands} class in constructed.
*
* The event is fired on the {@link MinecraftForge#EVENT_BUS}
*/
diff --git a/src/main/java/net/minecraftforge/event/RegistryEvent.java b/src/main/java/net/minecraftforge/event/RegistryEvent.java
index b9774a0d82..b3074e18e3 100644
--- a/src/main/java/net/minecraftforge/event/RegistryEvent.java
+++ b/src/main/java/net/minecraftforge/event/RegistryEvent.java
@@ -23,6 +23,7 @@ import java.util.Collection;
import java.util.stream.Collectors;
import net.minecraftforge.fml.event.IModBusEvent;
+import net.minecraftforge.registries.RegistryBuilder;
import org.apache.commons.lang3.Validate;
import com.google.common.collect.ImmutableList;
@@ -42,7 +43,7 @@ public class RegistryEvent
- * This event is fired via {@link ForgeHooks#onServerChatEvent(NetHandlerPlayServer, String, ITextComponent)},
- * which is executed by the {@link NetHandlerPlayServer#processChatMessage(CPacketChatMessage)}
+ * This event is fired via {@link ForgeHooks#onServerChatEvent(ServerGamePacketListenerImpl, String, Component)},
+ * which is executed by the {@link ServerGamePacketListenerImpl#handleChat(ServerboundChatPacket)}
*
* {@link #username} contains the username of the player sending the chat message.
* {@link #message} contains the message being sent.
diff --git a/src/main/java/net/minecraftforge/event/TagsUpdatedEvent.java b/src/main/java/net/minecraftforge/event/TagsUpdatedEvent.java
index 2b783bd29a..5ef757691d 100644
--- a/src/main/java/net/minecraftforge/event/TagsUpdatedEvent.java
+++ b/src/main/java/net/minecraftforge/event/TagsUpdatedEvent.java
@@ -26,7 +26,7 @@ import net.minecraftforge.eventbus.api.Event;
/**
* Fired on the client when :
* {@link TagContainer} has all of its tags synced from the server to the client (just after a client has connected).
- * The integrated server is about to be created see {@link net.minecraft.client.Minecraft#doLoadLevel}
+ * The integrated server is about to be created see {@code net.minecraft.client.Minecraft#doLoadLevel}
* Fired on the server when {@link TagContainer} has read all tags from disk, during initial load and after the reload command is used
* This event is fired on the {@link MinecraftForge#EVENT_BUS}
* On the client, this event fires on the Client Thread.
diff --git a/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java b/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java
index 5dbc8f5109..afcdc7d615 100644
--- a/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java
+++ b/src/main/java/net/minecraftforge/event/brewing/PotionBrewEvent.java
@@ -21,12 +21,12 @@ package net.minecraftforge.event.brewing;
import net.minecraft.world.item.ItemStack;
import net.minecraft.core.NonNullList;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import javax.annotation.Nonnull;
-
public class PotionBrewEvent extends Event
{
private NonNullList
- * The event is fired during the {@link BrewingStandTileEntity#brewPotions()} method invocation.
+ * The event is fired during the {@code BrewingStandBlockEntity#doBrew(Level, BlockPos, NonNullList)} method invocation.
*
* {@link #stacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.
*
@@ -85,7 +85,7 @@ public class PotionBrewEvent extends Event
/**
* PotionBrewEvent.Post is fired when a potion is brewed in the brewing stand.
*
- * The event is fired during the {@link BrewingStandTileEntity#brewPotions()} method invocation.
+ * The event is fired during the {@code BrewingStandBlockEntity#doBrew(Level, BlockPos, NonNullList)} method invocation.
*
* {@link #stacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityEvent.java
index 0523110f24..09d292f31c 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityEvent.java
@@ -23,6 +23,8 @@ import net.minecraft.core.SectionPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.Pose;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
@@ -69,7 +71,7 @@ public class EntityEvent extends Event
/**
* CanUpdate is fired when an Entity is being created.
* This event is fired whenever vanilla Minecraft determines that an entity
- * cannot update in {@link World#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean)}
+ * cannot update in {@code World#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean)}
*
* {@link CanUpdate#canUpdate} contains the boolean value of whether this entity can update.
* If the modder decides that this Entity can be updated, they may change canUpdate to true,
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java
index 1c733cb268..e15e3bbf24 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java
@@ -21,12 +21,20 @@ package net.minecraftforge.event.entity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
+import net.minecraft.world.level.chunk.ChunkStatus;
+import net.minecraft.world.level.chunk.LevelChunk;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* EntityJoinWorldEvent is fired when an Entity joins the world.
* This event is fired whenever an Entity is added to the world in
- * {@link World#loadEntities(Collection)}, {@link net.minecraft.world.ServerWorld#loadEntities(Collection)} {@link World#joinEntityInSurroundings(Entity)}, and {@link World#spawnEntity(Entity)}.
- * Note: This event may be called before the underlying {@link net.minecraft.world.chunk.Chunk} is promoted to {@link net.minecraft.world.chunk.ChunkStatus#FULL}. You will cause chunk loading deadlocks if you don't delay your world interactions.
+ * {@code Level#loadEntities(Collection)},
+ * {@code net.minecraft.world.ServerWorld#loadEntities(Collection)}
+ * {@code World#joinEntityInSurroundings(Entity)}, and
+ * {@code World#spawnEntity(Entity)}.
+ * Note: This event may be called before the underlying {@link LevelChunk} is promoted to {@link ChunkStatus#FULL}.
+ * You will cause chunk loading deadlocks if you don't delay your world interactions.
*
* {@link #world} contains the world in which the entity is to join.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityLeaveWorldEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityLeaveWorldEvent.java
index 8dded97c2c..9526bc34d3 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityLeaveWorldEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityLeaveWorldEvent.java
@@ -19,13 +19,17 @@
package net.minecraftforge.event.entity;
+import net.minecraft.client.multiplayer.ClientLevel;
+import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* EntityLeaveWorldEvent is fired when an Entity leaves the world.
* This event is fired whenever an Entity is removed from the world in
- * {@link ClientWorld#removeEntity(Entity)}, {@link ServerWorld#removeEntityComplete(Entity,Boolean)}.
+ * {@link ClientLevel#removeEntity(int, Entity.RemovalReason)}, {@link ServerLevel#removeEntityComplete(Entity, boolean)}.
*
* {@link #world} contains the world from which the entity is removed.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityMobGriefingEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityMobGriefingEvent.java
index 7676c94173..c9d030ce05 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityMobGriefingEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityMobGriefingEvent.java
@@ -20,6 +20,7 @@
package net.minecraftforge.event.entity;
import net.minecraft.world.entity.Entity;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event.HasResult;
/**
@@ -27,9 +28,11 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
* This event is fired when ever the {@code mobGriefing} game rule is checked.
*
* This event has a {@link HasResult result}:
+ *
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*/
@HasResult
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityMountEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityMountEvent.java
index 8354cb819b..757ca2d9e2 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityMountEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityMountEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.entity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java
index 311705345a..0ef89dca09 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java
@@ -21,11 +21,14 @@ package net.minecraftforge.event.entity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LightningBolt;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.
+ *
* This event is fired whenever an EntityLightningBolt is updated to strike an Entity in
- * {@link EntityLightningBolt#onUpdate()} via {@link ForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt)}.
+ * {@link LightningBolt#tick()} via {@link ForgeEventFactory#onEntityStruckByLightning(Entity, LightningBolt)}.
*
* {@link #lightning} contains the instance of EntityLightningBolt attempting to strike an entity.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java
index a26ae4106a..1fe6ba5ed5 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java
@@ -24,11 +24,14 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.ThrownEnderpearl;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.phys.Vec3;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
+import net.minecraftforge.eventbus.api.Event;
+import net.minecraftforge.fml.LogicalSide;
/**
* EntityTeleportEvent is fired when an event involving any teleportation of an Entity occurs.
- * If a method utilizes this {@link net.minecraftforge.eventbus.api.Event} as its parameter, the method will
+ * If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.
*
* {@link #getTarget()} contains the target destination.
@@ -64,16 +67,16 @@ public class EntityTeleportEvent extends EntityEvent
/**
* EntityTeleportEvent.TeleportCommand is fired before a living entity is teleported
- * from use of {@link net.minecraft.command.impl.TeleportCommand}.
+ * from use of {@link net.minecraft.server.commands.TeleportCommand}.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If the event is not canceled, the entity will be teleported.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
- * This event is only fired on the {@link net.minecraftforge.fml.LogicalSide#SERVER} side.
+ * This event is only fired on the {@link LogicalSide#SERVER} side.
*
* If this event is canceled, the entity will not be teleported.
*/
@@ -88,16 +91,16 @@ public class EntityTeleportEvent extends EntityEvent
/**
* EntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported
- * from use of {@link net.minecraft.command.impl.SpreadPlayersCommand}.
+ * from use of {@link net.minecraft.server.commands.SpreadPlayersCommand}.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If the event is not canceled, the entity will be teleported.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
- * This event is only fired on the {@link net.minecraftforge.fml.LogicalSide#SERVER} side.
+ * This event is only fired on the {@link LogicalSide#SERVER} side.
*
* If this event is canceled, the entity will not be teleported.
*/
@@ -113,14 +116,14 @@ public class EntityTeleportEvent extends EntityEvent
/**
* EntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If the event is not canceled, the entity will be teleported.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
- * This event is only fired on the {@link net.minecraftforge.fml.LogicalSide#SERVER} side.
+ * This event is only fired on the {@link LogicalSide#SERVER} side.
*
* If this event is canceled, the entity will not be teleported.
*/
@@ -144,14 +147,14 @@ public class EntityTeleportEvent extends EntityEvent
/**
* EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If the event is not canceled, the entity will be teleported.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
- * This event is only fired on the {@link net.minecraftforge.fml.LogicalSide#SERVER} side.
+ * This event is only fired on the {@link LogicalSide#SERVER} side.
*
* If this event is canceled, the entity will not be teleported.
*/
@@ -194,14 +197,14 @@ public class EntityTeleportEvent extends EntityEvent
/**
* EntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If the event is not canceled, the entity will be teleported.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
- * This event is only fired on the {@link net.minecraftforge.fml.LogicalSide#SERVER} side.
+ * This event is only fired on the {@link LogicalSide#SERVER} side.
*
* If this event is canceled, the entity will not be teleported.
*/
diff --git a/src/main/java/net/minecraftforge/event/entity/EntityTravelToDimensionEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityTravelToDimensionEvent.java
index 07b610bb6b..d0b7a32c1d 100644
--- a/src/main/java/net/minecraftforge/event/entity/EntityTravelToDimensionEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/EntityTravelToDimensionEvent.java
@@ -22,6 +22,7 @@ package net.minecraftforge.event.entity;
import net.minecraft.world.entity.Entity;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
diff --git a/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java
index e89e79cb8b..364aece3b6 100644
--- a/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java
@@ -19,14 +19,20 @@
package net.minecraftforge.event.entity;
+import net.minecraft.client.player.LocalPlayer;
import net.minecraft.world.entity.Entity;
import net.minecraft.sounds.SoundSource;
import net.minecraft.sounds.SoundEvent;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* PlaySoundAtEntityEvent is fired a sound is to be played at an Entity
* This event is fired whenever a sound is set to be played at an Entity such as in
- * {@link ClientPlayerEntity#playSound(SoundEvent, float, float)} and {@link World#playSound(PlayerEntity, double, double, double, SoundEvent, SoundCategory, float, float)}.
+ * {@link LocalPlayer#playSound(SoundEvent, float, float)} and
+ * {@link Level#playSound(Player, double, double, double, SoundEvent, SoundSource, float, float)}.
*
* {@link #name} contains the name of the sound to be played at the Entity.
* {@link #volume} contains the volume at which the sound is to be played originally.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/AnimalTameEvent.java b/src/main/java/net/minecraftforge/event/entity/living/AnimalTameEvent.java
index 70109cb4b4..8a5ad522d5 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/AnimalTameEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/AnimalTameEvent.java
@@ -21,11 +21,13 @@ package net.minecraftforge.event.entity.living;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.eventbus.api.Cancelable;
/**
- * This event is fired when an {@link EntityAnimal} is tamed.
- * It is fired via {@link ForgeEventFactory#onAnimalTame(EntityAnimal, EntityPlayer)}.
+ * This event is fired when an {@link Animal} is tamed.
+ * It is fired via {@link ForgeEventFactory#onAnimalTame(Animal, Player)}.
* Forge fires this event for applicable vanilla animals, mods need to fire it themselves.
* This event is {@link net.minecraftforge.eventbus.api.Cancelable}. If canceled, taming the animal will fail.
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java b/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java
index 4243e3a4cf..a5e2489fca 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/BabyEntitySpawnEvent.java
@@ -19,18 +19,22 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.AgeableMob;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.animal.Animal;
+import net.minecraft.world.entity.animal.Fox;
import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import javax.annotation.Nullable;
/**
* BabyEntitySpawnEvent is fired just before a baby entity is about to be spawned.
- * Parents will have disengaged their relationship. {@link @Cancelable}
- * It is possible to change the child completely by using {@link #setChild(EntityAgeable)}
- * This event is fired from {@link EntityAIMate#spawnBaby()} and {@link EntityAIVillagerMate#giveBirth()}
+ * Parents will have disengaged their relationship. {@link Cancelable}
+ * It is possible to change the child completely by using {@link #setChild(AgeableMob)}
+ * This event is fired from {@link Animal#spawnChildFromBreeding(ServerLevel, Animal)} and
+ * {@link Fox#spawnChildFromBreeding(ServerLevel, Animal)}
*
* {@link #parentA} contains the initiating parent entity.
* {@link #parentB} contains the secondary parent entity.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java
index 704e726edf..6cb877fd73 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java
@@ -19,6 +19,9 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.LivingEntity;
@@ -26,10 +29,10 @@ import net.minecraft.world.entity.LivingEntity;
/**
* LivingAttackEvent is fired when a living Entity is attacked.
* This event is fired whenever an Entity is attacked in
- * {@link EntityLivingBase#attackEntityFrom(DamageSource, float)} and
- * {@link EntityPlayer#attackEntityFrom(DamageSource, float)}.
+ * {@link LivingEntity#hurt(DamageSource, float)} and
+ * {@link Player#hurt(DamageSource, float)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingAttack(EntityLivingBase, DamageSource, float)}.
+ * This event is fired via the {@link ForgeHooks#onLivingAttack(LivingEntity, DamageSource, float)}.
*
* {@link #source} contains the DamageSource of the attack.
* {@link #amount} contains the amount of damage dealt to the entity.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDamageEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDamageEvent.java
index efceb14d19..fed47c173b 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingDamageEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDamageEvent.java
@@ -19,6 +19,7 @@
package net.minecraftforge.event.entity.living;
+import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.LivingEntity;
@@ -28,15 +29,15 @@ import net.minecraft.world.entity.LivingEntity;
* At this point armor, potion and absorption modifiers have already been applied to damage - this is FINAL value.
* Also note that appropriate resources (like armor durability and absorption extra hearths) have already been consumed.
* This event is fired whenever an Entity is damaged in
- * {@link EntityLivingBase#damageEntity(DamageSource, float)} and
- * {@link EntityPlayer#damageEntity(DamageSource, float)}.
+ * {@code LivingEntity#actuallyHurt(DamageSource, float)} and
+ * {@code Player#actuallyHurt(DamageSource, float)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingDamage(EntityLivingBase, DamageSource, float)}.
+ * This event is fired via the {@link ForgeHooks#onLivingDamage(LivingEntity, DamageSource, float)}.
*
* {@link #source} contains the DamageSource that caused this Entity to be hurt.
* {@link #amount} contains the final amount of damage that will be dealt to entity.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If this event is canceled, the Entity is not hurt. Used resources WILL NOT be restored.
*
* This event does not have a result. {@link HasResult}
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java
index ca2f4cda75..7269110f35 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java
@@ -19,6 +19,10 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.LivingEntity;
@@ -26,11 +30,11 @@ import net.minecraft.world.entity.LivingEntity;
/**
* LivingDeathEvent is fired when an Entity dies.
* This event is fired whenever an Entity dies in
- * {@link EntityLivingBase#onDeath(DamageSource)},
- * {@link EntityPlayer#onDeath(DamageSource)}, and
- * {@link EntityPlayerMP#onDeath(DamageSource)}.
+ * {@link LivingEntity#die(DamageSource)},
+ * {@link Player#die(DamageSource)}, and
+ * {@link ServerPlayer#die(DamageSource)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingDeath(EntityLivingBase, DamageSource)}.
+ * This event is fired via the {@link ForgeHooks#onLivingDeath(LivingEntity, DamageSource)}.
*
* {@link #source} contains the DamageSource that caused the entity to die.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDestroyBlockEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDestroyBlockEvent.java
index 661e5d105d..1aa4a07919 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingDestroyBlockEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDestroyBlockEvent.java
@@ -19,15 +19,19 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.world.entity.Entity;
+import net.minecraft.world.level.BlockGetter;
+import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.core.BlockPos;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
- * Fired when the ender dragon or wither attempts to destroy a block and when ever a zombie attempts to break a door. Basically a event version of {@link Block#canEntityDestroy(IBlockState, IBlockAccess, BlockPos, Entity)}
+ * Fired when the ender dragon or wither attempts to destroy a block and when ever a zombie attempts to break a door. Basically a event version of {@link Block#canEntityDestroy(BlockState, BlockGetter, BlockPos, Entity)}
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If this event is canceled, the block will not be destroyed.
*
* This event does not have a result. {@link HasResult}
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java
index cd68847ffc..5ce6dee3df 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java
@@ -24,13 +24,16 @@ import java.util.Collection;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.LivingEntity;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* LivingDropsEvent is fired when an Entity's death causes dropped items to appear.
* This event is fired whenever an Entity dies and drops items in
- * {@link EntityLivingBase#onDeath(DamageSource)}.
+ * {@link LivingEntity#die(DamageSource)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean)}.
+ * This event is fired via the {@link ForgeHooks#onLivingDrops(LivingEntity, DamageSource, Collection, int, boolean)} .
*
* {@link #source} contains the DamageSource that caused the drop to occur.
* {@link #drops} contains the ArrayList of EntityItems that will be dropped.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingEntityUseItemEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingEntityUseItemEvent.java
index 4325dccfbf..f2b6d6a607 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingEntityUseItemEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingEntityUseItemEvent.java
@@ -61,7 +61,7 @@ public class LivingEntityUseItemEvent extends LivingEvent
* Drinking Potions/Milk
* Guarding with a sword
*
- * Cancel the event, or set the duration or <= 0 to prevent it from processing.
+ * Cancel the event, or set the duration or {@literal <=} 0 to prevent it from processing.
*
*/
@Cancelable
@@ -76,7 +76,7 @@ public class LivingEntityUseItemEvent extends LivingEvent
/**
* Fired every tick that a player is 'using' an item, see {@link Start} for info.
*
- * Cancel the event, or set the duration or <= 0 to cause the player to stop using the item.
+ * Cancel the event, or set the duration or {@literal <=} 0 to cause the player to stop using the item.
*
*/
@Cancelable
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingEquipmentChangeEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingEquipmentChangeEvent.java
index 1de6c50c79..fbd1a9aa57 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingEquipmentChangeEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingEquipmentChangeEvent.java
@@ -22,16 +22,18 @@ package net.minecraftforge.event.entity.living;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
import javax.annotation.Nonnull;
/**
* {@link LivingEquipmentChangeEvent} is fired when the Equipment of a Entity changes.
- * This event is fired whenever changes in Equipment are detected in {@link EntityLivingBase#onUpdate()}.
+ * This event is fired whenever changes in Equipment are detected in {@link LivingEntity#tick()}.
* This also includes entities joining the World, as well as being cloned.
* This event is fired on server-side only.
*
- * {@link #slot} contains the affected {@link EntityEquipmentSlot}.
+ * {@link #slot} contains the affected {@link EquipmentSlot}.
* {@link #from} contains the {@link ItemStack} that was equipped previously.
* {@link #to} contains the {@link ItemStack} that is equipped now.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java
index 092641b948..a2a1cf4df2 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java
@@ -20,15 +20,18 @@
package net.minecraftforge.event.entity.living;
import net.minecraft.world.entity.Entity;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.entity.LivingEntity;
import net.minecraftforge.event.entity.EntityEvent;
+import net.minecraftforge.eventbus.api.Event;
import javax.annotation.Nullable;
/**
* LivingEvent is fired whenever an event involving Living entities occurs.
- * If a method utilizes this {@link net.minecraftforge.eventbus.api.Event} as its parameter, the method will
+ * If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.
*
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
@@ -50,9 +53,9 @@ public class LivingEvent extends EntityEvent
/**
* LivingUpdateEvent is fired when an Entity is updated.
* This event is fired whenever an Entity is updated in
- * {@link EntityLivingBase#onUpdate()}.
+ * {@link LivingEntity#tick()}.
*
- * This event is fired via the {@link ForgeHooks#onLivingUpdate(EntityLivingBase)}.
+ * This event is fired via the {@link ForgeHooks#onLivingUpdate(LivingEntity)}.
*
* This event is {@link Cancelable}.
* If this event is canceled, the Entity does not update.
@@ -70,10 +73,10 @@ public class LivingEvent extends EntityEvent
/**
* LivingJumpEvent is fired when an Entity jumps.
* This event is fired whenever an Entity jumps in
- * {@link EntityLivingBase#jump()}, {@link EntityMagmaCube#jump()},
- * and {@link EntityHorse#jump()}.
+ * {@code LivingEntity#jumpFromGround()}, {@code MagmaCube#jumpFromGround()},
+ * and {@code Horse#jumpFromGround()}.
*
- * This event is fired via the {@link ForgeHooks#onLivingJump(EntityLivingBase)}.
+ * This event is fired via the {@link ForgeHooks#onLivingJump(LivingEntity)}.
*
* This event is not {@link Cancelable}.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java
index cc94d35cc1..3d40834c8f 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java
@@ -19,15 +19,18 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.world.damagesource.DamageSource;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.entity.LivingEntity;
/**
* LivingFallEvent is fired when an Entity is set to be falling.
* This event is fired whenever an Entity is set to fall in
- * {@link EntityLivingBase#fall(float, float)}.
+ * {@link LivingEntity#causeFallDamage(float, float, DamageSource)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingFall(EntityLivingBase, float, float)}.
+ * This event is fired via the {@link ForgeHooks#onLivingFall(LivingEntity, float, float)}.
*
* {@link #distance} contains the distance the Entity is to fall. If this event is canceled, this value is set to 0.0F.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingHealEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingHealEvent.java
index 35d3a04c3c..29f967d4e2 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingHealEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingHealEvent.java
@@ -19,14 +19,16 @@
package net.minecraftforge.event.entity.living;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.entity.LivingEntity;
/**
* LivingHealEvent is fired when an Entity is set to be healed.
- * This event is fired whenever an Entity is healed in {@link EntityLivingBase#heal(float)}
+ * This event is fired whenever an Entity is healed in {@link LivingEntity#heal(float)}
*
- * This event is fired via the {@link ForgeEventFactory#onLivingHeal(EntityLivingBase, float)}.
+ * This event is fired via the {@link ForgeEventFactory#onLivingHeal(LivingEntity, float)}.
*
* {@link #amount} contains the amount of healing done to the Entity that was healed.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java
index 2cfb4d0e52..2874e8cabc 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java
@@ -21,14 +21,17 @@ package net.minecraftforge.event.entity.living;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.LivingEntity;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* LivingHurtEvent is fired when an Entity is set to be hurt.
* This event is fired whenever an Entity is hurt in
- * {@link EntityLivingBase#damageEntity(DamageSource, float)} and
- * {@link EntityPlayer#damageEntity(DamageSource, float)}.
+ * {@code LivingEntity#actuallyHurt(DamageSource, float)} and
+ * {@code Player#actuallyHurt(DamageSource, float)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingHurt(EntityLivingBase, DamageSource, float)}.
+ * This event is fired via the {@link ForgeHooks#onLivingHurt(LivingEntity, DamageSource, float)}.
*
* {@link #source} contains the DamageSource that caused this Entity to be hurt.
* {@link #amount} contains the amount of damage dealt to the Entity that was hurt.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingKnockBackEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingKnockBackEvent.java
index d0c449f062..7d15cccf6e 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingKnockBackEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingKnockBackEvent.java
@@ -19,25 +19,30 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.world.damagesource.DamageSource;
+import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
* LivingKnockBackEvent is fired when a living entity is about to be knocked back.
* This event is fired whenever an Entity is knocked back in
- * {@link EntityLivingBase#attackEntityFrom(DamageSource, float)},
- * {@link EntityLivingBase#blockWithShield(EntityLivingBase)},
- * {@link EntityMob#attackEntityAsMob(Entity)} and
- * {@link EntityPlayer#attackTargetEntityWithCurrentItem(Entity)}
+ * {@link LivingEntity#hurt(DamageSource, float)},
+ * {@code LivingEntity#blockUsingShield(LivingEntity)},
+ * {@link Mob#doHurtTarget(Entity)} and
+ * {@link Player#attack(Entity)}
*
- * This event is fired via {@link ForgeHooks#onLivingKnockBack(EntityLivingBase, Entity, float, double, double)}.
+ * This event is fired via {@link ForgeHooks#onLivingKnockBack(LivingEntity, float, double, double)} .
*
- * {@link #attacker} contains the Entity that caused the knock back.
* {@link #strength} contains the strength of the knock back.
* {@link #ratioX} contains the x ratio of the knock back.
* {@link #ratioZ} contains the z ratio of the knock back.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If this event is canceled, the entity is not knocked back.
*
* This event does not have a result. {@link HasResult}
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java
index 61a3010332..10e6d2f2f2 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java
@@ -20,14 +20,16 @@
package net.minecraftforge.event.entity.living;
import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.entity.Mob;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
/**
* LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.
* This event is fired whenever an Entity sets a target to attack in
- * {@link EntityLiving#setAttackTarget(EntityLivingBase)} and
- * {@link EntityLivingBase#setRevengeTarget(EntityLivingBase)}.
+ * {@link Mob#setTarget(LivingEntity)}.
*
- * This event is fired via the {@link ForgeHooks#onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase)}.
+ * This event is fired via the {@link ForgeHooks#onLivingSetAttackTarget(LivingEntity, LivingEntity)}.
*
* {@link #target} contains the newly targeted Entity.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java
index 1781db4bb4..dff78bf5e5 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java
@@ -20,17 +20,21 @@
package net.minecraftforge.event.entity.living;
import javax.annotation.Nullable;
+
+import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.BaseSpawner;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.eventbus.api.Event.HasResult;
/**
* LivingSpawnEvent is fired for any events associated with Living Entities spawn status.
- * If a method utilizes this {@link Event} as its parameter, the method will
+ * If a method utilizes this event as its parameter, the method will
* receive every child event of this class.
*
* {@link #world} contains the world in which this living Entity is being spawned.
@@ -114,7 +118,7 @@ public class LivingSpawnEvent extends LivingEvent
* SpecialSpawn is fired when an Entity is to be spawned.
* This allows you to do special inializers in the new entity.
*
- * This event is fired via the {@link ForgeEventFactory#doSpecialSpawn(EntityLiving, World, float, float, float)}.
+ * This event is fired via the {@link ForgeEventFactory#doSpecialSpawn(Mob, Level, float, float, float, BaseSpawner, MobSpawnType)}.
*
* This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
* If this event is canceled, the Entity is not spawned.
@@ -160,7 +164,7 @@ public class LivingSpawnEvent extends LivingEvent
* This is fired every tick for every despawnable entity. Be efficient in your handlers.
*
* Note: this is not fired if the mob is definitely going to otherwise despawn. It is fired to check if
- * the mob can be allowed to despawn. See {@link EntityLiving#despawnEntity}
+ * the mob can be allowed to despawn. See {@link LivingEntity#checkDespawn()}
*
* @author cpw
*
diff --git a/src/main/java/net/minecraftforge/event/entity/living/PotionColorCalculationEvent.java b/src/main/java/net/minecraftforge/event/entity/living/PotionColorCalculationEvent.java
index 58f51452e4..a3ba22691f 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/PotionColorCalculationEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/PotionColorCalculationEvent.java
@@ -23,6 +23,8 @@ import java.util.Collection;
import java.util.Collections;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
/**
* Fires after Potion Color Calculation.
diff --git a/src/main/java/net/minecraftforge/event/entity/living/PotionEvent.java b/src/main/java/net/minecraftforge/event/entity/living/PotionEvent.java
index e59cfac453..a812cd0be4 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/PotionEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/PotionEvent.java
@@ -19,19 +19,18 @@
package net.minecraftforge.event.entity.living;
+import net.minecraft.world.effect.MobEffect;
+import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.LivingEntity;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
+
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectInstance;
-import net.minecraftforge.eventbus.api.Cancelable;
-
-import net.minecraftforge.eventbus.api.Event.HasResult;
-
/**
- * This Event and its subevents gets fired from {@link EntityLivingBase} on the {@link MinecraftForge#EVENT_BUS}.
+ * This Event and its subevents gets fired from {@link LivingEntity} on the {@link MinecraftForge#EVENT_BUS}.
*/
public class PotionEvent extends LivingEvent
{
@@ -83,7 +82,7 @@ public class PotionEvent extends LivingEvent
}
/**
- * @return the PotionEffect. In the remove event this can be null if the Entity does not have a {@link Potion} of the right type active.
+ * @return the PotionEffect. In the remove event this can be null if the Entity does not have a {@link MobEffect} of the right type active.
*/
@Override
@Nullable
diff --git a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java
index 25e7b3bbc2..7b31401480 100644
--- a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java
@@ -22,13 +22,13 @@ package net.minecraftforge.event.entity.living;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.monster.Zombie;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.entity.EntityEvent;
-import net.minecraftforge.eventbus.api.Event.HasResult;
-
/**
* ZombieEvent is fired whenever a zombie is spawned for aid.
- * If a method utilizes this {@link Event} as its parameter, the method will
+ * If a method utilizes this event as its parameter, the method will
* receive every child event of this class.
*
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
@@ -48,9 +48,9 @@ public class ZombieEvent extends EntityEvent {
/**
* SummonAidEvent is fired when a Zombie Entity is summoned.
* This event is fired whenever a Zombie Entity is summoned in
- * {@link EntityZombie#attackEntityFrom(DamageSource, float)}.
+ * {@code Zombie#actuallyHurt(DamageSource, float)}.
*
- * This event is fired via the {@link ForgeEventFactory#fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double)}.
+ * This event is fired via the {@link ForgeEventFactory#fireZombieSummonAid(Zombie, Level, int, int, int, LivingEntity, double)}.
*
* {@link #customSummonedAid} remains null, but can be populated with a custom EntityZombie which will be spawned.
* {@link #world} contains the world that this summoning is occurring in.
diff --git a/src/main/java/net/minecraftforge/event/entity/player/AdvancementEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AdvancementEvent.java
index 385af41e22..0ae61f7ff8 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/AdvancementEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/AdvancementEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.entity.player;
import net.minecraft.advancements.Advancement;
import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.MinecraftForge;
/**
* This event is fired when a player gets an advancement.
diff --git a/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java
index 8c5435bd1d..dc05250486 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java
@@ -19,6 +19,9 @@
package net.minecraftforge.event.entity.player;
+import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.item.BowItem;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
@@ -29,12 +32,12 @@ import javax.annotation.Nonnull;
/**
* ArrowLooseEvent is fired when a player stops using a bow.
* This event is fired whenever a player stops using a bow in
- * {@link ItemBow#onPlayerStoppedUsing(ItemStack, World, EntityLivingBase, int)}.
+ * {@link BowItem#releaseUsing(ItemStack, Level, LivingEntity, int)}.
*
* {@link #bow} contains the ItemBow ItemStack that was used in this event.
* {@link #charge} contains the value for how much the player had charged before stopping the shot.
*
- * This event is {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is {@link Cancelable}.
* If this event is canceled, the player does not stop using the bow.
*
* This event does not have a result. {@link HasResult}
diff --git a/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java
index 6ccebaec02..0f95a7388b 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java
@@ -20,17 +20,19 @@
package net.minecraftforge.event.entity.player;
import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.BowItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
import javax.annotation.Nonnull;
/**
* ArrowNockEvent is fired when a player begins using a bow.
* This event is fired whenever a player begins using a bow in
- * {@link ItemBow#onItemRightClick(World, EntityPlayer, EnumHand)}.
+ * {@link BowItem#use(Level, Player, InteractionHand)}.
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
diff --git a/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java
index 8db9534488..4fd0395bea 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java
@@ -19,6 +19,7 @@
package net.minecraftforge.event.entity.player;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
@@ -26,7 +27,7 @@ import net.minecraft.world.entity.player.Player;
/**
* AttackEntityEvent is fired when a player attacks an Entity.
* This event is fired whenever a player attacks an Entity in
- * {@link EntityPlayer#attackTargetEntityWithCurrentItem(Entity)}.
+ * {@link Player#attack(Entity)}.
*
* {@link #target} contains the Entity that was damaged by the player.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/player/CriticalHitEvent.java b/src/main/java/net/minecraftforge/event/entity/player/CriticalHitEvent.java
index 58f3774054..b28ab1ced6 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/CriticalHitEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/CriticalHitEvent.java
@@ -19,6 +19,8 @@
package net.minecraftforge.event.entity.player;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event.HasResult;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
diff --git a/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java
index d5e44e87cf..e8a101a43b 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.entity.player;
import java.util.List;
+import net.minecraft.client.Minecraft;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
@@ -37,8 +38,8 @@ public class ItemTooltipEvent extends PlayerEvent
private final List
* This event is fired whenever a player destroys an item in
- * {@link PlayerController#onPlayerDestroyBlock(BlockPos)},
- * {@link PlayerController#processRightClick(PlayerEntity, World, Hand)},
- * {@link PlayerController#processRightClickBlock(ClientPlayerEntity, ClientWorld, BlockPos, Direction, Vec3d, Hand)},
- * {@link PlayerEntity#attackTargetEntityWithCurrentItem(Entity)},
- * {@link PlayerEntity#damageShield(float)},
- * {@link PlayerEntity#interactOn(Entity, Hand)},
+ * {@link MultiPlayerGameMode#destroyBlock(BlockPos)},
+ * {@link MultiPlayerGameMode#useItem(Player, Level, InteractionHand)},
+ * {@link MultiPlayerGameMode#useItemOn(LocalPlayer, ClientLevel, InteractionHand, BlockHitResult)} ,
+ * {@link Player#attack(Entity)},
+ * {@code Player#hurtCurrentlyUsedShield(float)},
+ * {@link Player#interactOn(Entity, InteractionHand)},
* {@link ForgeHooks#getContainerItem(ItemStack)},
- * {@link PlayerInteractionManager#processRightClick(PlayerEntity, World, ItemStack, Hand)},
- * {@link PlayerInteractionManager#processRightClickBlock(PlayerEntity, World, ItemStack, Hand, BlockPos, Direction, float, float, float)}
- * and {@link PlayerInteractionManager#tryHarvestBlock(BlockPos)}.
+ * {@link ServerPlayerGameMode#useItem(ServerPlayer, Level, ItemStack, InteractionHand)} ,
+ * {@link ServerPlayerGameMode#useItemOn(ServerPlayer, Level, ItemStack, InteractionHand, BlockHitResult)}
+ * and {@link ServerPlayerGameMode#destroyBlock(BlockPos)}.
*
* {@link #original} contains the original ItemStack before the item was destroyed.
* (@link #hand) contains the hand that the current item was held in.
@@ -47,7 +60,7 @@ import javax.annotation.Nullable;
*
* This event does not have a result. {@link HasResult}
*
- * This event is fired from {@link ForgeEventFactory#onPlayerDestroyItem(PlayerEntity, ItemStack, Hand)}.
+ * This event is fired from {@link ForgeEventFactory#onPlayerDestroyItem(Player, ItemStack, InteractionHand)}.
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
public class PlayerDestroyItemEvent extends PlayerEvent
diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java
index cd4e9e186c..4dcd68b9ca 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java
@@ -21,12 +21,15 @@ package net.minecraftforge.event.entity.player;
import java.io.File;
+import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.Container;
import net.minecraft.world.item.ItemStack;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.Entity;
@@ -61,11 +64,11 @@ public class PlayerEvent extends LivingEvent
/**
* HarvestCheck is fired when a player attempts to harvest a block.
* This event is fired whenever a player attempts to harvest a block in
- * {@link EntityPlayer#canHarvestBlock(IBlockState)}.
+ * {@link Player#hasCorrectToolForDrops(BlockState)}.
*
- * This event is fired via the {@link ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean)}.
+ * This event is fired via the {@link ForgeEventFactory#doPlayerHarvestCheck(Player, BlockState, boolean)}.
*
- * {@link #state} contains the {@link IBlockState} that is being checked for harvesting.
+ * {@link #state} contains the {@link BlockState} that is being checked for harvesting.
* {@link #success} contains the boolean value for whether the Block will be successfully harvested.
*
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
@@ -94,9 +97,9 @@ public class PlayerEvent extends LivingEvent
/**
* BreakSpeed is fired when a player attempts to harvest a block.
* This event is fired whenever a player attempts to harvest a block in
- * {@link EntityPlayer#canHarvestBlock(IBlockState)}.
+ * {@link Player#getDigSpeed(BlockState, BlockPos)}.
*
- * This event is fired via the {@link ForgeEventFactory#getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos)}.
+ * This event is fired via the {@link ForgeEventFactory#getBreakSpeed(Player, BlockState, float, BlockPos)}.
*
* {@link #state} contains the block being broken.
* {@link #originalSpeed} contains the original speed at which the player broke the block.
@@ -137,9 +140,9 @@ public class PlayerEvent extends LivingEvent
/**
* NameFormat is fired when a player's display name is retrieved.
* This event is fired whenever a player's name is retrieved in
- * {@link EntityPlayer#getDisplayName()} or {@link EntityPlayer#refreshDisplayName()}.
+ * {@link Player#getDisplayName()} or {@link Player#refreshDisplayName()}.
*
- * This event is fired via the {@link ForgeEventFactory#getPlayerDisplayName(EntityPlayer, String)}.
+ * This event is fired via the {@link ForgeEventFactory#getPlayerDisplayName(Player, Component)}.
*
* {@link #username} contains the username of the player.
* {@link #displayname} contains the display name of the player.
@@ -181,9 +184,9 @@ public class PlayerEvent extends LivingEvent
/**
* TabListNameFormat is fired when a player's display name for the tablist is retrieved.
* This event is fired whenever a player's display name for the tablist is retrieved in
- * {@link ServerPlayerEntity#getTabListDisplayName()} or {@link ServerPlayerEntity#refreshTabListName()}.
+ * {@link ServerPlayer#getTabListDisplayName()} or {@link ServerPlayer#refreshTabListName()}.
*
- * This event is fired via the {@link ForgeEventFactory#getPlayerTabListDisplayName(PlayerEntity)}.
+ * This event is fired via the {@link ForgeEventFactory#getPlayerTabListDisplayName(Player)}.
*
* {@link #getDisplayName()} contains the display name of the player or null if the client should determine the display name itself.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java
index cc330eaecb..25c825f14a 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java
@@ -21,15 +21,22 @@ package net.minecraftforge.event.entity.player;
import com.google.common.base.Preconditions;
import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.InteractionResult;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
import net.minecraft.core.BlockPos;
+import net.minecraft.world.item.context.UseOnContext;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import javax.annotation.Nonnull;
@@ -65,10 +72,10 @@ public class PlayerInteractEvent extends PlayerEvent
* This event is fired on both sides whenever a player right clicks an entity.
*
* "Interact at" is an interact where the local vector (which part of the entity you clicked) is known.
- * The state of this event affects whether {@link Entity#applyPlayerInteraction} is called.
+ * The state of this event affects whether {@link Entity#interactAt(Player, Vec3, InteractionHand)} is called.
*
- * Let result be the return value of {@link Entity#applyPlayerInteraction}, or {@link #cancellationResult} if the event is cancelled.
- * If we are on the client and result is not {@link EnumActionResult#SUCCESS}, the client will then try {@link EntityInteract}.
+ * Let result be the return value of {@link Entity#interactAt(Player, Vec3, InteractionHand)}, or {@link #cancellationResult} if the event is cancelled.
+ * If we are on the client and result is not {@link InteractionResult#SUCCESS}, the client will then try {@link EntityInteract}.
*/
@Cancelable
public static class EntityInteractSpecific extends PlayerInteractEvent
@@ -104,12 +111,14 @@ public class PlayerInteractEvent extends PlayerEvent
* This event is fired on both sides when the player right clicks an entity.
* It is responsible for all general entity interactions.
*
- * This event is fired only if the result of the above {@link EntityInteractSpecific} is not {@link EnumActionResult#SUCCESS}.
- * This event's state affects whether {@link Entity#processInitialInteract} and {@link net.minecraft.item.Item#itemInteractionForEntity} are called.
+ * This event is fired only if the result of the above {@link EntityInteractSpecific} is not {@link InteractionResult#SUCCESS}.
+ * This event's state affects whether {@link Entity#interact(Player, InteractionHand)} and
+ * {@link Item#interactLivingEntity(ItemStack, Player, LivingEntity, InteractionHand)} are called.
*
- * Let result be {@link EnumActionResult#SUCCESS} if {@link Entity#processInitialInteract} or {@link net.minecraft.item.Item#itemInteractionForEntity} return true,
+ * Let result be {@link InteractionResult#SUCCESS} if {@link Entity#interact(Player, InteractionHand)} or
+ * {@link Item#interactLivingEntity(ItemStack, Player, LivingEntity, InteractionHand)} return true,
* or {@link #cancellationResult} if the event is cancelled.
- * If we are on the client and result is not {@link EnumActionResult#SUCCESS}, the client will then try {@link RightClickItem}.
+ * If we are on the client and result is not {@link InteractionResult#SUCCESS}, the client will then try {@link RightClickItem}.
*/
@Cancelable
public static class EntityInteract extends PlayerInteractEvent
@@ -130,13 +139,13 @@ public class PlayerInteractEvent extends PlayerEvent
/**
* This event is fired on both sides whenever the player right clicks while targeting a block.
- * This event controls which of {@link Item#onItemUseFirst}, {@link Block#onBlockActivated}, and {@link Item#onItemUse}
- * will be called.
+ * This event controls which of {@link Item#onItemUseFirst}, {@link Block#use(BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult)},
+ * and {@link Item#useOn(UseOnContext)} will be called.
* Canceling the event will cause none of the above three to be called.
*
* Let result be the first non-pass return value of the above three methods, or pass, if they all pass.
* Or {@link #cancellationResult} if the event is cancelled.
- * If result equals {@link ActionResultType#PASS}, we proceed to {@link RightClickItem}.
+ * If result equals {@link InteractionResult#PASS}, we proceed to {@link RightClickItem}.
*
* There are various results to this event, see the getters below.
* Note that handling things differently on the client vs server may cause desynchronizations!
@@ -154,7 +163,7 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * @return If {@link net.minecraft.block.Block#onBlockActivated} should be called
+ * @return If {@link Block#use(BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult)} should be called
*/
public Result getUseBlock()
{
@@ -162,7 +171,7 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * @return If {@link net.minecraft.item.Item#onItemUseFirst} and {@link net.minecraft.item.Item#onItemUse} should be called
+ * @return If {@link Item#onItemUseFirst} and {@link Item#useOn(UseOnContext)} should be called
*/
public Result getUseItem()
{
@@ -178,10 +187,10 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * DENY: {@link Block#onBlockActivated} will never be called.
- * DEFAULT: {@link Block#onBlockActivated} will be called if {@link Item#onItemUseFirst} passes.
+ * DENY: {@link Block#use(BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult)} will never be called.
+ * DEFAULT: {@link Block#use(BlockState, Level, BlockPos, Player, InteractionHand, BlockHitResult)} will be called if {@link Item#onItemUseFirst} passes.
* Note that default activation can be blocked if the user is sneaking and holding an item that does not return true to {@link Item#doesSneakBypassUse}.
- * ALLOW: {@link Block#onBlockActivated} will always be called, unless {@link Item#onItemUseFirst} does not pass.
+ * ALLOW: {@link Block#updateOrDestroy(BlockState, BlockState, LevelAccessor, BlockPos, int, int)} will always be called, unless {@link Item#onItemUseFirst} does not pass.
*/
public void setUseBlock(Result triggerBlock)
{
@@ -189,9 +198,9 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * DENY: Neither {@link Item#onItemUse} or {@link Item#onItemUseFirst} will be called.
- * DEFAULT: {@link Item#onItemUseFirst} will always be called, and {@link Item#onItemUse} will be called if the block passes.
- * ALLOW: {@link Item#onItemUseFirst} will always be called, and {@link Item#onItemUse} will be called if the block passes, regardless of cooldowns or emptiness.
+ * DENY: Neither {@link Item#useOn(UseOnContext)} or {@link Item#onItemUseFirst} will be called.
+ * DEFAULT: {@link Item#onItemUseFirst} will always be called, and {@link Item#useOn(UseOnContext)} will be called if the block passes.
+ * ALLOW: {@link Item#onItemUseFirst} will always be called, and {@link Item#useOn(UseOnContext)} will be called if the block passes, regardless of cooldowns or emptiness.
*/
public void setUseItem(Result triggerItem)
{
@@ -211,11 +220,11 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * This event is fired on both sides before the player triggers {@link net.minecraft.item.Item#onItemRightClick}.
+ * This event is fired on both sides before the player triggers {@link Item#use(Level, Player, InteractionHand)}.
* Note that this is NOT fired if the player is targeting a block {@link RightClickBlock} or entity {@link EntityInteract} {@link EntityInteractSpecific}.
*
- * Let result be the return value of {@link net.minecraft.item.Item#onItemRightClick}, or {@link #cancellationResult} if the event is cancelled.
- * If we are on the client and result is not {@link EnumActionResult#SUCCESS}, the client will then continue to other hands.
+ * Let result be the return value of {@link Item#use(Level, Player, InteractionHand)}, or {@link #cancellationResult} if the event is cancelled.
+ * If we are on the client and result is not {@link InteractionResult#SUCCESS}, the client will then continue to other hands.
*/
@Cancelable
public static class RightClickItem extends PlayerInteractEvent
@@ -241,7 +250,7 @@ public class PlayerInteractEvent extends PlayerEvent
/**
* This event is fired when a player left clicks while targeting a block.
- * This event controls which of {@link net.minecraft.block.Block#onBlockClicked} and/or the item harvesting methods will be called
+ * This event controls which of {@link Block#attack(BlockState, Level, BlockPos, Player)} and/or the item harvesting methods will be called
* Canceling the event will cause none of the above noted methods to be called.
* There are various results to this event, see the getters below.
*
@@ -263,7 +272,7 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * @return If {@link net.minecraft.block.Block#onBlockClicked} should be called. Changing this has no effect in creative mode
+ * @return If {@link Block#attack(BlockState, Level, BlockPos, Player)} should be called. Changing this has no effect in creative mode
*/
public Result getUseBlock()
{
@@ -370,8 +379,8 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * @return The EnumActionResult that will be returned to vanilla if the event is cancelled, instead of calling the relevant
- * method of the event. By default, this is {@link EnumActionResult#PASS}, meaning cancelled events will cause
+ * @return The InteractionResult that will be returned to vanilla if the event is cancelled, instead of calling the relevant
+ * method of the event. By default, this is {@link InteractionResult#PASS}, meaning cancelled events will cause
* the client to keep trying more interactions until something works.
*/
public InteractionResult getCancellationResult()
@@ -380,7 +389,7 @@ public class PlayerInteractEvent extends PlayerEvent
}
/**
- * Set the EnumActionResult that will be returned to vanilla if the event is cancelled, instead of calling the relevant
+ * Set the InteractionResult that will be returned to vanilla if the event is cancelled, instead of calling the relevant
* method of the event.
* Note that this only has an effect on {@link RightClickBlock}, {@link RightClickItem}, {@link EntityInteract}, and {@link EntityInteractSpecific}.
*/
diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java
index 8d267b8114..a28bb02332 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java
@@ -22,6 +22,7 @@ package net.minecraftforge.event.entity.player;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.player.Player.BedSleepingProblem;
import net.minecraft.core.BlockPos;
+import net.minecraftforge.common.MinecraftForge;
import java.util.Optional;
@@ -29,7 +30,7 @@ import java.util.Optional;
* PlayerSleepInBedEvent is fired when a player sleeps in a bed.
*
* This event is fired whenever a player sleeps in a bed in
- * {@link EntityPlayer#trySleep(BlockPos)}.
+ * {@link Player#startSleeping(BlockPos)}.
*
* {@link #result} contains whether the player is able to sleep.
*
diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerXpEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerXpEvent.java
index 7f97a3837a..50cd96d466 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/PlayerXpEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerXpEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.entity.player;
import net.minecraft.world.entity.ExperienceOrb;
import net.minecraft.world.entity.player.Player;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
@@ -62,7 +63,7 @@ public class PlayerXpEvent extends PlayerEvent
}
/**
- * This event is fired when the player's experience changes through the {@link PlayerEntity#giveExperiencePoints} method.
+ * This event is fired when the player's experience changes through the {@link Player#giveExperiencePoints(int)} method.
* It can be cancelled, and no further processing will be done.
*/
@Cancelable
@@ -90,7 +91,7 @@ public class PlayerXpEvent extends PlayerEvent
}
/**
- * This event is fired when the player's experience level changes through the {@link PlayerEntity#addExperienceLevel} method.
+ * This event is fired when the player's experience level changes through the {@link Player#giveExperienceLevels(int)} method.
* It can be cancelled, and no further processing will be done.
*/
@Cancelable
diff --git a/src/main/java/net/minecraftforge/event/entity/player/SleepingLocationCheckEvent.java b/src/main/java/net/minecraftforge/event/entity/player/SleepingLocationCheckEvent.java
index 248e313d2b..4394438114 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/SleepingLocationCheckEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/SleepingLocationCheckEvent.java
@@ -19,8 +19,12 @@
package net.minecraftforge.event.entity.player;
+import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.BlockGetter;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.eventbus.api.Event.HasResult;
@@ -31,7 +35,7 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
* This event has a result. {@link HasResult}
*
* setResult(ALLOW) informs game that player is still "in bed"
- * setResult(DEFAULT) causes game to check {@link Block#isBed(IBlockState, net.minecraft.world.IWorldReader, BlockPos, Entity)} instead
+ * setResult(DEFAULT) causes game to check {@link Block#isBed(BlockState, BlockGetter, BlockPos, Entity)} instead
*/
@HasResult
public class SleepingLocationCheckEvent extends LivingEvent
diff --git a/src/main/java/net/minecraftforge/event/entity/player/SleepingTimeCheckEvent.java b/src/main/java/net/minecraftforge/event/entity/player/SleepingTimeCheckEvent.java
index 3701960242..4bb3428670 100644
--- a/src/main/java/net/minecraftforge/event/entity/player/SleepingTimeCheckEvent.java
+++ b/src/main/java/net/minecraftforge/event/entity/player/SleepingTimeCheckEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.entity.player;
import net.minecraft.world.entity.player.Player;
import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.Level;
import net.minecraftforge.eventbus.api.Event.HasResult;
import java.util.Optional;
@@ -32,7 +33,7 @@ import java.util.Optional;
* This event has a result. {@link HasResult}
*
* setResult(ALLOW) informs game that player can sleep at this time.
- * setResult(DEFAULT) causes game to check !{@link World#isDaytime()} instead.
+ * setResult(DEFAULT) causes game to check !{@link Level#isDay()} instead.
*/
@HasResult
public class SleepingTimeCheckEvent extends PlayerEvent
diff --git a/src/main/java/net/minecraftforge/event/furnace/FurnaceFuelBurnTimeEvent.java b/src/main/java/net/minecraftforge/event/furnace/FurnaceFuelBurnTimeEvent.java
index 3cd55aeb78..843d02c58a 100644
--- a/src/main/java/net/minecraftforge/event/furnace/FurnaceFuelBurnTimeEvent.java
+++ b/src/main/java/net/minecraftforge/event/furnace/FurnaceFuelBurnTimeEvent.java
@@ -33,9 +33,9 @@ import net.minecraftforge.eventbus.api.Event;
/**
* {@link FurnaceFuelBurnTimeEvent} is fired when determining the fuel value for an ItemStack.
*
- * To set the burn time of your own item, use {@link Item#getBurnTime(ItemStack)} instead.
+ * To set the burn time of your own item, use {@link Item#getBurnTime(ItemStack, RecipeType)} instead.
*
- * This event is fired from {@link ForgeEventFactory#getItemBurnTime(ItemStack)}.
+ * This event is fired from {@link ForgeEventFactory#getItemBurnTime(ItemStack, int, RecipeType)}.
*
* This event is {@link Cancelable} to prevent later handlers from changing the value.
*
diff --git a/src/main/java/net/minecraftforge/event/village/VillageSiegeEvent.java b/src/main/java/net/minecraftforge/event/village/VillageSiegeEvent.java
index 2477c4f934..c615a08ee8 100644
--- a/src/main/java/net/minecraftforge/event/village/VillageSiegeEvent.java
+++ b/src/main/java/net/minecraftforge/event/village/VillageSiegeEvent.java
@@ -23,12 +23,13 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.entity.ai.village.VillageSiege;
import net.minecraft.world.level.Level;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
* VillageSiegeEvent is fired just before a zombie siege finds a successful location in
- * {@link VillageSiege#trySetupSiege}, to give mods the chance to stop the siege.
+ * {@code VillageSiege#tryToSetupSiege(ServerLevel)}, to give mods the chance to stop the siege.
*
* This event is {@link Cancelable}; canceling stops the siege.
*
diff --git a/src/main/java/net/minecraftforge/event/village/VillagerTradesEvent.java b/src/main/java/net/minecraftforge/event/village/VillagerTradesEvent.java
index 75a52a8eb5..1ba57ac57c 100644
--- a/src/main/java/net/minecraftforge/event/village/VillagerTradesEvent.java
+++ b/src/main/java/net/minecraftforge/event/village/VillagerTradesEvent.java
@@ -22,8 +22,11 @@ package net.minecraftforge.event.village;
import java.util.List;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
+import net.minecraft.world.entity.npc.VillagerData;
import net.minecraft.world.entity.npc.VillagerProfession;
import net.minecraft.world.entity.npc.VillagerTrades.ItemListing;
+import net.minecraftforge.common.BasicTrade;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent;
diff --git a/src/main/java/net/minecraftforge/event/village/WandererTradesEvent.java b/src/main/java/net/minecraftforge/event/village/WandererTradesEvent.java
index eec915e176..d7e8b530bc 100644
--- a/src/main/java/net/minecraftforge/event/village/WandererTradesEvent.java
+++ b/src/main/java/net/minecraftforge/event/village/WandererTradesEvent.java
@@ -22,13 +22,15 @@ package net.minecraftforge.event.village;
import java.util.List;
import net.minecraft.world.entity.npc.VillagerTrades.ItemListing;
+import net.minecraftforge.common.BasicTrade;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent;
/**
* WandererTradesEvent is fired during the {@link FMLServerAboutToStartEvent}. It is used to gather the trade lists for the wandering merchant.
* It is fired on the {@link MinecraftForge#EVENT_BUS}.
- * The wandering merchant picks a few trades from {@link TradeType#GENERIC} and a single trade from {@link TradeType#RARE}.
+ * The wandering merchant picks a few trades from {@code generic} and a single trade from {@code rare}.
* To add trades to the merchant, simply add new trades to the list. {@link BasicTrade} provides a default implementation.
*/
public class WandererTradesEvent extends Event
diff --git a/src/main/java/net/minecraftforge/event/world/BiomeLoadingEvent.java b/src/main/java/net/minecraftforge/event/world/BiomeLoadingEvent.java
index 9f167065d1..b89ea2bdd1 100644
--- a/src/main/java/net/minecraftforge/event/world/BiomeLoadingEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/BiomeLoadingEvent.java
@@ -25,6 +25,7 @@ import net.minecraft.world.level.biome.BiomeSpecialEffects;
import net.minecraftforge.common.world.BiomeGenerationSettingsBuilder;
import net.minecraftforge.common.world.MobSpawnInfoBuilder;
import net.minecraftforge.eventbus.api.Event;
+import net.minecraftforge.eventbus.api.EventPriority;
import javax.annotation.Nullable;
diff --git a/src/main/java/net/minecraftforge/event/world/BlockEvent.java b/src/main/java/net/minecraftforge/event/world/BlockEvent.java
index edfc3a5053..45b9cc5fa6 100644
--- a/src/main/java/net/minecraftforge/event/world/BlockEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/BlockEvent.java
@@ -270,7 +270,7 @@ public class BlockEvent extends Event
}
/**
- * Fired when a liquid places a block. Use {@link #setNewState(IBlockState)} to change the result of
+ * Fired when a liquid places a block. Use {@link #setNewState(BlockState)} to change the result of
* a cobblestone generator or add variants of obsidian. Alternatively, you could execute
* arbitrary code when lava sets blocks on fire, even preventing it.
*
@@ -431,7 +431,7 @@ public class BlockEvent extends Event
/**
* Fired when when this block is right clicked by a tool to change its state.
* For example: Used to determine if an axe can strip or a shovel can path.
- * For hoes, see {@link net.minecraft.world.item.HoeItem#TILLABLES} and
+ * For hoes, see {@code net.minecraft.world.item.HoeItem#TILLABLES} and
* {@link net.minecraftforge.event.entity.player.UseHoeEvent}.
*
* This event is {@link Cancelable}. If canceled, this will prevent the tool
diff --git a/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java
index 509b3df3a6..fffdfd23d8 100644
--- a/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java
@@ -20,9 +20,17 @@
package net.minecraftforge.event.world;
import net.minecraft.nbt.CompoundTag;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.entity.ai.village.poi.PoiManager;
+import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.storage.ChunkSerializer;
+import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
+import net.minecraftforge.eventbus.api.Event;
/**
* ChunkDataEvent is fired when an event involving chunk data occurs.
@@ -57,7 +65,7 @@ public class ChunkDataEvent extends ChunkEvent
/**
* ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
* This event is fired during chunk loading in
- * {@link net.minecraft.world.chunk.storage.ChunkSerializer.read(ServerWorld, TemplateManager, PointOfInterestManager, ChunkPos, CompoundNBT)} which means it is async, so be careful.
+ * {@link ChunkSerializer#read(ServerLevel, StructureManager, PoiManager, ChunkPos, CompoundTag)} which means it is async, so be careful.
*
* This event is not {@link Cancelable}.
*
@@ -84,7 +92,7 @@ public class ChunkDataEvent extends ChunkEvent
/**
* ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
* This event is fired during chunk saving in
- * {@link AnvilChunkLoader#saveChunk(World, Chunk)}.
+ * {@code ChunkMap#save(ChunkAccess)}.
*
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
*
diff --git a/src/main/java/net/minecraftforge/event/world/ChunkEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkEvent.java
index 492651ff1f..99f79d8df8 100644
--- a/src/main/java/net/minecraftforge/event/world/ChunkEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/ChunkEvent.java
@@ -19,12 +19,23 @@
package net.minecraftforge.event.world;
+import net.minecraft.client.multiplayer.ClientChunkCache;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.ChunkBiomeContainer;
+import net.minecraft.world.level.chunk.ChunkStatus;
+import net.minecraft.world.level.chunk.LevelChunk;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
+import net.minecraftforge.eventbus.api.Event;
+
+import java.util.BitSet;
/**
* ChunkEvent is fired when an event involving a chunk occurs.
- * If a method utilizes this {@link net.minecraftforge.eventbus.api.Event} as its parameter, the method will
+ * If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.
*
* {@link #chunk} contains the Chunk this event is affecting.
@@ -55,11 +66,11 @@ public class ChunkEvent extends WorldEvent
/**
* ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.
* This event is fired during chunk loading in
- * {@link ChunkProviderClient#loadChunk(int, int)},
+ * {@link ClientChunkCache#replaceWithPacketData(int, int, ChunkBiomeContainer, FriendlyByteBuf, CompoundTag, BitSet)},
* Chunk.onChunkLoad().
- * Note: This event may be called before the underlying {@link net.minecraft.world.chunk.Chunk} is promoted to {@link net.minecraft.world.chunk.ChunkStatus#FULL}. You will cause chunk loading deadlocks if you don't delay your world interactions.
+ * Note: This event may be called before the underlying {@link LevelChunk} is promoted to {@link ChunkStatus#FULL}. You will cause chunk loading deadlocks if you don't delay your world interactions.
*
- * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is not {@link Cancelable}.
*
* This event does not have a result. {@link HasResult}
*
@@ -78,7 +89,7 @@ public class ChunkEvent extends WorldEvent
* This event is fired during chunk unloading in
* Chunk.onChunkUnload().
*
- * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is not {@link Cancelable}.
*
* This event does not have a result. {@link HasResult}
*
diff --git a/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java
index 8ee3659a8c..1e3f2a1b01 100644
--- a/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java
@@ -22,6 +22,7 @@ package net.minecraftforge.event.world;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.server.level.ServerLevel;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
/**
@@ -69,7 +70,7 @@ public class ChunkWatchEvent extends Event
/**
* ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.
* This event is fired when a chunk is added to the watched chunks of an EntityPlayer in
- * {@link net.minecraft.world.server.ChunkManager#setChunkLoadedAtClient}.
+ * {@code net.minecraft.server.level.ChunkMap#updateChunkTracking(ServerPlayer, ChunkPos, Packet[], boolean, boolean)}.
*
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
*
@@ -85,7 +86,7 @@ public class ChunkWatchEvent extends Event
/**
* ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.
* This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in
- * {@link net.minecraft.world.server.ChunkManager#setChunkLoadedAtClient}.
+ * {@code net.minecraft.server.level.ChunkMap#updateChunkTracking(ServerPlayer, ChunkPos, Packet[], boolean, boolean)}.
*
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
*
diff --git a/src/main/java/net/minecraftforge/event/world/ExplosionEvent.java b/src/main/java/net/minecraftforge/event/world/ExplosionEvent.java
index 180713e7f5..8ef5387ec4 100644
--- a/src/main/java/net/minecraftforge/event/world/ExplosionEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/ExplosionEvent.java
@@ -21,6 +21,7 @@ package net.minecraftforge.event.world;
import java.util.List;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import net.minecraft.world.entity.Entity;
diff --git a/src/main/java/net/minecraftforge/event/world/PistonEvent.java b/src/main/java/net/minecraftforge/event/world/PistonEvent.java
index 35063ef912..4e5c32a990 100644
--- a/src/main/java/net/minecraftforge/event/world/PistonEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/PistonEvent.java
@@ -39,7 +39,6 @@ public abstract class PistonEvent extends BlockEvent
/**
* @param world
* @param pos - The position of the piston
- * @param direction - The direction of the piston
* @param direction - The move direction of the piston
*/
public PistonEvent(Level world, BlockPos pos, Direction direction, PistonMoveType moveType)
@@ -74,7 +73,7 @@ public abstract class PistonEvent extends BlockEvent
}
/**
- * @return A piston structure helper for this movement. Returns null if the world stored is not a {@link World}
+ * @return A piston structure helper for this movement. Returns null if the world stored is not a {@link Level}
*/
@Nullable
public PistonStructureResolver getStructureHelper()
diff --git a/src/main/java/net/minecraftforge/event/world/SaplingGrowTreeEvent.java b/src/main/java/net/minecraftforge/event/world/SaplingGrowTreeEvent.java
index 4774a5fbf2..cb384af019 100644
--- a/src/main/java/net/minecraftforge/event/world/SaplingGrowTreeEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/SaplingGrowTreeEvent.java
@@ -22,23 +22,28 @@ package net.minecraftforge.event.world;
import java.util.Random;
import net.minecraft.core.BlockPos;
+import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.block.SaplingBlock;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event.HasResult;
/**
* SaplingGrowTreeEvent is fired when a sapling grows into a tree.
* This event is fired during sapling growth in
- * {@link BlockSapling#generateTree(World, BlockPos, IBlockState, Random)}.
+ * {@link SaplingBlock#advanceTree(ServerLevel, BlockPos, BlockState, Random)} .
*
* {@link #pos} contains the coordinates of the growing sapling.
* {@link #rand} contains an instance of Random for use.
*
- * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
+ * This event is not {@link Cancelable}.
*
* This event has a result. {@link HasResult}
* This result determines if the sapling is allowed to grow.
*
- * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
@HasResult
public class SaplingGrowTreeEvent extends WorldEvent
diff --git a/src/main/java/net/minecraftforge/event/world/StructureSpawnListGatherEvent.java b/src/main/java/net/minecraftforge/event/world/StructureSpawnListGatherEvent.java
index 83061c691e..c94992c03d 100644
--- a/src/main/java/net/minecraftforge/event/world/StructureSpawnListGatherEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/StructureSpawnListGatherEvent.java
@@ -30,6 +30,7 @@ import net.minecraft.world.level.biome.MobSpawnSettings;
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
import net.minecraft.world.level.levelgen.feature.StructureFeature;
import net.minecraftforge.eventbus.api.Event;
+import net.minecraftforge.eventbus.api.EventPriority;
/**
* This event fires when a Structure is gathering what mobs/creatures can spawn in it.
diff --git a/src/main/java/net/minecraftforge/event/world/WorldEvent.java b/src/main/java/net/minecraftforge/event/world/WorldEvent.java
index 7451c30201..32fd3cff5e 100644
--- a/src/main/java/net/minecraftforge/event/world/WorldEvent.java
+++ b/src/main/java/net/minecraftforge/event/world/WorldEvent.java
@@ -19,14 +19,23 @@
package net.minecraftforge.event.world;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.function.Supplier;
-import net.minecraft.world.entity.MobCategory;
-import net.minecraft.core.BlockPos;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.screens.Screen;
+import net.minecraft.client.multiplayer.ClientLevel;
+import net.minecraft.client.multiplayer.ClientPacketListener;
+import net.minecraft.client.renderer.LevelRenderer;
+import net.minecraft.resources.ResourceKey;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.util.ProgressListener;
import net.minecraft.world.level.LevelAccessor;
-import net.minecraft.world.level.biome.MobSpawnSettings;
+import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.storage.ServerLevelData;
+import net.minecraftforge.common.ForgeInternalHandler;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
@@ -55,11 +64,8 @@ public class WorldEvent extends Event
/**
* WorldEvent.Load is fired when Minecraft loads a world.
* This event is fired when a world is loaded in
- * {@link WorldClient#WorldClient(NetHandlerPlayClient, WorldSettings, int, EnumDifficulty, Profiler)},
- * {@link MinecraftServer#loadAllWorlds(String, String, long, WorldType, String)},
- * {@link IntegratedServer#loadAllWorlds(String, String, long, WorldType, String)}
- * {@link DimensionManager#initDimension(int)},
- * and {@link ForgeInternalHandler#onDimensionLoad(Load)}.
+ * {@link ClientLevel#ClientLevel(ClientPacketListener, ClientLevel.ClientLevelData, ResourceKey, DimensionType, int, Supplier, LevelRenderer, boolean, long)},
+ * {@code MinecraftServer#createLevels(ChunkProgressListener)}.
*
* This event is not {@link Cancelable}.
*
@@ -75,9 +81,9 @@ public class WorldEvent extends Event
/**
* WorldEvent.Unload is fired when Minecraft unloads a world.
* This event is fired when a world is unloaded in
- * {@link Minecraft#loadWorld(WorldClient, String)},
- * {@link MinecraftServer#stopServer()},
- * {@link DimensionManager#unloadWorlds()},
+ * {@link Minecraft#setLevel(ClientLevel)},
+ * {@link MinecraftServer#stopServer()},,
+ * {@link Minecraft#clearLevel(Screen)}
* {@link ForgeInternalHandler#onDimensionUnload(Unload)}.
*
* This event is not {@link Cancelable}.
@@ -94,8 +100,7 @@ public class WorldEvent extends Event
/**
* WorldEvent.Save is fired when Minecraft saves a world.
* This event is fired when a world is saved in
- * {@link WorldServer#saveAllChunks(boolean, IProgressUpdate)},
- * {@link ForgeInternalHandler#onDimensionSave(Save)}.
+ * {@link ServerLevel#save(ProgressListener, boolean, boolean)}.
*
* This event is not {@link Cancelable}.
*
diff --git a/src/main/java/net/minecraftforge/fluids/FluidAttributes.java b/src/main/java/net/minecraftforge/fluids/FluidAttributes.java
index ecc8d87d87..78b287607c 100644
--- a/src/main/java/net/minecraftforge/fluids/FluidAttributes.java
+++ b/src/main/java/net/minecraftforge/fluids/FluidAttributes.java
@@ -21,7 +21,9 @@ package net.minecraftforge.fluids;
import javax.annotation.Nullable;
+import net.minecraft.world.item.BucketItem;
import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.item.ItemStack;
@@ -44,6 +46,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
+import net.minecraft.world.phys.BlockHitResult;
/**
* Minecraft Forge Fluid Implementation
@@ -186,7 +189,7 @@ public class FluidAttributes
* Determines if this fluid should vaporize in dimensions where water vaporizes when placed.
* To preserve the intentions of vanilla, fluids that can turn lava into obsidian should vaporize.
* This prevents players from making the nether safe with a single bucket.
- * Based on {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos)}
+ * Based on {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param fluidStack The fluidStack is trying to be placed.
* @return true if this fluid should vaporize in dimensions where water vaporizes when placed.
@@ -200,9 +203,9 @@ public class FluidAttributes
}
/**
- * Called instead of placing the fluid block if {@link net.minecraft.world.dimension.Dimension#doesWaterVaporize()} and {@link #doesVaporize(FluidStack)} are true.
+ * Called instead of placing the fluid block if {@link DimensionType#ultraWarm()} and {@link #doesVaporize(BlockAndTintGetter, BlockPos, FluidStack)} are true.
* Override this to make your explosive liquid blow up instead of the default smoke, etc.
- * Based on {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos)}
+ * Based on {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param player Player who tried to place the fluid. May be null for blocks like dispensers.
* @param worldIn World to vaporize the fluid in.
diff --git a/src/main/java/net/minecraftforge/fluids/FluidUtil.java b/src/main/java/net/minecraftforge/fluids/FluidUtil.java
index 4e4e8b3a9e..13dc6a1146 100644
--- a/src/main/java/net/minecraftforge/fluids/FluidUtil.java
+++ b/src/main/java/net/minecraftforge/fluids/FluidUtil.java
@@ -23,6 +23,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.base.Preconditions;
+import net.minecraft.world.item.BucketItem;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.BucketPickup;
import net.minecraft.world.level.block.LiquidBlockContainer;
@@ -130,7 +131,7 @@ public class FluidUtil
*
* @param container The container to be filled. Will not be modified.
* Separate handling must be done to reduce the stack size, stow containers, etc, on success.
- * See {@link #tryFillContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, PlayerEntity, boolean)}.
+ * See {@link #tryFillContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, Player, boolean)}.
* @param fluidSource The fluid handler to be drained.
* @param maxAmount The largest amount of fluid that should be transferred.
* @param player The player to make the filling noise. Pass null for no noise.
@@ -173,7 +174,7 @@ public class FluidUtil
*
* @param container The filled container. Will not be modified.
* Separate handling must be done to reduce the stack size, stow containers, etc, on success.
- * See {@link #tryEmptyContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, PlayerEntity, boolean)}.
+ * See {@link #tryEmptyContainerAndStow(ItemStack, IFluidHandler, IItemHandler, int, Player, boolean)}.
* @param fluidDestination The fluid handler to be filled by the container.
* @param maxAmount The largest amount of fluid that should be transferred.
* @param player Player for making the bucket drained sound. Pass null for no noise.
@@ -514,11 +515,11 @@ public class FluidUtil
}
/**
- * ItemStack version of {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, IFluidHandler, FluidStack)}.
+ * ItemStack version of {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, IFluidHandler, FluidStack)}.
* Use the returned {@link FluidActionResult} to update the container ItemStack.
*
* @param player Player who places the fluid. May be null for blocks like dispensers.
- * @param world World to place the fluid in
+ * @param world Level to place the fluid in
* @param hand
* @param pos The position in the world to place the fluid block
* @param container The fluid container holding the fluidStack to place
@@ -542,10 +543,10 @@ public class FluidUtil
* Honors the amount of fluid contained by the used container.
* Checks if water-like fluids should vaporize like in the nether.
*
- * Modeled after {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos, BlockRayTraceResult)}
+ * Modeled after {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
* @param player Player who places the fluid. May be null for blocks like dispensers.
- * @param world World to place the fluid in
+ * @param world Level to place the fluid in
* @param hand
* @param pos The position in the world to place the fluid block
* @param fluidSource The fluid source holding the fluidStack to place
@@ -618,8 +619,8 @@ public class FluidUtil
/**
* Internal method for getting a fluid block handler for placing a fluid.
*
- * Modders: Instead of this method, use {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, ItemStack, FluidStack)}
- * or {@link #tryPlaceFluid(PlayerEntity, World, Hand, BlockPos, IFluidHandler, FluidStack)}
+ * Modders: Instead of this method, use {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, ItemStack, FluidStack)}
+ * or {@link #tryPlaceFluid(Player, Level, InteractionHand, BlockPos, IFluidHandler, FluidStack)}
*/
private static IFluidHandler getFluidBlockHandler(Fluid fluid, Level world, BlockPos pos)
{
@@ -629,9 +630,9 @@ public class FluidUtil
/**
* Destroys a block when a fluid is placed in the same position.
- * Modeled after {@link net.minecraft.item.BucketItem#tryPlaceContainedLiquid(PlayerEntity, World, BlockPos, BlockRayTraceResult)}
+ * Modeled after {@link BucketItem#emptyContents(Player, Level, BlockPos, BlockHitResult)}
*
- * This is a helper method for implementing {@link IFluidBlock#place(World, BlockPos, FluidStack, IFluidHandler.FluidAction)}.
+ * This is a helper method for implementing {@link IFluidBlock#place(Level, BlockPos, FluidStack, IFluidHandler.FluidAction)}.
*
* @param world the world that the fluid will be placed in
* @param pos the location that the fluid will be placed
diff --git a/src/main/java/net/minecraftforge/fluids/IFluidBlock.java b/src/main/java/net/minecraftforge/fluids/IFluidBlock.java
index 8ab16dac0e..30b33803b9 100644
--- a/src/main/java/net/minecraftforge/fluids/IFluidBlock.java
+++ b/src/main/java/net/minecraftforge/fluids/IFluidBlock.java
@@ -29,8 +29,6 @@ import javax.annotation.Nonnull;
/**
* Implement this interface on Block classes which represent world-placeable Fluids.
*
- * NOTE: Using/extending the reference implementations {@link BlockFluidBase} is encouraged.
- *
*/
public interface IFluidBlock
{
diff --git a/src/main/java/net/minecraftforge/fluids/capability/IFluidHandler.java b/src/main/java/net/minecraftforge/fluids/capability/IFluidHandler.java
index d52fb0f840..c38e2224c2 100644
--- a/src/main/java/net/minecraftforge/fluids/capability/IFluidHandler.java
+++ b/src/main/java/net/minecraftforge/fluids/capability/IFluidHandler.java
@@ -26,7 +26,7 @@ import net.minecraftforge.fluids.*;
/**
* Implement this interface as a capability which should handle fluids, generally storing them in
* one or more internal {@link IFluidTank} objects.
- *
+ *
+ *
*
* @param {@code
* private static final DeferredRegister
+ *}
+ * Level Player OP
*
* Level Player OP
* ALL true true OP false true