From 8124b433583025694f8817fa00fb00fd6f041b66 Mon Sep 17 00:00:00 2001 From: MehVahdJukaar Date: Tue, 28 May 2024 13:33:28 +0200 Subject: [PATCH] updated flan compat, gold tags, cleanups before release --- changelog.txt | 10 ++++++---- dependencies.properties | 2 +- .../automation/client/screen/TroughScreen.java | 4 +++- .../content/client/module/UsageTickerModule.java | 1 - .../quark/integration/claim/FlanIntegration.java | 12 ++++++------ .../{feeding_through.png => feeding_trough.png} | Bin .../minecraft/tags/blocks/guarded_by_piglins.json | 11 ++++++++++- .../data/minecraft/tags/items/piglin_loved.json | 1 + 8 files changed, 27 insertions(+), 14 deletions(-) rename src/main/resources/assets/quark/textures/gui/container/{feeding_through.png => feeding_trough.png} (100%) diff --git a/changelog.txt b/changelog.txt index e31dc8bc5f..1763f46d95 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,11 +1,13 @@ - Added Beach Villager Type (module) -- Magnets not have shiny new particles -- Iron Golems and Minecarts can be pushed by magnets -- Manetic falling blocks and item entities can also be pushed +- Magnets have shiny new particles! +- Iron Golems and minecarts can be pushed by magnets (plus other tagged entities) +- Magnetic falling blocks and item entities can also be pushed - Player having some iron armor are also pushable - Magnets can now push and pull blocks through breakable blocks (like tall grass) - Improved trowel item logic, now works with more complex block items - Improved ITroweable interface and also added a blacklist and whitelist tag for it - Cleaned up FoxHound model and fixed some visual inconsistencies with it (such as baby model being offset) -- Possivly fixed some issue with magnets hopper interaction not working well +- Possibly fixed some issue with magnets hopper interaction not working well - Feeding through GUI texture can now be customized +- Updated flan compat +- Added some missing gold blocks from piglin_loved and guarded_by_piglins tags diff --git a/dependencies.properties b/dependencies.properties index 5a94dcd812..e74e134cbb 100644 --- a/dependencies.properties +++ b/dependencies.properties @@ -2,7 +2,7 @@ forge=47.1.3 zeta=1.0-15.72 jei=4712868 terrablender=1.20.1-3.0.0.169 -flan=4819286 +flan=5290172 lootr=4608503 emi=1.0.24+1.20.1 spark=4738952 diff --git a/src/main/java/org/violetmoon/quark/content/automation/client/screen/TroughScreen.java b/src/main/java/org/violetmoon/quark/content/automation/client/screen/TroughScreen.java index 0636687371..4a6aa1d40d 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/client/screen/TroughScreen.java +++ b/src/main/java/org/violetmoon/quark/content/automation/client/screen/TroughScreen.java @@ -7,15 +7,17 @@ import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.DispenserMenu; import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.handler.ContributorRewardHandler; public class TroughScreen extends DispenserScreen { - private static final ResourceLocation CONTAINER_LOCATION = Quark.asResource("textures/gui/container/feeding_troughi.png"); + private static final ResourceLocation CONTAINER_LOCATION = Quark.asResource("textures/gui/container/feeding_trough.png"); public TroughScreen(DispenserMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); } + @Override protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) { int i = (this.width - this.imageWidth) / 2; int j = (this.height - this.imageHeight) / 2; diff --git a/src/main/java/org/violetmoon/quark/content/client/module/UsageTickerModule.java b/src/main/java/org/violetmoon/quark/content/client/module/UsageTickerModule.java index e9b74c5410..541160fe2f 100644 --- a/src/main/java/org/violetmoon/quark/content/client/module/UsageTickerModule.java +++ b/src/main/java/org/violetmoon/quark/content/client/module/UsageTickerModule.java @@ -166,7 +166,6 @@ public void render(GuiGraphics guiGraphics, Window window, Player player, boolea if(ourSide != primary && !player.getItemInHand(InteractionHand.OFF_HAND).isEmpty()) barWidth += 58; - Minecraft mc = Minecraft.getInstance(); x += (barWidth / 2f) * mul + index * 20; if(ourSide == HumanoidArm.LEFT) { x -= slots * 20; diff --git a/src/main/java/org/violetmoon/quark/integration/claim/FlanIntegration.java b/src/main/java/org/violetmoon/quark/integration/claim/FlanIntegration.java index 33819542e1..817f0b0bdf 100644 --- a/src/main/java/org/violetmoon/quark/integration/claim/FlanIntegration.java +++ b/src/main/java/org/violetmoon/quark/integration/claim/FlanIntegration.java @@ -1,5 +1,6 @@ package org.violetmoon.quark.integration.claim; +import io.github.flemmli97.flan.api.permission.BuiltinPermission; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -11,7 +12,6 @@ import org.violetmoon.quark.base.Quark; import io.github.flemmli97.flan.api.data.IPermissionContainer; -import io.github.flemmli97.flan.api.permission.PermissionRegistry; import io.github.flemmli97.flan.claim.ClaimStorage; public final class FlanIntegration implements IClaimIntegration { @@ -23,7 +23,7 @@ public boolean canBreak(@NotNull Player player, @NotNull BlockPos pos) { try { ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level()); IPermissionContainer claim = storage.getForPermissionCheck(pos); - return claim.canInteract((ServerPlayer) player, PermissionRegistry.BREAK, pos, true); + return claim.canInteract((ServerPlayer) player, BuiltinPermission.BREAK, pos, true); } catch (Exception e) { Quark.LOG.error("Failed call break block event: [Player: {}, Pos: {}]", player, pos, e); return true; @@ -37,7 +37,7 @@ public boolean canPlace(@NotNull Player player, @NotNull BlockPos pos) { try { ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level()); IPermissionContainer claim = storage.getForPermissionCheck(pos); - return claim.canInteract((ServerPlayer) player, PermissionRegistry.PLACE, pos); + return claim.canInteract((ServerPlayer) player, BuiltinPermission.PLACE, pos); } catch (Exception e) { Quark.LOG.error("Failed call place block event: [Player: {}, Pos: {}]", player, pos, e); return true; @@ -51,7 +51,7 @@ public boolean canReplace(@NotNull Player player, @NotNull BlockPos pos) { try { ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level()); IPermissionContainer claim = storage.getForPermissionCheck(pos); - return claim.canInteract((ServerPlayer) player, PermissionRegistry.PLACE, pos); + return claim.canInteract((ServerPlayer) player, BuiltinPermission.PLACE, pos); } catch (Exception e) { Quark.LOG.error("Failed call replace block event: [Player: {}, Pos: {}]", player, pos, e); return true; @@ -65,7 +65,7 @@ public boolean canAttack(@NotNull Player player, @NotNull Entity victim) { try { ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level()); IPermissionContainer claim = storage.getForPermissionCheck(victim.blockPosition()); - return claim.canInteract((ServerPlayer) player, PermissionRegistry.HURTANIMAL, victim.blockPosition()); + return claim.canInteract((ServerPlayer) player, BuiltinPermission.HURTANIMAL, victim.blockPosition()); } catch (Exception e) { Quark.LOG.error("Failed call attack entity event: [Player: {}, Victim: {}]", player, victim, e); return true; @@ -79,7 +79,7 @@ public boolean canInteract(@NotNull Player player, @NotNull BlockPos targetPos) try { ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level()); IPermissionContainer claim = storage.getForPermissionCheck(targetPos); - return claim.canInteract((ServerPlayer) player, PermissionRegistry.INTERACTBLOCK, targetPos); + return claim.canInteract((ServerPlayer) player, BuiltinPermission.INTERACTBLOCK, targetPos); } catch (Exception e) { Quark.LOG.error("Failed call interact event: [Player: {}, Pos: {}]", player, targetPos, e); return true; diff --git a/src/main/resources/assets/quark/textures/gui/container/feeding_through.png b/src/main/resources/assets/quark/textures/gui/container/feeding_trough.png similarity index 100% rename from src/main/resources/assets/quark/textures/gui/container/feeding_through.png rename to src/main/resources/assets/quark/textures/gui/container/feeding_trough.png diff --git a/src/main/resources/data/minecraft/tags/blocks/guarded_by_piglins.json b/src/main/resources/data/minecraft/tags/blocks/guarded_by_piglins.json index becc3f08c9..347b790a5c 100644 --- a/src/main/resources/data/minecraft/tags/blocks/guarded_by_piglins.json +++ b/src/main/resources/data/minecraft/tags/blocks/guarded_by_piglins.json @@ -1,12 +1,21 @@ { "replace": false, "values": [ + "minecraft:light_weighted_pressure_plate", "#forge:chests", "quark:azalea_chest", "quark:azalea_trapped_chest", "quark:blossom_chest", "quark:blossom_trapped_chest", "quark:ancient_chest", - "quark:ancient_trapped_chest" + "quark:ancient_trapped_chest", + "quark:raw_gold_bricks", + "quark:raw_gold_bricks_slab", + "quark:raw_gold_bricks_stairs", + "quark:raw_gold_bricks_vertical_slab", + "quark:raw_gold_bricks_wall", + "quark:golden_apple_crate", + "quark:golden_carrot_crate", + "quark:gold_bars" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/items/piglin_loved.json b/src/main/resources/data/minecraft/tags/items/piglin_loved.json index 54d880fcdf..41aca9411a 100644 --- a/src/main/resources/data/minecraft/tags/items/piglin_loved.json +++ b/src/main/resources/data/minecraft/tags/items/piglin_loved.json @@ -4,6 +4,7 @@ "quark:gold_button", "quark:gold_bars", "quark:golden_apple_crate", + "quark:golden_carrot_crate", "quark:raw_gold_bricks", "quark:raw_gold_bricks_slab", "quark:raw_gold_bricks_stairs",