A proper way to ban items ?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
C

Citron

Guest
Hello there,

I'm working on a private pack and I'd want to ban some items, because I like balanced modpacks.
In this case, I'm banning passive spawners.

I want to remove :
- Chicken Food (Mob Grinding Utils)
- Spawner Changer & Spawner Shard (Actually Additions)
- Spawner Agitator (Pneumaticcraft)
- Cursed Earth & Resturbed Mob Spawner (Ex2)

Cursed Earth and Resturbed Mob Spawner can be disabled in the config
Chicken Food is craft-only, so recipe removed by CraftTweaker

I removed the recipes of the Spawner Changer and Spawner Agitator, but I can't disable them in the config. We can find them in Dungeon Chests, but the map is already generated.
I tried to place a commandblock that remove those items in players inventories but it's performance killer.
The Spawner Shard is a spawner-loot and without the recipe is useless.

Any lag-less idea to disable completely those 3 items ?
 

Pyure

Not Totally Useless
Aug 14, 2013
8,334
7,191
383
Waterloo, Ontario
Are you super-tied to your already-generated world? You might need to add a mod that lets you manage dungeon loot, and then ensure the items are blacklisted. And then make a new world.

You might be able to preserve the world if:
1) You can mcedit (or something) to remove instances of items from the world
2) You can temporarily remove the mod (to kill any items from that mod in existence). Obviously this can have other brutal repercussions, especially if the mod contributed worldgen. (In which case definitely don't do this)
 
C

Citron

Guest
Ow, MCEdit looks like a good idea ! I'm gonna try this ^_^
I can't remove the mods, infortunatly. It would break to many things :l

By looking some commandblock threads, I just got an idea, a simple function like

/scoreboard players tag @a add HasItem {Inventory:[{id:"actuallyaddition:spawner_changer"}}}]}
/scoreboard players tag @a add HasItem {Inventory:[{id:"actuallyaddition:spawner_shard"}}}]}
/scoreboard players tag @a add HasItem {Inventory:[{id:"pneumaticcraft:spawner_agitator"}}}]}
/clear @a[tag=HasItem] actuallyaddition:spawner_changer
/clear @a[tag=HasItem] actuallyaddition:spawner_shard
/clear @a[tag=HasItem] pneumaticcraft:spawner_agitator
/scoreboard players tag @a[tag=HasItem] remove HasItem

I'll take a look asap


EDIT


INGAME :
/scoreboard objectives add banItem dummy
/gamerule gameFunctionLoop namespace:function

FUNCTION :
scoreboard players set @a banItem 1 {Inventory:[{id:"actuallyadditions:item_spawner_changer"}]}
scoreboard players set @a banItem 1 {Inventory:[{id:"actuallyadditions:item_misc",Damage:20s}]}
scoreboard players set @a banItem 1 {Inventory:[{id:"pneumaticcraft:spawner_agitator"}]}
clear @a[score_banItem_min=1] actuallyadditions:item_spawner_changer
clear @a[score_banItem_min=1] actuallyadditions:item_misc 20
clear @a[score_banItem_min=1] pneumaticcraft:spawner_agitator
scoreboard players set @a[score_banItem_min=1] banItem 0

It works like a charme, why I had not thought about it earlier.
 
Last edited: