2b2t fix
This commit is contained in:
@@ -36,7 +36,11 @@ processResources {
|
|||||||
inputs.property "mod_version", project.mod_version
|
inputs.property "mod_version", project.mod_version
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") {
|
filesMatching("fabric.mod.json") {
|
||||||
expand "mod_version": project.mod_version
|
expand([
|
||||||
|
"mod_version" : project.version,
|
||||||
|
"minecraft_version_min": project.property("minecraft_version_min"),
|
||||||
|
"malilib_version" : project.property("malilib_version")
|
||||||
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ mod_name = AutoTrade
|
|||||||
author = sebseb7
|
author = sebseb7
|
||||||
mod_file_name = autotrade-fabric
|
mod_file_name = autotrade-fabric
|
||||||
|
|
||||||
mod_version = 0.0.7
|
mod_version = 0.0.8
|
||||||
|
|
||||||
malilib_version = 0.18.0
|
malilib_version = 0.18.0
|
||||||
|
minecraft_version_min = 1.20.3
|
||||||
minecraft_version_out = 1.20.4
|
minecraft_version_out = 1.20.4
|
||||||
|
|
||||||
minecraft_version = 1.20.4
|
minecraft_version = 1.20.4
|
||||||
mappings_version = 1.20.4+build.1
|
|
||||||
fabric_loader_version = 0.15.1
|
mappings_version = 1.20.4+build.3
|
||||||
|
fabric_loader_version = 0.15.3
|
||||||
mod_menu_version = 9.0.0
|
mod_menu_version = 9.0.0
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.util.HashMap;
|
|||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen;
|
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
|
||||||
import net.minecraft.client.gui.screen.ingame.MerchantScreen;
|
import net.minecraft.client.gui.screen.ingame.MerchantScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.ShulkerBoxScreen;
|
import net.minecraft.client.gui.screen.ingame.ShulkerBoxScreen;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -212,11 +211,11 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (GuiUtils.getCurrentScreen() instanceof MerchantScreen) {
|
if (GuiUtils.getCurrentScreen() instanceof MerchantScreen) {
|
||||||
|
MerchantScreen screen = (MerchantScreen) GuiUtils.getCurrentScreen();
|
||||||
if (state == false) {
|
if (state == false) {
|
||||||
String sellItemStr = Configs.Generic.SELL_ITEM.getStringValue();
|
String sellItemStr = Configs.Generic.SELL_ITEM.getStringValue();
|
||||||
String buyItemStr = Configs.Generic.BUY_ITEM.getStringValue();
|
String buyItemStr = Configs.Generic.BUY_ITEM.getStringValue();
|
||||||
state = true;
|
state = true;
|
||||||
MerchantScreen screen = (MerchantScreen) GuiUtils.getCurrentScreen();
|
|
||||||
MerchantScreenHandler handler = screen.getScreenHandler();
|
MerchantScreenHandler handler = screen.getScreenHandler();
|
||||||
TradeOfferList offers = handler.getRecipes();
|
TradeOfferList offers = handler.getRecipes();
|
||||||
for (int i = 0; i < offers.size(); i++) {
|
for (int i = 0; i < offers.size(); i++) {
|
||||||
@@ -255,8 +254,8 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen.close();
|
|
||||||
}
|
}
|
||||||
|
screen.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,10 +284,6 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GuiUtils.getCurrentScreen() instanceof HandledScreen) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
||||||
Vector<Entity> newVillagersInRange = new Vector<Entity>(villagersInRange);
|
Vector<Entity> newVillagersInRange = new Vector<Entity>(villagersInRange);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"minecraft": ">=1.20.3",
|
"minecraft": ">=${minecraft_version_min}",
|
||||||
"malilib": ">=0.18.0"
|
"malilib": ">=${malilib_version}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user