aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Readme.md2
-rw-r--r--src/main/java/re/jag/parquet/mixin/SellMapFactoryMixin.java5
-rw-r--r--src/main/resources/parquet.mixins.json3
3 files changed, 5 insertions, 5 deletions
diff --git a/Readme.md b/Readme.md
index 46bce2c..5b458b3 100644
--- a/Readme.md
+++ b/Readme.md
@@ -71,7 +71,7 @@ elytra flight.
### [MC-126244](https://bugs.mojang.com/browse/MC-126244)
-**Deactivated**
+Bug is marked as fixed, but still crashes for me. GG!
Cartographer map trade replaced with dummy map around (0,0) to mitigate server crash in large worlds due to poor
implementation of locateStructure.
diff --git a/src/main/java/re/jag/parquet/mixin/SellMapFactoryMixin.java b/src/main/java/re/jag/parquet/mixin/SellMapFactoryMixin.java
index fb6e796..b08cbee 100644
--- a/src/main/java/re/jag/parquet/mixin/SellMapFactoryMixin.java
+++ b/src/main/java/re/jag/parquet/mixin/SellMapFactoryMixin.java
@@ -19,14 +19,13 @@ import org.spongepowered.asm.mixin.Shadow;
import java.util.Random;
// No longer activated, but left here, just in case
+// Update: Turns out Mojang sets bugs to fixed with dice
@Mixin(targets="net.minecraft.village.TradeOffers$SellMapFactory")
public class SellMapFactoryMixin implements TradeOffers.Factory {
@Shadow
private int price;
@Shadow
- private String structure;
- @Shadow
private MapIcon.Type iconType;
@Shadow
private int maxUses;
@@ -43,7 +42,7 @@ public class SellMapFactoryMixin implements TradeOffers.Factory {
ItemStack itemStack = FilledMapItem.createMap(serverWorld, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
FilledMapItem.fillExplorationMap(serverWorld, itemStack);
MapState.addDecorationsTag(itemStack, blockPos, "+", this.iconType);
- itemStack.setCustomName(new LiteralText("You shall not crash"));
+ itemStack.setCustomName(new LiteralText("Mojang-award for code quality"));
return new TradeOffer(new ItemStack(Items.EMERALD, this.price), new ItemStack(Items.COMPASS), itemStack, this.maxUses, this.experience, 0.2F);
}
}
diff --git a/src/main/resources/parquet.mixins.json b/src/main/resources/parquet.mixins.json
index d933fe3..2185175 100644
--- a/src/main/resources/parquet.mixins.json
+++ b/src/main/resources/parquet.mixins.json
@@ -10,7 +10,8 @@
"BootstrapMixin",
"FireWorkItemMixin",
"AbstractTraderEntityMixin",
- "StatsMixin"
+ "StatsMixin",
+ "SellMapFactoryMixin"
],
"server": [
],