Skip to content

Commit 239cc57

Browse files
Fix cubiomes version
1 parent c1461c8 commit 239cc57

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ configurations {
3737

3838
dependencies {
3939
// This will make it work on most platforms. It automatically chooses the right dependencies at runtime.
40-
extraLibs('dev.duti.acheong:cubiomes:1.22.4') { transitive = false }
41-
extraLibs('dev.duti.acheong:cubiomes:1.22.4:linux64') { transitive = false }
42-
extraLibs('dev.duti.acheong:cubiomes:1.22.4:osx') { transitive = false }
43-
extraLibs('dev.duti.acheong:cubiomes:1.22.4:windows64') { transitive = false }
40+
extraLibs('dev.duti.acheong:cubiomes:1.22.5') { transitive = false }
41+
extraLibs('dev.duti.acheong:cubiomes:1.22.5:linux64') { transitive = false }
42+
extraLibs('dev.duti.acheong:cubiomes:1.22.5:osx') { transitive = false }
43+
extraLibs('dev.duti.acheong:cubiomes:1.22.5:windows64') { transitive = false }
4444
// To change the versions see the gradle.properties file
4545
minecraft "com.mojang:minecraft:${project.minecraft_version}"
4646
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"

src/main/java/anticope/rejects/modules/AutoExtinguish.java

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,27 @@ private void onTick(TickEvent.Pre event) {
114114
place(slot);
115115
hasPlacedWater = false;
116116

117-
} else if (!mc.player.hasStatusEffect(Registries.STATUS_EFFECT.getEntry(FIRE_RESISTANCE)) && mc.player.isOnFire()) {
118-
blockPos = mc.player.getBlockPos();
119-
final int slot = findSlot(Items.WATER_BUCKET);
120-
if (mc.world.getBlockState(blockPos).getBlock() == Blocks.FIRE || mc.world.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) {
121-
float yaw = mc.gameRenderer.getCamera().getYaw() % 360;
122-
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
123-
if (center.get()) {
124-
PlayerUtils.centerPlayer();
117+
} else {
118+
assert mc.player != null;
119+
if (!mc.player.hasStatusEffect(Registries.STATUS_EFFECT.getEntry(FIRE_RESISTANCE)) && mc.player.isOnFire()) {
120+
blockPos = mc.player.getBlockPos();
121+
final int slot = findSlot(Items.WATER_BUCKET);
122+
if (mc.world.getBlockState(blockPos).getBlock() == Blocks.FIRE || mc.world.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) {
123+
float yaw = mc.gameRenderer.getCamera().getYaw() % 360;
124+
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
125+
if (center.get()) {
126+
PlayerUtils.centerPlayer();
127+
}
128+
Rotations.rotate(yaw, 90);
129+
mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, blockPos, Direction.UP));
130+
mc.player.swingHand(Hand.MAIN_HAND);
131+
mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, Direction.UP));
132+
133+
Rotations.rotate(yaw, pitch);
125134
}
126-
Rotations.rotate(yaw, 90);
127-
mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, blockPos, Direction.UP));
128-
mc.player.swingHand(Hand.MAIN_HAND);
129-
mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, Direction.UP));
130-
131-
Rotations.rotate(yaw, pitch);
135+
place(slot);
136+
hasPlacedWater = true;
132137
}
133-
place(slot);
134-
hasPlacedWater = true;
135138
}
136139
}
137140

0 commit comments

Comments
 (0)