From a35d4164112739e10582dd2218b8dc40cc52e0a5 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 12:13:35 +0100 Subject: [PATCH 01/12] Update changelog --- changelog.txt | 58 ++------------------------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5c628d6cbb..20a0375000 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,56 +1,2 @@ -- New Feature: Maps can now be washed on a cauldron, reverting them to blank maps -- New Feature: Rainbow Lamps, made of corundum by default, redstone powered, can color beacons when powered -- Added a config option for pathfinders quills to try and search again if they fail -- Added a config option to alter the activation range of monster boxes -- Added a game nerf option to prevent large mushroom from destroying blocks -- Added a new config option for additional "baked" enchantments such as gold tools having fortune -- Added an allow list config to the pat module -- Added config option to change the hoe harvesting radius -- Added new sorting logic for potions and tipped arrows -- Added scroll interaction for bundles to change the "front" item -- Added some more JEI hints -- Added support for the Lootr mod for quark chest variants -- Added translation keys for quark tags in EMI -- Attribute tooltips will no longer show attribute up/downgrade if the held item doesn't match the type -- Attribute tooltips will now show any additional attributes not present on the held item you'd lose by switching to it -- Bees will no longer randomly change sweaters when entering and exiting beehives -- Crabs can now be placed in buckets -- Crabs will no longer take damage from cacti or berry bushes (they are unprickable) -- Decoupled vertical slab blocks from quark module system logic so other mods can extend them easier -- Fixed a potential memory leak -- Fixed backpacks being enchantable -- Fixed cloud block and monster box not being pick block-able -- Fixed compass logic for lodestones being incorrect and working across dimensions -- Fixed crash when loading the slabs to blocks map -- Fixed crash when shift clicking items with pending enchants into matrix enchanting -- Fixed crash with dispensers placing blocks when placing mob heads -- Fixed crash with monster box when the loot table is incorrect -- Fixed encasing copper pipes in creative mode consuming the glass block -- Fixed expanded item interactions shulker incompatibility with Inventorio -- Fixed glass item frames not rendering properly on top of signs -- Fixed having mending nerf enabled allowing for incompatible enchantments to be applied to items -- Fixed incorrect enchantment application logic in matrix enchanting allowing some other mod enchantments to end up on the wrong items -- Fixed incorrect simple harvest behavior with several modded crops -- Fixed light gray rune recipe producing gray runes -- Fixed potential dupes alongside mods that increase shulker box stack size -- Fixed Potion of Stability not hiding itself from JEI when disabled -- Fixed rotation lock message appearing more often than intended -- Fixed seed pouch retaining item count after being emptied -- Fixed sharing items with a section sign in the name kicking the player -- Fixed Simple Harvest reducing yield on crops that drop multiple different items -- Fixed the enchantments begone experimental module not removing enchantments from enchanting tables -- Fixed torch dupe with multishot torch arrows -- Fixed vertical slabs not inheriting block colors -- Fixed weird offhand interaction with pathfinders quill -- Food crates now have the storage_block tag -- Giant crabs can now be ridden -- Grates can now be crawled under, similarly to hollow logs -- JEI candle influences will now only show items that can receive the enchantment in question -- Lootr blocks are now immune to iron rods -- Removed all Redirect mixins, thus ensuring much better compatibility with other mods using mixins on the same targets -- Removed all RETURN mixin cancellations, opting to cancel at HEAD instead (again, better compatibility) -- Rewrote most of the mod's mixins to use MixinExtras -- Shift clicking items in the player's inventory when a backpack is held now prioritizes moving onto the backpack over the hotbar -- Updated sorting logic to be fully deterministic -- Updated the chest variant textures with new ones by dani -- Villagers can now use simple harvest \ No newline at end of file +- Fixed startup crash when Lootr is not installed +- Fixed startup crash with Rubidium \ No newline at end of file From fdae0fbd2a5e966cb37b1c7c2adad30e8477f8f1 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 12:13:42 +0100 Subject: [PATCH 02/12] build --- build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 30b2a62e35..9d80e1db77 100644 --- a/build.properties +++ b/build.properties @@ -1,9 +1,9 @@ -#Mon Aug 14 22:44:07 UTC 2023 +#Tue Aug 15 11:13:42 UTC 2023 mapping_version=1.19.2 version=3.4 mod_name=Quark mc_version=1.19.2 mapping_channel=official mod_id=quark -build_number=407 +build_number=408 dir_output=../Build Output/Quark/ From 6b5895a346db4a1e912b1f7c4dc7ec2dee0de6dd Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 15 Aug 2023 12:43:42 -0400 Subject: [PATCH 03/12] *sigh* --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 6066d5484c..22c12694f0 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,8 @@ apply plugin: 'eclipse' apply plugin: 'maven-publish' apply plugin: 'pmd' +jarJar.enable() + ext.configFile = file('build.properties') ext.depsFile = file('dependencies.properties') ext.config = parseConfig(configFile) From 8f66fb3699e775bf247717b019a42d0c6e164660 Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 15 Aug 2023 12:57:19 -0400 Subject: [PATCH 04/12] ok this actually looks good??? --- build.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 22c12694f0..d552973206 100644 --- a/build.gradle +++ b/build.gradle @@ -171,8 +171,7 @@ def parseConfig(File config) { } jar { - //rename the default output, for some better... sanity with scipts - archiveName = "${baseName}-${version}.${extension}" + classifier "pure" // Jar without jar-in-jar manifest { attributes([ @@ -204,6 +203,16 @@ task deobfJar(type: Jar) { from sourceSets.main.output } +tasks.jarJar.configure { + classifier "" // "Main" jar should be the one with jar-in-jar + + exclude "**/*.bat" + exclude "**/*.psd" + exclude "**/*.exe" + exclude "**/unused" + exclude "**/genscripts" +} + artifacts { archives sourcesJar archives deobfJar From 61ef37ba8575b995ba2af5b1757cedf896d10ddb Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 18:08:49 +0100 Subject: [PATCH 05/12] Update changelog --- changelog.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 20a0375000..a7b35ce588 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2 +1 @@ -- Fixed startup crash when Lootr is not installed -- Fixed startup crash with Rubidium \ No newline at end of file +- Fixed startup crash (for real this time!!) \ No newline at end of file From a151b0a889b982d102fe2736dfd8ea73c2d35a54 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 18:08:57 +0100 Subject: [PATCH 06/12] build --- build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 9d80e1db77..df0abef2b9 100644 --- a/build.properties +++ b/build.properties @@ -1,9 +1,9 @@ -#Tue Aug 15 11:13:42 UTC 2023 +#Tue Aug 15 17:08:57 UTC 2023 mapping_version=1.19.2 version=3.4 mod_name=Quark mc_version=1.19.2 mapping_channel=official mod_id=quark -build_number=408 +build_number=409 dir_output=../Build Output/Quark/ From 8b4037ce5ece56e9b83f4dc4a58058040be82b70 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 18:18:56 +0100 Subject: [PATCH 07/12] Update contributors.properties --- contributors.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.properties b/contributors.properties index 045a417b18..39f1970e2c 100644 --- a/contributors.properties +++ b/contributors.properties @@ -887,3 +887,4 @@ JLJarvis=1 jdpaboojian=2 TheIronArcher49=1 eliteminecraft99=1 +KevinKebab=2 From 55b702788438048544c6345cca61f9826dcb6ff8 Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 15 Aug 2023 13:50:44 -0400 Subject: [PATCH 08/12] fix #4318 --- src/main/java/vazkii/quark/mixin/client/ItemRendererMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/vazkii/quark/mixin/client/ItemRendererMixin.java b/src/main/java/vazkii/quark/mixin/client/ItemRendererMixin.java index 3a78dd07a0..f6c9f65dce 100644 --- a/src/main/java/vazkii/quark/mixin/client/ItemRendererMixin.java +++ b/src/main/java/vazkii/quark/mixin/client/ItemRendererMixin.java @@ -60,7 +60,7 @@ private static RenderType getEntityGlintDirect(RenderType prev) { return ColorRunesModule.getEntityGlintDirect(); } - @ModifyConstant(method = "renderQuadList", constant = @Constant(floatValue = 1F)) + @ModifyConstant(method = "renderQuadList", constant = @Constant(floatValue = 1F), require = 0) // Allow failure in case of rubidium public float renderQuads(float constant) { return ItemSharingModule.alphaValue * constant; } From 8fcfbe70e2a0322e4d6e57c44c5929f20451aefe Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 15 Aug 2023 14:00:48 -0400 Subject: [PATCH 09/12] cut down size of shareitemmessage significantly closes #4315 --- .../quark/base/network/message/ShareItemMessage.java | 7 ++----- .../content/management/module/ItemSharingModule.java | 12 ++++-------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/vazkii/quark/base/network/message/ShareItemMessage.java b/src/main/java/vazkii/quark/base/network/message/ShareItemMessage.java index 2d14d219c4..2d481eadc5 100644 --- a/src/main/java/vazkii/quark/base/network/message/ShareItemMessage.java +++ b/src/main/java/vazkii/quark/base/network/message/ShareItemMessage.java @@ -1,6 +1,5 @@ package vazkii.quark.base.network.message; -import net.minecraft.network.chat.Component; import net.minecraft.network.chat.LastSeenMessages; import net.minecraft.network.chat.MessageSignature; import net.minecraft.server.level.ServerPlayer; @@ -19,7 +18,6 @@ public class ShareItemMessage implements IMessage { public ItemStack stack; public String message; - public Component component; public Instant timeStamp; public long salt; public MessageSignature signature; @@ -28,10 +26,9 @@ public class ShareItemMessage implements IMessage { public ShareItemMessage() { } - public ShareItemMessage(ItemStack stack, String message, Component component, Instant timeStamp, long salt, MessageSignature signature, boolean signedPreview, LastSeenMessages.Update lastSeenMessages) { + public ShareItemMessage(ItemStack stack, String message, Instant timeStamp, long salt, MessageSignature signature, boolean signedPreview, LastSeenMessages.Update lastSeenMessages) { this.stack = stack; this.message = message; - this.component = component; this.timeStamp = timeStamp; this.salt = salt; this.signature = signature; @@ -43,7 +40,7 @@ public ShareItemMessage(ItemStack stack, String message, Component component, In public boolean receive(Context context) { ServerPlayer player = context.getSender(); if (player != null && player.server != null) - context.enqueueWork(() -> ItemSharingModule.shareItem(player, message, component, stack, timeStamp, salt, signature, signedPreview, lastSeenMessages)); + context.enqueueWork(() -> ItemSharingModule.shareItem(player, message, stack, timeStamp, salt, signature, signedPreview, lastSeenMessages)); return true; } diff --git a/src/main/java/vazkii/quark/content/management/module/ItemSharingModule.java b/src/main/java/vazkii/quark/content/management/module/ItemSharingModule.java index 507ab9efac..ba947102df 100755 --- a/src/main/java/vazkii/quark/content/management/module/ItemSharingModule.java +++ b/src/main/java/vazkii/quark/content/management/module/ItemSharingModule.java @@ -132,7 +132,7 @@ public boolean clicc() { LastSeenMessages.Update update = mc.player.connection.generateMessageAcknowledgements(); MessageSignature signature = accessorLocalPlayer.quark$signMessage(sign, content, update.lastSeen()); - ShareItemMessage message = new ShareItemMessage(stack, content.plain(), content.decorated(), sign.timeStamp(), sign.salt(), signature, content.isDecorated(), update); + ShareItemMessage message = new ShareItemMessage(stack, content.plain(), sign.timeStamp(), sign.salt(), signature, content.isDecorated(), update); QuarkNetwork.sendToServer(message); return true; @@ -145,19 +145,15 @@ public boolean clicc() { return false; } - public static void shareItem(ServerPlayer player, String message, Component component, ItemStack stack, Instant timeStamp, long salt, MessageSignature signature, boolean signedPreview, LastSeenMessages.Update lastSeenMessages) { + public static void shareItem(ServerPlayer player, String message, ItemStack stack, Instant timeStamp, long salt, MessageSignature signature, boolean signedPreview, LastSeenMessages.Update lastSeenMessages) { if (!ModuleLoader.INSTANCE.isModuleEnabled(ItemSharingModule.class)) return; Component itemComp = stack.getDisplayName(); - // This is done to ensure that arbitrary components can't be sent - only the stack's component. - // Component is checked on this side to ensure the signing was of the correct component. - if (itemComp.equals(component)) { - ((AccessorServerGamePacketListenerImpl) player.connection).quark$chatPreviewCache().set(message, itemComp); + ((AccessorServerGamePacketListenerImpl) player.connection).quark$chatPreviewCache().set(message, itemComp); - player.connection.handleChat(new ServerboundChatPacket(message, timeStamp, salt, signature, signedPreview, lastSeenMessages)); - } + player.connection.handleChat(new ServerboundChatPacket(message, timeStamp, salt, signature, signedPreview, lastSeenMessages)); } public static MutableComponent createStackComponent(ItemStack stack, MutableComponent component) { From 7ece69cc24d8c830b8bfc9d97dfaadf36637c398 Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Tue, 15 Aug 2023 14:02:12 -0400 Subject: [PATCH 10/12] fix ##4307 --- .../tweaks/module/PatTheDogsModule.java | 105 +++++++++--------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/src/main/java/vazkii/quark/content/tweaks/module/PatTheDogsModule.java b/src/main/java/vazkii/quark/content/tweaks/module/PatTheDogsModule.java index c67047fff8..87ac13f442 100644 --- a/src/main/java/vazkii/quark/content/tweaks/module/PatTheDogsModule.java +++ b/src/main/java/vazkii/quark/content/tweaks/module/PatTheDogsModule.java @@ -80,65 +80,65 @@ public void onInteract(PlayerInteractEvent.EntityInteract event) { } else if (event.getTarget() instanceof LivingEntity living && (petAllMobs || living instanceof Player || pettableAllowlist.contains(living.getEncodeId())) && !pettableDenylist.contains(living.getEncodeId())) { - if (event.getHand() == InteractionHand.MAIN_HAND) { - SoundEvent sound = null; - float pitchCenter = 1f; - if (living instanceof Axolotl) { - sound = SoundEvents.AXOLOTL_SPLASH; - } else if (living instanceof Cat || living instanceof Ocelot) { - sound = SoundEvents.CAT_PURREOW; - } else if (living instanceof Chicken) { - sound = SoundEvents.CHICKEN_AMBIENT; - } else if (living instanceof Cow) { - sound = SoundEvents.COW_AMBIENT; - pitchCenter = 1.2f; - } else if (living instanceof AbstractHorse) { - sound = SoundEvents.HORSE_AMBIENT; - } else if (living instanceof AbstractFish) { - sound = SoundEvents.FISH_SWIM; - } else if (living instanceof Fox) { - sound = SoundEvents.FOX_SLEEP; - } else if (living instanceof Squid) { - sound = (living instanceof GlowSquid) ? - SoundEvents.GLOW_SQUID_SQUIRT : SoundEvents.SQUID_SQUIRT; - pitchCenter = 1.2f; - } else if (living instanceof Parrot) { - sound = SoundEvents.PARROT_AMBIENT; - } else if (living instanceof Pig) { - sound = SoundEvents.PIG_AMBIENT; - } else if (living instanceof Rabbit) { - sound = SoundEvents.RABBIT_AMBIENT; - } else if (living instanceof Sheep) { - sound = SoundEvents.SHEEP_AMBIENT; - } else if (living instanceof Strider) { - sound = SoundEvents.STRIDER_HAPPY; - } else if (living instanceof Turtle) { - sound = SoundEvents.TURTLE_AMBIENT_LAND; - } else if (living instanceof Player pettee) { - var uuid = pettee.getStringUUID(); - sound = switch (uuid) { - case "a2ce9382-2518-4752-87b2-c6a5c97f173e" -> // petra_the_kat - QuarkSounds.PET_DEVICE; - case "29a10dc6-a201-4993-80d8-c847212bc92b", // MacyMacerator - "d30d8e38-6f93-4d96-968d-dd6ec5596941" -> // Falkory220 - QuarkSounds.PET_NEKO; - case "d475af59-d73c-42be-90ed-f1a78f10d452" -> // DaniCherryJam - QuarkSounds.PET_SLIME; - case "458391f5-6303-4649-b416-e4c0d18f837a" -> // yrsegal - QuarkSounds.PET_WIRE; - default -> null; - }; - } - if (sound != null) { + SoundEvent sound = null; + float pitchCenter = 1f; + if (living instanceof Axolotl) { + sound = SoundEvents.AXOLOTL_SPLASH; + } else if (living instanceof Cat || living instanceof Ocelot) { + sound = SoundEvents.CAT_PURREOW; + } else if (living instanceof Chicken) { + sound = SoundEvents.CHICKEN_AMBIENT; + } else if (living instanceof Cow) { + sound = SoundEvents.COW_AMBIENT; + pitchCenter = 1.2f; + } else if (living instanceof AbstractHorse) { + sound = SoundEvents.HORSE_AMBIENT; + } else if (living instanceof AbstractFish) { + sound = SoundEvents.FISH_SWIM; + } else if (living instanceof Fox) { + sound = SoundEvents.FOX_SLEEP; + } else if (living instanceof Squid) { + sound = (living instanceof GlowSquid) ? + SoundEvents.GLOW_SQUID_SQUIRT : SoundEvents.SQUID_SQUIRT; + pitchCenter = 1.2f; + } else if (living instanceof Parrot) { + sound = SoundEvents.PARROT_AMBIENT; + } else if (living instanceof Pig) { + sound = SoundEvents.PIG_AMBIENT; + } else if (living instanceof Rabbit) { + sound = SoundEvents.RABBIT_AMBIENT; + } else if (living instanceof Sheep) { + sound = SoundEvents.SHEEP_AMBIENT; + } else if (living instanceof Strider) { + sound = SoundEvents.STRIDER_HAPPY; + } else if (living instanceof Turtle) { + sound = SoundEvents.TURTLE_AMBIENT_LAND; + } else if (living instanceof Player pettee) { + var uuid = pettee.getStringUUID(); + sound = switch (uuid) { + case "a2ce9382-2518-4752-87b2-c6a5c97f173e" -> // petra_the_kat + QuarkSounds.PET_DEVICE; + case "29a10dc6-a201-4993-80d8-c847212bc92b", // MacyMacerator + "d30d8e38-6f93-4d96-968d-dd6ec5596941" -> // Falkory220 + QuarkSounds.PET_NEKO; + case "d475af59-d73c-42be-90ed-f1a78f10d452" -> // DaniCherryJam + QuarkSounds.PET_SLIME; + case "458391f5-6303-4649-b416-e4c0d18f837a" -> // yrsegal + QuarkSounds.PET_WIRE; + default -> null; + }; + } + if (sound != null) { + if (event.getHand() == InteractionHand.MAIN_HAND) { if (player.level instanceof ServerLevel serverLevel) { var pos = living.getEyePosition(); serverLevel.sendParticles(ParticleTypes.HEART, pos.x, pos.y + 0.5, pos.z, 1, 0, 0, 0, 0.1); living.playSound(sound, 1F, pitchCenter + (float) (Math.random() - 0.5) * 0.5F); } else player.swing(InteractionHand.MAIN_HAND); - - event.setCanceled(true); } + + event.setCanceled(true); } } } @@ -146,6 +146,7 @@ public void onInteract(PlayerInteractEvent.EntityInteract event) { + @SubscribeEvent public void onTame(AnimalTameEvent event) { if(event.getAnimal() instanceof Wolf wolf) { From d7c99e8814b4c314c649a770bf3491b165197e64 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 19:18:33 +0100 Subject: [PATCH 11/12] Update changelog --- changelog.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index a7b35ce588..c410340517 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1 +1,3 @@ -- Fixed startup crash (for real this time!!) \ No newline at end of file +- Fixed crash with Rubidium +- Fixed having pat all mobs enabled toggling sitting +- Optimized item share packet size \ No newline at end of file From dd45fcf6b5e858070b12a25be87328c70531dfa3 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Tue, 15 Aug 2023 19:18:48 +0100 Subject: [PATCH 12/12] build --- build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index df0abef2b9..a7b9403dcb 100644 --- a/build.properties +++ b/build.properties @@ -1,9 +1,9 @@ -#Tue Aug 15 17:08:57 UTC 2023 +#Tue Aug 15 18:18:48 UTC 2023 mapping_version=1.19.2 version=3.4 mod_name=Quark mc_version=1.19.2 mapping_channel=official mod_id=quark -build_number=409 +build_number=410 dir_output=../Build Output/Quark/