PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Unable to remove amadron recipes

benbenlaw opened this issue ยท 32 comments

commented

For feature requests, just erase this template and clearly describe the feature you'd like to see

1.16.3

34.1.42

pneumaticcraft-repressurized-1.16.4-2.6.2-73.jar

Unable to remove recipes from amadron tablet

Using kubejs to remove recipes they go from jei but recipes still shown in amadron tablet

commented

Im not at pc till tomorow but kubejs allow you to remove and add recipes. So i removed the amadron recipes using there id. They were removed from jei but were still show in the amadron tablet gui. how would i remove the recipes using data packs?

commented

Without seeing your config, I couldn't possibly answer.

commented

I don't know how kubejs does what it does, but the only recommended way to remove recipes is via datapack.

commented

However, if you actually explain what you're doing with kubejs, I might be able to take a look. I need to see your kubejs configuration.

commented

**
image
**

commented

that removes recipes using recipe id
image

commented

these are the only recipes then shown in jei

commented

image
opening tablet still shows old recipes as well as new ones

commented

Ok i will get the configs sent to you tomorow

commented

Tested it out all seems to be working as intended now thanks again

commented

Thanks, I confirmed the problem on my local test server, and I believe I have it fixed. The fix will be in the next release (2.7.0 in the next few days), but if you'd like to test this beforehand, you can download build 81 from https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized-1.16/ - if you do, I'd advise running on a test server rather than your live server.

commented

thanks buddy

commented

another thing how do i set the recipes that i add to change everyday as when i turn it on it show random recipes. I set my recipes to none staic so it refreshes the shop but doesnt shown anything

commented

So there's several types of recipe, and any of them can show up in the tablet at any given time:

  • The completely static ones which always show up. They're from JSON files in data/recipes/pneumaticcraft/amadron/*, and the JSON has a "static": true line in it.
  • The random (periodic) ones which change once per Minecraft day (by default): they're in the same place as the static ones, but have "static": false and level: X where X is the rarity (1=common, 5=very rare)
  • Villager trades - mixed in with the periodic trades. The villager trade level is the rarity so level 5 trades are far less common than level 1 trades.
  • Player->player trades - added by players on a SMP server. They always show up but need the selling player to have put some items in stock (Amadaron uses an escrow system for this). These are saved in world/pneumaticcraft/AmadronPlayerOffers.cfg on a server.

Adding a recipe with "static": false should be fine (default level is 1 if you leave it out). It could be you're just not seeing it because there are also a lot of villager trades that appear, and it's a random pool for all periodic and villager trades.

commented

so is they any way of diasabling the other recipes and just pick from the once that i add?

commented

Not right now, but I could add some config to control that. I guess you want to limit or disable the number of villager trades that get picked so your own random trades show up more often?

commented

yeah i would like to be able to disable all thoose other options and have if just select from the recipe datapacks that i add

commented

say it chosing 10 of the recipes that i add out of 100. then chnages daliy the way it does with the cvillager trades. without using the villager trades

commented

So no player->player trades either? You can disable those in config now: max_trades_per_player = 0 (although ops will still be able to add trades).

You can limit the number of random trades that are added in config: numPeriodicOffers = X (default is 20, so 20 random offers are added to the list of static offers).

So I think the only thing then would be a limit on the number of villager trades picked. I think the best way would be to completely separate out periodic and villager offers, and have a separate numVillagerOffers setting (probably also 20 by default, to keep current behaviour). Then you can set that to 0, and numPeriodicOffers to 10, which should get the behaviour you want.

Shouldn't be too hard to do. I'll let you know when there's a new build ready...

commented

yeah becuase when i changed the numPeriodicOffers to 0 it didnt give any of the trades i had added. so yeah if you added numVillagerOffers and default 20 and i changed it to 0 it will then only be able to pull recipes from add datapacks.

SOUND AMAZING THANKS

commented

OK, give build 82 a go...

In the "Amadron" section in config/pneumaticraft-common.toml you will see two settings: numVillagerOffers and numPeriodicOffers, which should be self-explanatory. If you set numVillagerOffers to 0, you will only see your periodic offers and never any villager trades. And of course, you should set numPeriodicOffers to some number less than the number of periodic offers you add...

commented

testing it right now. this seems to work great thanks for this

commented

can you sell tag items?

commented

like minecraft:music_discs to trade all types of music discs

commented

No, sadly not. It would be cool but that's a lot more work to add and would need some low-level changes to how the whole system works right now. I'll consider it, but don't expect it before Minecraft 1.17...

commented

thats fine mate these changes you made are already fantasic for what i want to use it for thanks again :)

commented

im guess you cant do nbt data either right

commented

No, NBT is actually supported. Easiest way to see the syntax is to add (say) an enchanted tool as a player offer, and take a look at the JSON in world/pneumaticcraft/AmadronPlayerOffers.cfg. E.g. an undamaged Netherite Sword with Sharpness V:

"output": {
        "type": "ITEM",
        "id": "minecraft:netherite_sword",
        "amount": 1,
        "nbt": "{Enchantments:[{lvl:5s,id:\"minecraft:sharpness\"}],Damage:0}"
},

Pretty standard Minecraft NBT syntax there.

commented

oh i tried it and couldnt getting working with potions or enchanted books

commented

It works. Just tested with this kubejs script:

event.recipes.pneumaticcraft.amadron({
    "static": false,
    "level": 1,
    "input": { "type": "ITEM", "id": "minecraft:nether_star", "amount": 1 },
    "output": { "type": "ITEM", "id": "minecraft:netherite_sword", "amount": 1, "nbt": "{Damage:0,Enchantments:[{lvl:5,id:\"minecraft:sharpness\"}]}" }
  })

and I see an offer to trade a Nether Star for a Sharpness V Netherite Sword.

commented

whoops i forgot the common after the amount

commented

Fixed in 2.7.0 release