-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Linguardium/dev
Add config add capability to disable vanilla wandering trader fix item parsing and add support for nbt laden itemstacks
- Loading branch information
Showing
14 changed files
with
303 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
var TraderTweaker = libcd.require("Tradesmen.TraderTweaker"); | ||
var TweakerUtils = libcd.require("libcd.util.TweakerUtils"); | ||
var newPickStack = TweakerUtils.createItemStack("minecraft:diamond_pickaxe"); | ||
newPickStack = TweakerUtils.setDamage(newPickStack, 1430); | ||
newPickStack = TweakerUtils.setName(newPickStack, "Patched Pickaxe"); | ||
newPickStack = TweakerUtils.enchant(newPickStack, "minecraft:fortune", 1); | ||
|
||
TraderTweaker.addTrader("tradesmen:beef_trader","entity.tradesmen.carltwo.name", "tradesmen:textures/entity/taco_man.png", "minecraft:cow",[ | ||
TraderTweaker.makeTrade("minecraft:rotten_flesh",1,4,4,1) | ||
TraderTweaker.makeTrade("minecraft:rotten_flesh@4",1,4,1) | ||
], | ||
[ | ||
TraderTweaker.makeTrade("minecraft:cooked_beef",1,4,4,1), | ||
TraderTweaker.makeTrade("minecraft:cooked_beef@2",[ "minecraft:emerald","minecraft:rotten_flesh@4"],4,1), | ||
]); | ||
TraderTweaker.addTrader("tradesmen:fish_trader","Sad Fishman", "", "minecraft:cod",[ | ||
TraderTweaker.makeTrade(newPickStack,1,4,4,1) | ||
], | ||
[ | ||
TraderTweaker.makeTrade("minecraft:cooked_cod@1",newPickStack,4,1), | ||
]); | ||
TraderTweaker.addTrader("tradesmen:pig_trader","Wigby", "", "minecraft:pig",[ | ||
TraderTweaker.makeTrade("minecraft:porkchop",1,4,4,1) | ||
], | ||
[ | ||
TraderTweaker.makeTrade("minecraft:cooked_porkchop",1,4,4,1), | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/mod/linguardium/tradesmen/config/ConfigMenu.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mod.linguardium.tradesmen.config; | ||
|
||
import io.github.prospector.modmenu.api.ModMenuApi; | ||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; | ||
import mod.linguardium.tradesmen.Tradesmen; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.gui.screen.Screen; | ||
|
||
import java.util.Optional; | ||
import java.util.function.Supplier; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class ConfigMenu implements ModMenuApi { | ||
@Override | ||
public String getModId() { | ||
return Tradesmen.MOD_ID; | ||
} | ||
|
||
@Override | ||
public Optional<Supplier<Screen>> getConfigScreen(Screen screen) { | ||
return Optional.of(AutoConfig.getConfigScreen(ModConfig.class, screen)); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/mod/linguardium/tradesmen/config/ModConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package mod.linguardium.tradesmen.config; | ||
|
||
import me.sargunvohra.mcmods.autoconfig1u.ConfigData; | ||
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; | ||
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry; | ||
|
||
@Config.Gui.Background("minecraft:textures/block/orange_shulker_box.png") | ||
@Config(name = "tradesmen") | ||
public class ModConfig implements ConfigData { | ||
|
||
public boolean disableWanderingTrader = false; | ||
public boolean despawnAnimals = true; | ||
@ConfigEntry.Gui.Tooltip | ||
public int spawnDelay = 24000; | ||
|
||
@ConfigEntry.BoundedDiscrete(max=100,min=1) | ||
public int spawnChance = 25; | ||
|
||
|
||
} |
Oops, something went wrong.