mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Clean up Entity patches, remove extra method. Closes #5494
This commit is contained in:
1 parent
1a833a9267
commit
60315d079b
2 files changed
+30
-24
No files matched your search
@@ -45,8 +45,10 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
|
||||
import net.minecraftforge.common.util.INBTSerializable;
|
||||
import net.minecraftforge.common.util.ITeleporter;
|
||||
|
||||
public interface IForgeEntity extends ICapabilitySerializable<NBTTagCompound>
|
||||
{
|
||||
@@ -157,16 +159,27 @@ public interface IForgeEntity extends ICapabilitySerializable<NBTTagCompound>
|
||||
}
|
||||
|
||||
/**
|
||||
* If the rider should be dismounted from the entity when the entity goes under water
|
||||
* Checks if this entity can continue to be ridden while it is underwater.
|
||||
*
|
||||
* @param rider The entity that is riding
|
||||
* @return if the entity should be dismounted when under water
|
||||
* @param rider The entity that is riding this entity
|
||||
* @return {@code true} if the entity can continue to ride underwater. {@code false} otherwise.
|
||||
*/
|
||||
default boolean shouldDismountInWater(Entity rider)
|
||||
default boolean canBeRiddenInWater(Entity rider)
|
||||
{
|
||||
return this instanceof EntityLivingBase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override instead of
|
||||
* {@link Entity#changeDimension(DimensionType, ITeleporter)} if your entity
|
||||
* needs special handling for specific teleporters.
|
||||
*
|
||||
* @param type The target dimension
|
||||
* @param teleporter The teleporter being used to move the entity to the dimension
|
||||
* @return The entity to be placed in the target dimension. {@code null} if the entity should despawn.
|
||||
*/
|
||||
@Nullable
|
||||
Entity changeDimension(DimensionType type, ITeleporter teleporter);
|
||||
|
||||
/**
|
||||
* Checks if this {@link Entity} can trample a {@link Block}.
|
||||
|
||||
Reference in new issue
Block a user