Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Update to 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Mar 20, 2024
1 parent d907b4c commit 16226f5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'idea'
id 'org.jetbrains.kotlin.jvm'

id 'fabric-loom' version '1.4-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
}

def ENV = System.getenv()
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true

minecraft_version=1.20.3-pre1
yarn_build=1
loader_version=0.14.24
minecraft_version=24w12a
yarn_build=3
loader_version=0.15.7

mod_version=1.0.7

mod_id=bubble
maven_group=dev.andante

fabric_version=0.90.11+1.20.3
fabric_version=0.96.12+1.20.5

kotlin_version=1.9.20
fabric_kotlin_version=1.10.13+kotlin.1.9.20
kotlin_version=1.9.23
fabric_kotlin_version=1.10.19+kotlin.1.9.23
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-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion src/main/java/dev/andante/bubble/BubbleManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import net.minecraft.registry.RegistryKey
import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.SimpleRegistry
import net.minecraft.registry.entry.RegistryEntry
import net.minecraft.registry.entry.RegistryEntryInfo
import net.minecraft.server.MinecraftServer
import net.minecraft.util.Identifier
import net.minecraft.util.math.Vec3d
Expand Down Expand Up @@ -135,7 +136,7 @@ class BubbleManager private constructor(private val server: MinecraftServer) {
val removable = dimensionsRegistry as RemovableSimpleRegistry<*>
val wasFrozen = removable.isFrozen
removable.isFrozen = false
dimensionsRegistry.add(RegistryKey.of(RegistryKeys.DIMENSION, key.value), world.worldDimensionOptions, Lifecycle.stable())
dimensionsRegistry.add(RegistryKey.of(RegistryKeys.DIMENSION, key.value), world.worldDimensionOptions, RegistryEntryInfo.DEFAULT)
removable.isFrozen = wasFrozen

// add to server worlds
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/dev/andante/bubble/mixin/SimpleRegistryMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.SimpleRegistry;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.registry.entry.RegistryEntryInfo;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -26,13 +27,13 @@ public abstract class SimpleRegistryMixin<T> implements RemovableSimpleRegistry<
@Shadow @Final private Map<T, RegistryEntry.Reference<T>> valueToEntry;
@Shadow @Final private Map<Identifier, RegistryEntry.Reference<T>> idToEntry;
@Shadow @Final private Map<RegistryKey<T>, RegistryEntry.Reference<T>> keyToEntry;
@Shadow @Final private Map<T, Lifecycle> entryToLifecycle;
@Shadow @Final private ObjectList<RegistryEntry.Reference<T>> rawIdToEntry;
@Shadow @Final private Reference2IntMap<T> entryToRawId;
@Shadow @Nullable private List<RegistryEntry.Reference<T>> cachedEntries;

@Shadow private boolean frozen;

@Shadow @Final private Map<RegistryKey<T>, RegistryEntryInfo> keyToEntryInfo;

@Unique
@Override
public boolean remove(T value) {
Expand All @@ -48,13 +49,9 @@ public boolean remove(T value) {
this.idToEntry.remove(key.getValue());
this.keyToEntry.remove(key);

this.entryToLifecycle.remove(value);
this.keyToEntryInfo.remove(key);
this.valueToEntry.remove(value);

if (this.cachedEntries != null) {
this.cachedEntries.remove(entry);
}

return true;
} catch (Throwable e) {
e.printStackTrace();
Expand Down

0 comments on commit 16226f5

Please sign in to comment.