Skip to content

Commit

Permalink
update stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Oct 24, 2023
1 parent a7d5c92 commit 534e7c4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -618,7 +618,7 @@ public List<PosWithState> getBlocks() {
public void addSeatPos(BlockPos pos) {
List<BlockPos> seats = this.entityData.get(SEAT_POSITIONS);
seats.add(pos);
this.entityData.set(SEAT_POSITIONS, seats);
this.entityData.set(SEAT_POSITIONS, seats, true);
}

public List<BlockPos> getSeatPositions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 534e7c4

Please sign in to comment.