Lightman's Currency

Lightman's Currency

331k Downloads

BUG:

ZEROX7 opened this issue ยท 3 comments

commented

Minecraft Version

1.19.2

Forge Version

43.2.8

Lightman's Currency Version

2.1.0.0c

Environment Type

Dedicated Server (Bug/crash happened while connected to a server or while the dedicated server was booting)

Other relevant Mods

No response

Describe the bug

Persitant Trader ignores the free sample rule thats defined,

To Reproduce

{
"Traders": [
{
"Type": "lightmanscurrency:item_trader",
"Name": "StarterGear",
"Trades": [
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:stone_axe",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 3
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:leather_helmet",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 5
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:stone_sword",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:leather_chestplate",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 8
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:stone_pickaxe",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 3
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:leather_leggings",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 7
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "farmersdelight:hamburger",
"Count": 16
},
"Price": [
{
"Coin": "lightmanscurrency:coin_gold",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "minecraft:leather_boots",
"Count": 1,
"Tag": "{Damage:0}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 4
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "lightmanscurrency:wallet_copper",
"Count": 1
},
"Price": [
{
"Coin": "lightmanscurrency:coin_iron",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "sophisticatedbackpacks:backpack",
"Count": 1,
"Tag": "{}"
},
"Price": [
{
"Coin": "lightmanscurrency:coin_iron",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "lightmanscurrency:portable_terminal",
"Count": 1
},
"Price": [
{
"Coin": "lightmanscurrency:coin_gold",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "lightmanscurrency:portable_atm",
"Count": 1
},
"Price": [
{
"Coin": "lightmanscurrency:coin_gold",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "comforts:sleeping_bag_white",
"Count": 1
},
"Price": [
{
"Coin": "lightmanscurrency:coin_iron",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
},
{
"TradeType": "SALE",
"SellItem": {
"ID": "naturescompass:naturescompass",
"Count": 1
},
"Price": [
{
"Coin": "lightmanscurrency:coin_iron",
"Count": 1
}
],
"Rules": [
{
"Limit": 1,
"ForgetTime": 86400000,
"Type": "lightmanscurrency:player_trade_limit"
},
{
"Type": "lightmanscurrency:free_sample"
}
]
}
],
"ID": "StarterGear",
"OwnerName": "Server"
},
{
"Type": "lctech:energy_trader",
"Name": "Singularity Energy Corp",
"Trades": [
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_netherite",
"Count": 1
}
],
"Quantity": 1000000,
"TradeRules": []
},
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_diamond",
"Count": 1
}
],
"Quantity": 100000,
"TradeRules": []
},
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_emerald",
"Count": 1
}
],
"Quantity": 10000,
"TradeRules": []
},
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_gold",
"Count": 1
}
],
"Quantity": 1000,
"TradeRules": []
},
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_iron",
"Count": 1
}
],
"Quantity": 100,
"TradeRules": []
},
{
"TradeType": "PURCHASE",
"Price": [
{
"Coin": "lightmanscurrency:coin_copper",
"Count": 1
}
],
"Quantity": 10,
"TradeRules": []
}
],
"ID": "Singularity Energy Corp",
"OwnerName": "Server"
}
],
"Auctions": [
{
"id": "Ultimate Pollution Filter",
"Item1": {
"ID": "minecraft:nether_star",
"Count": 1
},
"Duration": 604800000,
"StartingBid": [
{
"Coin": "lightmanscurrency:coin_netherite",
"Count": 1
}
],
"MinimumBid": [
{
"Coin": "lightmanscurrency:coin_copper",
"Count": 1
}
]
}
]
}

Screenshots/Logs/Crash Reports

image

commented

well i think the persistant traders in general are broken i had 2 persistant auctions now even though the files has one defined after deleting the auction house via command auction are gone for good

commented

Well this wasn't the problem you were encountering, but there was an issue with Trade Rules in the newer versions and how they're applied to persistent traders (due to some changes in v2.1.1.0), so thanks for bringing this up even if it wasn't technically that issue that you reported.

Having said that, the issue you're having with the Free Samples aren't unique to Persistent Traders, but was ironically an issue that I fixed in the v2.1.1.0 update (free samples only applied to non-sales because I can't code apparently) so no matter what the Free Sample was screwed up in some way or another.

Either way, I'll post a fix for both issues later today, one to fix the newer issue, and of course one to fix the Free Sample on the older builds.

commented

Fixed in v2.1.0.0d