mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Reduce seaponies' visibility on land and fix suppressed races not transferring when respawning
This commit is contained in:
parent
2305775a55
commit
3f480b6664
2 changed files with 14 additions and 0 deletions
|
@ -55,6 +55,11 @@ public class WorldRenderDelegate {
|
|||
RenderSystem.setShaderFogEnd(RenderSystem.getShaderFogEnd() + 190);
|
||||
}
|
||||
}
|
||||
if (camera.getSubmersionType() == CameraSubmersionType.NONE) {
|
||||
if (EquinePredicates.PLAYER_SEAPONY.test(MinecraftClient.getInstance().player)) {
|
||||
RenderSystem.setShaderFogStart(-130);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean beforeEntityRender(Entity entity,
|
||||
|
|
|
@ -57,6 +57,7 @@ import net.minecraft.registry.tag.DamageTypeTags;
|
|||
import net.minecraft.registry.tag.FluidTags;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
|
@ -464,6 +465,10 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
entity.setAir(entity.getAir() - 1);
|
||||
}
|
||||
|
||||
if (entity.age % 60 == 0) {
|
||||
entity.playSound(SoundEvents.ENTITY_TURTLE_AMBIENT_LAND, 1, 1);
|
||||
}
|
||||
|
||||
if (entity.getAir() == -20) {
|
||||
entity.setAir(0);
|
||||
entity.damage(entity.getDamageSources().dryOut(), 2);
|
||||
|
@ -872,10 +877,13 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
&& oldPlayer.respawnRace.isUnset())
|
||||
|| oldPlayer.getSpecies().isUnset();
|
||||
|
||||
Race oldSuppressedRace = oldPlayer.getSuppressedRace();
|
||||
|
||||
if (alive) {
|
||||
oldPlayer.getSpellSlot().stream(true).forEach(getSpellSlot()::put);
|
||||
} else {
|
||||
if (forcedSwap) {
|
||||
oldSuppressedRace = Race.UNSET;
|
||||
Channel.SERVER_SELECT_TRIBE.sendToPlayer(new MsgTribeSelect(Race.allPermitted(entity), "gui.unicopia.tribe_selection.respawn"), (ServerPlayerEntity)entity);
|
||||
} else {
|
||||
oldPlayer.getSpellSlot().stream(true).filter(SpellPredicate.IS_PLACED).forEach(getSpellSlot()::put);
|
||||
|
@ -894,6 +902,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
}
|
||||
|
||||
setSpecies(oldPlayer.respawnRace != Race.UNSET && !alive ? oldPlayer.respawnRace : oldPlayer.getSpecies());
|
||||
setSuppressedRace(oldSuppressedRace);
|
||||
getDiscoveries().copyFrom(oldPlayer.getDiscoveries(), alive);
|
||||
getPhysics().copyFrom(oldPlayer.getPhysics(), alive);
|
||||
if (!forcedSwap) {
|
||||
|
|
Loading…
Reference in a new issue