diff --git a/common/src/main/java/argent_matter/gcys/client/gui/screen/ExtendedButton.java b/common/src/main/java/argent_matter/gcys/client/gui/screen/ExtendedButton.java index 9ccc848a..10cd6d85 100644 --- a/common/src/main/java/argent_matter/gcys/client/gui/screen/ExtendedButton.java +++ b/common/src/main/java/argent_matter/gcys/client/gui/screen/ExtendedButton.java @@ -57,18 +57,18 @@ protected void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, flo } public void updateTooltip() { - boolean bl = this.isHovered || this.isFocused() && Minecraft.getInstance().getLastInputType().isKeyboard(); - if (bl != this.wasHoveredOrFocused) { - if (bl) { + boolean hovered = this.isHovered || this.isFocused() && Minecraft.getInstance().getLastInputType().isKeyboard(); + if (hovered != this.wasHoveredOrFocused) { + if (hovered) { this.hoverOrFocusedStartTime = Util.getMillis(); } - this.wasHoveredOrFocused = bl; + this.wasHoveredOrFocused = hovered; } - if (bl && Util.getMillis() - this.hoverOrFocusedStartTime > (long)this.tooltipMsDelay) { + if (hovered && Util.getMillis() - this.hoverOrFocusedStartTime > (long)this.tooltipMsDelay) { Screen screen = Minecraft.getInstance().screen; - if (screen != null) { + if (screen != null && this.tooltip != null) { screen.setTooltipForNextRenderPass(this.tooltip.onTooltip(this), this.createTooltipPositioner(), this.isFocused()); } } diff --git a/common/src/main/java/argent_matter/gcys/common/entity/RocketEntity.java b/common/src/main/java/argent_matter/gcys/common/entity/RocketEntity.java index 864197c0..bf0fc04f 100644 --- a/common/src/main/java/argent_matter/gcys/common/entity/RocketEntity.java +++ b/common/src/main/java/argent_matter/gcys/common/entity/RocketEntity.java @@ -588,7 +588,7 @@ public void addBlock(PosWithState state) { } blocks.add(state); - this.entityData.set(POSITIONED_STATES, blocks); + this.entityData.set(POSITIONED_STATES, blocks, true); BlockPos pos = state.pos(); BlockPos size = this.entityData.get(SIZE); this.entityData.set(SIZE, new BlockPos( @@ -618,7 +618,7 @@ public List getBlocks() { public void addSeatPos(BlockPos pos) { List seats = this.entityData.get(SEAT_POSITIONS); seats.add(pos); - this.entityData.set(SEAT_POSITIONS, seats); + this.entityData.set(SEAT_POSITIONS, seats, true); } public List getSeatPositions() { diff --git a/common/src/main/java/argent_matter/gcys/common/entity/data/EntityOxygenSystem.java b/common/src/main/java/argent_matter/gcys/common/entity/data/EntityOxygenSystem.java index b57c1447..2e739480 100644 --- a/common/src/main/java/argent_matter/gcys/common/entity/data/EntityOxygenSystem.java +++ b/common/src/main/java/argent_matter/gcys/common/entity/data/EntityOxygenSystem.java @@ -2,7 +2,6 @@ import argent_matter.gcys.GCyS; -import argent_matter.gcys.common.data.GCySDimensionTypes; import argent_matter.gcys.common.item.armor.SpaceSuitArmorItem; import argent_matter.gcys.config.GcysConfig; import argent_matter.gcys.data.loader.PlanetData; @@ -13,9 +12,6 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.FluidTags; -import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.world.damagesource.DamageSources; -import net.minecraft.world.damagesource.DamageTypes; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.Level; @@ -73,7 +69,7 @@ public static void oxygenTick(LivingEntity entity, ServerLevel level) { return; }*/ - if (level.dimension() != GCySDimensionTypes.SPACE_LEVEL && !entity.isUnderWater()) { + if (!PlanetData.isSpaceLevel(level) && !entity.isUnderWater()) { return; } diff --git a/common/src/main/java/argent_matter/gcys/common/entity/data/EntityTemperatureSystem.java b/common/src/main/java/argent_matter/gcys/common/entity/data/EntityTemperatureSystem.java index 339c7dd9..e7ec72f3 100644 --- a/common/src/main/java/argent_matter/gcys/common/entity/data/EntityTemperatureSystem.java +++ b/common/src/main/java/argent_matter/gcys/common/entity/data/EntityTemperatureSystem.java @@ -9,7 +9,6 @@ import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.valueproviders.UniformInt; -import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity;