mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 15:08:27 +02:00
Remove a bunch of spurious _INVALID_ methods.
This commit is contained in:
parent
dc7d31b00d
commit
ab09b27ef4
@ -70,17 +70,4 @@ public class CraftArrow extends AbstractProjectile implements Arrow {
|
||||
public EntityType getType() {
|
||||
return EntityType.ARROW;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public LivingEntity _INVALID_getShooter() {
|
||||
if (getHandle().shooter == null) {
|
||||
return null;
|
||||
}
|
||||
return (LivingEntity) getHandle().shooter.getBukkitEntity();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setShooter(LivingEntity shooter) {
|
||||
getHandle().shooter = ((CraftLivingEntity) shooter).getHandle();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.EnderDragonPart;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
|
||||
public class CraftEnderDragonPart extends CraftComplexPart implements EnderDragonPart {
|
||||
public CraftEnderDragonPart(CraftServer server, EntityComplexPart entity) {
|
||||
@ -54,34 +53,4 @@ public class CraftEnderDragonPart extends CraftComplexPart implements EnderDrago
|
||||
public void resetMaxHealth() {
|
||||
getParent().resetMaxHealth();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_damage(int amount) {
|
||||
damage(amount);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_damage(int amount, Entity source) {
|
||||
damage(amount, source);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getHealth() {
|
||||
return NumberConversions.ceil(getHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setHealth(int health) {
|
||||
setHealth(health);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getMaxHealth() {
|
||||
return NumberConversions.ceil(getMaxHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setMaxHealth(int health) {
|
||||
setMaxHealth(health);
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Fireball;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -73,17 +72,4 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
|
||||
public EntityType getType() {
|
||||
return EntityType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setShooter(LivingEntity shooter) {
|
||||
setShooter(shooter);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public LivingEntity _INVALID_getShooter() {
|
||||
if (getHandle().shooter != null) {
|
||||
return (LivingEntity) getHandle().shooter.getBukkitEntity();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Fish;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
|
||||
public class CraftFish extends AbstractProjectile implements Fish {
|
||||
@ -63,14 +62,4 @@ public class CraftFish extends AbstractProjectile implements Fish {
|
||||
Validate.isTrue(chance >= 0 && chance <= 1, "The bite chance must be between 0 and 1.");
|
||||
this.biteChance = chance;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public LivingEntity _INVALID_getShooter() {
|
||||
return (LivingEntity) getShooter();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setShooter(LivingEntity shooter) {
|
||||
setShooter(shooter);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -19,9 +18,7 @@ import net.minecraft.server.EntityFireball;
|
||||
import net.minecraft.server.EntityInsentient;
|
||||
import net.minecraft.server.EntityLargeFireball;
|
||||
import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.EntityLlama;
|
||||
import net.minecraft.server.EntityLlamaSpit;
|
||||
import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.EntityPotion;
|
||||
import net.minecraft.server.EntityProjectile;
|
||||
import net.minecraft.server.EntityShulkerBullet;
|
||||
@ -77,7 +74,6 @@ import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.potion.PotionType;
|
||||
import org.bukkit.util.BlockIterator;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@ -469,46 +465,6 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
getHandle().setFlag(7, gliding);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getLastDamage() {
|
||||
return NumberConversions.ceil(getLastDamage());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setLastDamage(int damage) {
|
||||
setLastDamage(damage);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_damage(int amount) {
|
||||
damage(amount);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_damage(int amount, Entity source) {
|
||||
damage(amount, source);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getHealth() {
|
||||
return NumberConversions.ceil(getHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setHealth(int health) {
|
||||
setHealth(health);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getMaxHealth() {
|
||||
return NumberConversions.ceil(getMaxHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setMaxHealth(int health) {
|
||||
setMaxHealth(health);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttributeInstance getAttribute(Attribute attribute) {
|
||||
return getHandle().craftAttributes.getAttribute(attribute);
|
||||
|
@ -4,12 +4,10 @@ import net.minecraft.server.Blocks;
|
||||
import net.minecraft.server.EntityMinecartAbstract;
|
||||
|
||||
import net.minecraft.server.IBlockData;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
@ -64,16 +62,6 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
return (EntityMinecartAbstract) entity;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setDamage(int damage) {
|
||||
setDamage(damage);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int _INVALID_getDamage() {
|
||||
return NumberConversions.ceil(getDamage());
|
||||
}
|
||||
|
||||
public void setDisplayBlock(MaterialData material) {
|
||||
if(material != null) {
|
||||
IBlockData block = CraftMagicNumbers.getBlock(material.getItemTypeId()).fromLegacyData(material.getData());
|
||||
|
@ -4,7 +4,6 @@ import net.minecraft.server.EntityLiving;
|
||||
import net.minecraft.server.EntityProjectile;
|
||||
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
|
||||
@ -39,24 +38,4 @@ public abstract class CraftProjectile extends AbstractProjectile implements Proj
|
||||
public String toString() {
|
||||
return "CraftProjectile";
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public LivingEntity _INVALID_getShooter() {
|
||||
if (getHandle().shooter == null) {
|
||||
return null;
|
||||
}
|
||||
return (LivingEntity) getHandle().shooter.getBukkitEntity();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setShooter(LivingEntity shooter) {
|
||||
if (shooter == null) {
|
||||
return;
|
||||
}
|
||||
getHandle().shooter = ((CraftLivingEntity) shooter).getHandle();
|
||||
if (shooter instanceof CraftHumanEntity) {
|
||||
getHandle().shooterName = ((CraftHumanEntity) shooter).getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,17 +47,4 @@ public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBul
|
||||
public EntityShulkerBullet getHandle() {
|
||||
return (EntityShulkerBullet) entity;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public LivingEntity _INVALID_getShooter() {
|
||||
if (getHandle().getShooter() == null) {
|
||||
return null;
|
||||
}
|
||||
return (LivingEntity) getHandle().getShooter().getBukkitEntity();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void _INVALID_setShooter(LivingEntity shooter) {
|
||||
getHandle().setShooter(((CraftLivingEntity) shooter).getHandle());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user