mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
1.16.3 Update
Also included a bunch of warning cleanups.
This commit is contained in:
1 parent
2353cd982a
commit
c75eb9e7cf
73 files changed
+73
-381
No files matched your search
@@ -28,14 +28,6 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.eventbus.api.GenericEvent;
|
||||
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.eventbus.api.GenericEvent;
|
||||
|
||||
/**
|
||||
* Fired whenever an object with Capabilities support {currently TileEntity/Item/Entity)
|
||||
* is created. Allowing for the attachment of arbitrary capability providers.
|
||||
|
||||
@@ -22,7 +22,6 @@ package net.minecraftforge.event;
|
||||
import net.minecraft.world.Difficulty;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
|
||||
@@ -31,13 +30,11 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onDifficultyChange(EnumDifficulty, EnumDifficulty)}.<br>
|
||||
* <br>
|
||||
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br>
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult}<br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
public class DifficultyChangeEvent extends net.minecraftforge.eventbus.api.Event
|
||||
public class DifficultyChangeEvent extends Event
|
||||
{
|
||||
private final Difficulty difficulty;
|
||||
private final Difficulty oldDifficulty;
|
||||
|
||||
@@ -28,7 +28,6 @@ import javax.annotation.Nullable;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import net.minecraft.block.NetherPortalBlock;
|
||||
import net.minecraft.block.PortalSize;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
@@ -69,7 +68,6 @@ import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
@@ -81,8 +79,6 @@ import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.MobSpawnInfo;
|
||||
import net.minecraft.world.storage.IServerWorldInfo;
|
||||
import net.minecraft.world.storage.PlayerData;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class PotionBrewEvent extends Event
|
||||
* <br>
|
||||
* If this event is canceled, and items have been modified, PotionBrewEvent.Post will automatically be fired.
|
||||
**/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public static class Pre extends PotionBrewEvent
|
||||
{
|
||||
public Pre(NonNullList<ItemStack> stacks)
|
||||
|
||||
@@ -36,17 +36,17 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
* This event does not have a result. {@link HasResult}<br>
|
||||
*<br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public class EntityMountEvent extends EntityEvent
|
||||
{
|
||||
|
||||
|
||||
private final Entity entityMounting;
|
||||
private final Entity entityBeingMounted;
|
||||
private final World worldObj;
|
||||
|
||||
|
||||
private final boolean isMounting;
|
||||
|
||||
public EntityMountEvent(Entity entityMounting, Entity entityBeingMounted, World entityWorld, boolean isMounting)
|
||||
@@ -57,12 +57,12 @@ public class EntityMountEvent extends EntityEvent
|
||||
this.worldObj = entityWorld;
|
||||
this.isMounting = isMounting;
|
||||
}
|
||||
|
||||
|
||||
public boolean isMounting()
|
||||
{
|
||||
return isMounting;
|
||||
}
|
||||
|
||||
|
||||
public boolean isDismounting()
|
||||
{
|
||||
return !isMounting;
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraftforge.eventbus.api.Cancelable;
|
||||
* 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}.
|
||||
*/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public class AnimalTameEvent extends LivingEvent
|
||||
{
|
||||
private final AnimalEntity animal;
|
||||
|
||||
@@ -28,8 +28,8 @@ import net.minecraftforge.eventbus.api.Cancelable;
|
||||
* the amount of experience points dropped or completely prevent dropping of experience
|
||||
* by canceling the event.
|
||||
*/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public class LivingExperienceDropEvent extends LivingEvent
|
||||
@Cancelable
|
||||
public class LivingExperienceDropEvent extends LivingEvent
|
||||
{
|
||||
private final PlayerEntity attackingPlayer;
|
||||
private final int originalExperiencePoints;
|
||||
|
||||
@@ -40,7 +40,7 @@ import net.minecraft.entity.LivingEntity;
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public class LivingFallEvent extends LivingEvent
|
||||
{
|
||||
private float distance;
|
||||
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.entity.LivingEntity;
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public class LivingHealEvent extends LivingEvent
|
||||
{
|
||||
private float amount;
|
||||
|
||||
@@ -22,7 +22,6 @@ package net.minecraftforge.event.entity.player;
|
||||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
|
||||
/**
|
||||
* This event is fired when a player gets an advancement.
|
||||
|
||||
@@ -38,7 +38,7 @@ import javax.annotation.Nullable;
|
||||
* ItemStack to your inventory and reducing the stack size to process.
|
||||
* setResult(ALLOW) is the same as the old setHandled();
|
||||
*/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
@Event.HasResult
|
||||
public class FillBucketEvent extends PlayerEvent
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.List;
|
||||
* Canceling the event will cause the player to receive no items at all.
|
||||
* The hook will still take the damage specified
|
||||
*/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
@Cancelable
|
||||
public class ItemFishedEvent extends PlayerEvent
|
||||
{
|
||||
private final NonNullList<ItemStack> stacks = NonNullList.create();
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity.SleepResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -35,8 +34,6 @@ import java.util.Optional;
|
||||
* <br>
|
||||
* {@link #result} contains whether the player is able to sleep. <br>
|
||||
* <br>
|
||||
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult}
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
|
||||
Reference in new issue
Block a user