Add race-specific icons for common abilities
|
@ -31,6 +31,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.predicate.entity.EntityPredicates;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -57,6 +58,14 @@ public class EarthPonyKickAbility implements Ability<Pos> {
|
|||
return race.canUseEarth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier getIcon(Pony player) {
|
||||
Identifier id = Abilities.REGISTRY.getId(this);
|
||||
return new Identifier(id.getNamespace(), "textures/gui/ability/" + id.getPath()
|
||||
+ "_" + player.getObservedSpecies().getId().getPath()
|
||||
+ ".png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getCostEstimate(Pony player) {
|
||||
return TraceHelper.findBlock(player.asEntity(), getKickDirection(player) * 6, 1)
|
||||
|
|
|
@ -27,6 +27,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockBox;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
|
@ -61,6 +62,14 @@ public class EarthPonyStompAbility implements Ability<Hit> {
|
|||
return race.canUseEarth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier getIcon(Pony player) {
|
||||
Identifier id = Abilities.REGISTRY.getId(this);
|
||||
return new Identifier(id.getNamespace(), "textures/gui/ability/" + id.getPath()
|
||||
+ "_" + player.getObservedSpecies().getId().getPath()
|
||||
+ ".png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getCostEstimate(Pony player) {
|
||||
return rad;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class PegasusFlightToggleAbility implements Ability<Hit> {
|
|||
Identifier id = Abilities.REGISTRY.getId(this);
|
||||
return new Identifier(id.getNamespace(), "textures/gui/ability/" + id.getPath()
|
||||
+ (player.getPhysics().isFlying() ? "_land" : "_takeoff")
|
||||
+ (player.getObservedSpecies() == Race.CHANGELING ? "_changeling" : "")
|
||||
+ "_" + player.getObservedSpecies().getId().getPath()
|
||||
+ ".png");
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 2 KiB |
After Width: | Height: | Size: 5 KiB |
After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |