diff --git a/src/main/java/com/github/alexmodguy/alexscaves/client/ClientProxy.java b/src/main/java/com/github/alexmodguy/alexscaves/client/ClientProxy.java index 5b7ba8fec..358f9ca3d 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/client/ClientProxy.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/client/ClientProxy.java @@ -914,7 +914,7 @@ public void setBossBarRender(UUID bossBar, int renderType) { } public void renderVanillaMapDecoration(MapDecoration mapDecoration, int index){ - ClientEvents.renderVanillaMapDecoration(mapDecoration, index); + ClientEvents.renderVanillaMapDecoration(mapDecoration, index + 1); } } diff --git a/src/main/java/com/github/alexmodguy/alexscaves/client/event/ClientEvents.java b/src/main/java/com/github/alexmodguy/alexscaves/client/event/ClientEvents.java index 4781db3aa..25bf80e63 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/client/event/ClientEvents.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/client/event/ClientEvents.java @@ -81,10 +81,10 @@ public class ClientEvents { - public static final ResourceLocation POTION_EFFECT_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/potion_effect_hud_overlays.png"); - public static final ResourceLocation BOSS_BAR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/boss_bar_hud_overlays.png"); - public static final ResourceLocation DINOSAUR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/dinosaur_hud_overlays.png"); - public static final ResourceLocation ARMOR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/armor_hud_overlays.png"); + private static final ResourceLocation POTION_EFFECT_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/potion_effect_hud_overlays.png"); + private static final ResourceLocation BOSS_BAR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/boss_bar_hud_overlays.png"); + private static final ResourceLocation DINOSAUR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/dinosaur_hud_overlays.png"); + private static final ResourceLocation ARMOR_HUD_OVERLAYS = new ResourceLocation(AlexsCaves.MODID, "textures/misc/armor_hud_overlays.png"); private static final ResourceLocation SUBMARINE_SHADER = new ResourceLocation(AlexsCaves.MODID, "shaders/post/submarine_light.json"); private static final ResourceLocation WATCHER_SHADER = new ResourceLocation(AlexsCaves.MODID, "shaders/post/watcher_perspective.json"); private static final ResourceLocation TRAIL_TEXTURE = new ResourceLocation(AlexsCaves.MODID, "textures/particle/teletor_trail.png"); @@ -94,6 +94,11 @@ public class ClientEvents { private static Vec3 lastSampledFogColor = Vec3.ZERO; private static Vec3 lastSampledWaterFogColor = Vec3.ZERO; + public static PoseStack lastVanillaMapPoseStack; + public static MultiBufferSource lastVanillaMapRenderBuffer; + public static int lastVanillaMapRenderPackedLight; + private static final RenderType UNDERGROUND_CABIN_MAP_ICONS = RenderType.text(new ResourceLocation(AlexsCaves.MODID, "textures/misc/underground_cabin_map_icons.png")); + @SubscribeEvent public void setupEntityRotations(EventLivingRenderer.SetupRotations event) { if (event.getEntity() instanceof MagneticEntityAccessor magnetic) { @@ -1006,11 +1011,6 @@ public void outlineColor(EventGetOutlineColor event) { } } - public static PoseStack lastVanillaMapPoseStack; - public static MultiBufferSource lastVanillaMapRenderBuffer; - public static int lastVanillaMapRenderPackedLight; - static final RenderType UNDERGROUND_CABIN_MAP_ICONS = RenderType.text(new ResourceLocation(AlexsCaves.MODID, "textures/misc/underground_cabin_map_icons.png")); - public static void renderVanillaMapDecoration(MapDecoration mapdecoration, int k) { if(mapdecoration.getType() == ACVanillaMapUtil.UNDERGROUND_CABIN_MAP_DECORATION){ MultiBufferSource multiBufferSource = lastVanillaMapRenderBuffer == null ? Minecraft.getInstance().renderBuffers().bufferSource() : lastVanillaMapRenderBuffer; diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/entity/living/DeepOneBaseEntity.java b/src/main/java/com/github/alexmodguy/alexscaves/server/entity/living/DeepOneBaseEntity.java index d7a8566c0..b056c4c33 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/entity/living/DeepOneBaseEntity.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/entity/living/DeepOneBaseEntity.java @@ -30,6 +30,7 @@ import net.minecraft.world.Difficulty; import net.minecraft.world.InteractionHand; import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageTypes; import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.control.MoveControl; @@ -157,7 +158,7 @@ public void tick() { if (this.getSummonTime() > 0) { if (summonedProgress < 20.0F) { if (summonedProgress == 0) { - if(!level().isClientSide){ + if (!level().isClientSide) { this.level().broadcastEntityEvent(this, (byte) 61); } this.playSound(ACSoundRegistry.MAGIC_CONCH_SUMMON.get()); @@ -170,11 +171,11 @@ public void tick() { } } if (getSummonTime() > 0) { - if(!level().isClientSide){ + if (!level().isClientSide) { setSummonTime(getSummonTime() - 1); } if (getSummonTime() == 0) { - if(!level().isClientSide){ + if (!level().isClientSide) { this.level().broadcastEntityEvent(this, (byte) 61); } this.playSound(ACSoundRegistry.MAGIC_CONCH_SUMMON.get()); @@ -467,6 +468,11 @@ public void calculateEntityAnimation(boolean flying) { } } + @Override + public boolean isInvulnerableTo(DamageSource damageSource) { + return super.isInvulnerableTo(damageSource) || damageSource.is(DamageTypes.IN_WALL); + } + @Override public boolean hurt(DamageSource damageSource, float damageValue) { boolean sup = super.hurt(damageSource, damageValue); @@ -541,11 +547,11 @@ protected void checkAndDealMeleeDamage(LivingEntity target, float multiplier, fl public abstract Animation getTradingAnimation(); - public boolean soundsAngry(){ + public boolean soundsAngry() { return this.entityData.get(SOUNDS_ANGRY); } - public void setSoundsAngry(boolean angrySounding){ + public void setSoundsAngry(boolean angrySounding) { this.entityData.set(SOUNDS_ANGRY, angrySounding); }