Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.plusls.MasaGadget.impl.feature.entityInfo;

import com.google.common.collect.Lists;
import com.plusls.MasaGadget.mixin.accessor.AccessorAbstractVillager;
import com.plusls.MasaGadget.util.PcaSyncProtocol;
import com.plusls.MasaGadget.util.VillagerDataUtil;
import org.jetbrains.annotations.NotNull;
Expand All @@ -23,6 +24,7 @@
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.trading.MerchantOffer;
import net.minecraft.world.item.trading.MerchantOffers;

// CHECKSTYLE.OFF: ImportOrder
//#if MC > 12006
Expand Down Expand Up @@ -59,8 +61,13 @@ public class VillagerTradeEnchantedBookInfo {
}

List<Component> ret = Lists.newArrayList();
MerchantOffers offers = ((AccessorAbstractVillager) villager).masa_gadget_mod$getOffers();

for (MerchantOffer tradeOffer : villager.getOffers()) {
if (offers == null) {
return ret;
}

for (MerchantOffer tradeOffer : offers) {
ItemStack sellItem = tradeOffer.getResult();
ItemStackCompat sellItemCompat = ItemStackCompat.of(sellItem);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
public interface AccessorAbstractVillager {
@Accessor("offers")
void masa_gadget_mod$setOffers(MerchantOffers offers);

@Accessor("offers")
MerchantOffers masa_gadget_mod$getOffers();
}

This file was deleted.

5 changes: 4 additions & 1 deletion src/main/java/com/plusls/MasaGadget/util/RenderUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public static void drawLine(Vec3 pos1, Vec3 pos2, Color4f color) {
RenderUtil.beginLines(builder);
//#endif
//#endif
//#if MC > 12006
//#if MC >= 1.21.11
//$$ builder.addVertex((float) pos1.x(), (float) pos1.y(), (float) pos1.z()).setColor(color.r, color.g, color.b, color.a).setLineWidth(1.0F);
//$$ builder.addVertex((float) pos2.x(), (float) pos2.y(), (float) pos2.z()).setColor(color.r, color.g, color.b, color.a).setLineWidth(1.0F);
//#elseif MC > 12006
//$$ builder.addVertex((float) pos1.x(), (float) pos1.y(), (float) pos1.z()).setColor(color.r, color.g, color.b, color.a);
//$$ builder.addVertex((float) pos2.x(), (float) pos2.y(), (float) pos2.z()).setColor(color.r, color.g, color.b, color.a);
//#if MC > 12104
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/masa_gadget_mod.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,16 @@
"mod_tweak.tweakeroo.inventoryPreviewSupportSelect.MixinInGameHud",
"mod_tweak.tweakeroo.inventoryPreviewSupportSelect.MixinInventoryOverlay",
"mod_tweak.tweakeroo.inventoryPreviewSupportShulkerBoxItemEntity.MixinRenderUtils",
"mod_tweak.tweakeroo.inventoryPreviewSupportTradeOfferList.MixinAbstractVillager",
"mod_tweak.tweakeroo.inventoryPreviewSupportTradeOfferList.MixinRenderUtils",
"mod_tweak.tweakeroo.inventoryPreviewSyncDataClientOnly.MixinClientPacketListener",
"mod_tweak.tweakeroo.inventoryPreviewUseCache.MixinRenderUtils"
],
"injectors": {
"defaultRequire": 1
},
"mixins": [
"network.MixinMagicPacketRegisterCenter"
],
"injectors": {
"defaultRequire": 1
},
"mixinextras": {
"minVersion": "0.5.4"
}
Expand Down

This file was deleted.

Loading