Skip to content

Commit

Permalink
Update to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunnySlopes committed Jun 22, 2023
1 parent 78013f0 commit 49b46f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.28
loader_version=0.14.12
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.5
loader_version=0.14.21

# Mod Properties
mod_version = 1.1.4
mod_version = 1.1.6
maven_group = pearltickets
archives_base_name = pearltickets
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 5 additions & 9 deletions src/main/java/pearltickets/mixins/EnderPearlEntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import net.minecraft.entity.projectile.thrown.EnderPearlEntity;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.server.world.ChunkHolder;
import net.minecraft.server.world.ChunkTicketType;
import net.minecraft.server.world.ServerChunkManager;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.server.world.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.Vec3d;
Expand Down Expand Up @@ -41,7 +38,7 @@ protected EnderPearlEntityMixin(EntityType<? extends ThrownItemEntity> entityTyp
}

private static boolean isEntityTickingChunk(WorldChunk chunk) {
return (chunk != null && chunk.getLevelType() == ChunkHolder.LevelType.ENTITY_TICKING);
return (chunk != null && chunk.getLevelType() == ChunkLevelType.ENTITY_TICKING);
}

private static int getHighestMotionBlockingY(NbtCompound nbtCompound) {
Expand All @@ -51,7 +48,7 @@ private static int getHighestMotionBlockingY(NbtCompound nbtCompound) {
for (long element : nbtCompound.getCompound("Heightmaps").getLongArray("MOTION_BLOCKING")) {
// 64 bits in long, 7 y-values * 9-bit-each = 63 bits, and 1 bit vacant.
for (int i = 0; i < 7; i++) {
int y = (int)(element & 0b111111111) - 1;
int y = (int) (element & 0b111111111) - 1;
if (y > highestY) highestY = y;
element = element >> 9;
}
Expand Down Expand Up @@ -82,8 +79,8 @@ private void skippyChunkLoading(CallbackInfo ci) {
// System.out.println("next: " + nextPos + nextVelocity);

// chunkPos to temporarily store pearl and next chunkPos to check chunk loading
ChunkPos currChunkPos = new ChunkPos(new BlockPos(currPos));
ChunkPos nextChunkPos = new ChunkPos(new BlockPos(nextPos));
ChunkPos currChunkPos = new ChunkPos(new BlockPos((int) currPos.x, (int) currPos.y, (int) currPos.z));
ChunkPos nextChunkPos = new ChunkPos(new BlockPos((int) nextPos.x, (int) nextPos.y, (int) nextPos.z));

// System.out.printf("currChunkPos: (%d, %d) realChunkPos: (%d, %d) nextChunkPos: (%d, %d)\n",
// currChunkPos.x, currChunkPos.z, realChunkPos.x, realChunkPos.z, nextChunkPos.x, nextChunkPos.z);
Expand Down Expand Up @@ -131,5 +128,4 @@ private void skippyChunkLoading(CallbackInfo ci) {
this.realVelocity = nextVelocity;
}
}

}

0 comments on commit 49b46f5

Please sign in to comment.