mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Add separate icons for backwards and forwards kicks
This commit is contained in:
parent
a37c2d660d
commit
92cb78dc94
6 changed files with 15 additions and 1 deletions
|
@ -63,6 +63,7 @@ public class EarthPonyKickAbility implements Ability<Pos> {
|
|||
Identifier id = Abilities.REGISTRY.getId(this);
|
||||
return new Identifier(id.getNamespace(), "textures/gui/ability/" + id.getPath()
|
||||
+ "_" + player.getObservedSpecies().getId().getPath()
|
||||
+ "_" + (getKickDirection(player) > 0 ? "forward" : "backward")
|
||||
+ ".png");
|
||||
}
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class EarthPonyKickAbility implements Ability<Pos> {
|
|||
|
||||
player.asEntity().addExhaustion(3);
|
||||
|
||||
for (var e : VecHelper.findInRange(player.asEntity(), w, kickLocation.vec(), 2, EntityPredicates.EXCEPT_CREATIVE_OR_SPECTATOR)) {
|
||||
for (var e : VecHelper.findInRange(player.asEntity(), w, kickLocation.vec(), 2.5, EntityPredicates.EXCEPT_CREATIVE_OR_SPECTATOR)) {
|
||||
if (e instanceof LivingEntity entity) {
|
||||
float calculatedStrength = 0.5F * (1 + player.getLevel().getScaled(9));
|
||||
|
||||
|
|
|
@ -39,6 +39,19 @@ public class BaseZapAppleLeavesBlock extends LeavesBlock implements TintedBlock
|
|||
tryAdvanceStage(state, world, pos, random);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
||||
if (world instanceof ServerWorld sw) {
|
||||
ZapAppleStageStore store = ZapAppleStageStore.get(sw);
|
||||
ZapAppleStageStore.Stage currentStage = store.getStage();
|
||||
if (currentStage == ZapAppleStageStore.Stage.HIBERNATING) {
|
||||
return currentStage.getNewState(state);
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
super.scheduledTick(state, world, pos, random);
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Loading…
Reference in a new issue