Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public static void breatheUnderwater(LivingEntity entity) {
if (entity instanceof ServerPlayer sp)
AllAdvancements.DIVING_SUIT.awardTo(sp);

event.setCanBreathe(true);
event.setCanRefillAir(true);
entity.setAirSupply(entity.getMaxAirSupply());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.network.chat.Component;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.StringUtil;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.util.List;
import java.util.Set;

import io.github.fabricators_of_create.porting_lib.block.NeighborChangeListeningBlock;

import org.jetbrains.annotations.Nullable;

import com.simibubi.create.AllBlockEntityTypes;
Expand Down Expand Up @@ -162,12 +164,16 @@ private static void updateComaratorsInner(Level level, Block provokingBlock, Blo
}

BlockState blockstate = level.getBlockState(updatePos);
blockstate.onNeighborChange(level, updatePos, provokingPos);
if (blockstate.getBlock() instanceof NeighborChangeListeningBlock nclb) {
nclb.onNeighborChange(blockstate, level, updatePos, provokingPos);
}
if (blockstate.isRedstoneConductor(level, updatePos)) {
updatePos.move(direction);
blockstate = level.getBlockState(updatePos);
if (blockstate.getWeakChanges(level, updatePos)) {
level.neighborChanged(blockstate, updatePos, provokingBlock, provokingPos, false);
if (blockstate.getBlock() instanceof NeighborChangeListeningBlock nclb) {
if (nclb.getWeakChanges(blockstate, level, updatePos)) {
level.neighborChanged(blockstate, updatePos, provokingBlock, provokingPos, false);
}
}
}
}
Expand Down