diff --git a/build.gradle b/build.gradle index de91186..ef09b38 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.11-SNAPSHOT' + id 'fabric-loom' version '1.5-SNAPSHOT' id 'maven-publish' id 'io.github.juuxel.loom-quiltflower' version '1.7.1' } @@ -29,12 +29,13 @@ dependencies { annotationProcessor modImplementation("io.wispforest:owo-lib:${project.owo_version}") // REI + modLocalRuntime "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}" + modCompileOnly("me.shedaniel:RoughlyEnoughItems-default-plugin:${project.rei_version}") modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}" - modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}" - modRuntimeOnly "dev.architectury:architectury-fabric:${project.architectury_version}" + //modRuntimeOnly "dev.architectury:architectury-fabric:${project.architectury_version}" // emi - modCompileOnly "dev.emi:emi:${emi_version}" + modCompileOnly "dev.emi:emi-fabric:${emi_version}" // MM + AF + Magna + CCA modImplementation "maven.modrinth:mythicmetals:${project.mm_version}" @@ -46,9 +47,6 @@ dependencies { modCompileOnly("maven.modrinth:lithium:${project.leetheum_version}") modRuntimeOnly("maven.modrinth:lithium:${project.leetheum_version}") - // Mixin Extras - implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.me_version}")) - // Additional Entity Attributes modImplementation ("maven.modrinth:additionalentityattributes:${project.aea_version}") } diff --git a/gradle.properties b/gradle.properties index dd2b230..19120bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,34 +2,31 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/develop/ -minecraft_version=1.20 -yarn_mappings=1.20+build.1 -loader_version=0.14.21 +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.3 +loader_version=0.15.7 # Mod Properties -mod_version=0.6.0+1.20 +mod_version=0.6.0+1.20.3 maven_group=nourl archives_base_name=mythicmetals-decorations # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.83.0+1.20 +fabric_version=0.96.4+1.20.4 # https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files/ # https://maven.shedaniel.me/me/shedaniel/RoughlyEnoughItems-fabric/ -rei_version=12.0.652 -architectury_version=9.0.5 +rei_version=14.0.688 +architectury_version=11.0.12 # OwO # https://maven.wispforest.io/io/wispforest/owo-lib/ -owo_version=0.11.1+1.20 -cca_version=5.2.0 +owo_version=0.12.5+1.20.3 +cca_version=5.3.0 # Mythic Metals: https://modrinth.com/mod/mythicmetals -mm_version=0.18.1+1.20-hotfix +mm_version=0.19.4+1.20.4 # Alloy Forgery: https://modrinth.com/mod/alloy-forgery -af_version=2.0.21+1.20 +af_version=2.1.3+1.20.3 # leethium moment -leetheum_version=mc1.20-0.11.2 -# Mixin Extras -# https://github.com/LlamaLad7/MixinExtras -me_version = 0.2.0-beta.6 +leetheum_version=mc1.20.4-0.12.1 # Additional Entity Attributes -# https://github.com/DaFuqs/AdditionalEntityAttributes -aea_version=1.2.2+1.19.4 -emi_version=0.7.3+1.19.4 \ No newline at end of file +# https://modrinth.com/mod/additionalentityattributes +aea_version=1.7.1+1.20.4 +emi_version=1.1.2+1.20.4 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..db9a6b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlock.java b/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlock.java index d83347b..782d4fa 100644 --- a/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlock.java +++ b/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlock.java @@ -57,13 +57,13 @@ public MythicChest getFromBoth(MythicChestBlockEntity first, MythicChestBlockEnt name, player -> first.checkUnlocked(player) && second.checkUnlocked(player), player -> { - first.checkLootInteraction(player); - second.checkLootInteraction(player); + first.generateLoot(player); + second.generateLoot(player); }); } public MythicChest getFrom(MythicChestBlockEntity chest) { - return new MythicChest(chest, chest.hasCustomName() ? chest.getCustomName() : chest.getCachedState().getBlock().getName(), chest::checkUnlocked, chest::checkLootInteraction); + return new MythicChest(chest, chest.hasCustomName() ? chest.getCustomName() : chest.getCachedState().getBlock().getName(), chest::checkUnlocked, chest::generateLoot); } public MythicChest getFallback() { @@ -98,7 +98,7 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { @Nullable @Override public BlockEntityTicker getTicker(World world, BlockState state, BlockEntityType type) { - return world.isClient ? checkType(type, MythicChests.MYTHIC_CHEST_BLOCK_ENTITY_TYPE, MythicChestBlockEntity::clientTick) : null; + return world.isClient ? validateTicker(type, MythicChests.MYTHIC_CHEST_BLOCK_ENTITY_TYPE, MythicChestBlockEntity::clientTick) : null; } @Override diff --git a/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlockEntity.java b/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlockEntity.java index b69b07d..5c8738c 100644 --- a/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlockEntity.java +++ b/src/main/java/nourl/mythicmetalsdecorations/blocks/chest/MythicChestBlockEntity.java @@ -62,7 +62,7 @@ public MythicChestBlockEntity(BlockPos pos, BlockState state) { } @Override - protected DefaultedList getInvStackList() { + protected DefaultedList method_11282() { return inventory; } @@ -113,10 +113,10 @@ public void readNbt(NbtCompound nbt) { this.lock = ContainerLock.fromNbt(nbt); if (nbt.contains("CustomName", NbtElement.STRING_TYPE)) { - this.setCustomName(Text.Serializer.fromJson(nbt.getString("CustomName"))); + this.setCustomName(Text.Serialization.fromJson(nbt.getString("CustomName"))); } - if (!this.deserializeLootTable(nbt)) { + if (!this.readLootTable(nbt)) { this.inventory = DefaultedList.ofSize(this.size(), ItemStack.EMPTY); NbtList nbtList = nbt.getList("Items", 10); @@ -135,10 +135,10 @@ protected void writeNbt(NbtCompound nbt) { this.lock.writeNbt(nbt); if (this.hasCustomName()) { - nbt.putString("CustomName", Text.Serializer.toJson(this.getCustomName())); + nbt.putString("CustomName", Text.Serialization.toJsonString(this.getCustomName())); } - if (!this.serializeLootTable(nbt)) { + if (!this.readLootTable(nbt)) { NbtList nbtList = new NbtList(); for (int i = 0; i < this.inventory.size(); i++) { diff --git a/src/main/java/nourl/mythicmetalsdecorations/client/MythicChestScreen.java b/src/main/java/nourl/mythicmetalsdecorations/client/MythicChestScreen.java index c959514..cf4b722 100644 --- a/src/main/java/nourl/mythicmetalsdecorations/client/MythicChestScreen.java +++ b/src/main/java/nourl/mythicmetalsdecorations/client/MythicChestScreen.java @@ -121,7 +121,7 @@ public void render(DrawContext drawContext, int mouseX, int mouseY, float delta) @Override protected void drawBackground(DrawContext drawContext, float delta, int mouseX, int mouseY) { - this.renderBackground(drawContext); + //super.renderBackground(drawContext, mouseX, mouseY, delta); drawContext.drawTexture(TEXTURE, this.x, this.y, 0, 0, this.size.width() + ChestScreenSize.HORIZONTAL_PADDING, this.size.paddedHeight(), 368, 416); drawContext.drawTexture(TEXTURE, this.x + this.size.width() + ChestScreenSize.HORIZONTAL_PADDING, this.y, 331, 0, ChestScreenSize.HORIZONTAL_PADDING, this.size.paddedHeight(), 368, 416); @@ -196,15 +196,15 @@ private boolean isInScrollbar(double mouseX, double mouseY) { } @Override - public boolean mouseScrolled(double mouseX, double mouseY, double amount) { + public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) { if (MythicMetalsDecorations.CONFIG.onlyScrollOnScrollbar()) { if (isInScrollbar(mouseX, mouseY)) { - this.scroll((int) (this.scrollOffset - amount)); + this.scroll((int) (this.scrollOffset - verticalAmount)); return true; } return false; } - this.scroll((int) (this.scrollOffset - amount)); + this.scroll((int) (this.scrollOffset - verticalAmount)); return true; }