Remove DefaultPlayerSpecies. I don't need to do this

This commit is contained in:
Sollace 2018-09-13 12:45:06 +02:00
parent 511e5955d8
commit f413e92223
3 changed files with 2 additions and 89 deletions

View file

@ -1,79 +0,0 @@
package com.minelittlepony.unicopia.player;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.power.IPower;
import com.minelittlepony.unicopia.spell.IMagicEffect;
import net.minecraft.entity.player.EntityPlayer;
final class DefaultPlayerSpecies implements IPlayer, IAbilityReceiver {
public static final IPlayer INSTANCE = new DefaultPlayerSpecies();
private DefaultPlayerSpecies() {
}
@Override
public Race getPlayerSpecies() {
return Race.EARTH;
}
@Override
public void setPlayerSpecies(Race race) {
}
@Override
public void sendCapabilities(boolean full) {
}
@Override
public void tryUseAbility(IPower<?> power) {
}
@Override
public void tryClearAbility() {
}
@Override
public int getRemainingCooldown() {
return 0;
}
@Override
public IAbilityReceiver getAbilities() {
return this;
}
@Override
public boolean isClientPlayer() {
return false;
}
@Override
public void onUpdate(EntityPlayer entity) {
}
@Override
public void setEffect(IMagicEffect effect) {
}
@Override
public IMagicEffect getEffect() {
return null;
}
@Override
public EntityPlayer getOwner() {
return null;
}
@Override
public void copyFrom(IPlayer oldPlayer) {
}
}

View file

@ -23,13 +23,9 @@ public interface IPlayer extends ICaster<EntityPlayer>, InbtSerialisable, IUpdat
void copyFrom(IPlayer oldPlayer);
default void onEntityEat() {
void onEntityEat();
}
default void onFall(float distance, float damageMultiplier) {
}
void onFall(float distance, float damageMultiplier);
static EntityPlayer getPlayerEntity(UUID playerId) {
EntityPlayer player = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUUID(playerId);

View file

@ -28,10 +28,6 @@ public class PlayerSpeciesList {
}
public IPlayer getPlayer(EntityPlayer player) {
if (player == null) {
return DefaultPlayerSpecies.INSTANCE;
}
return FBS.of(player).getPlayer();
}