How would you check if Minecraft iself was loaded?
Disabling Nether portals and mob spawners etc.
You don't need to check if Minecraft is loaded. It is obviously always loaded.
The default scripts that come with INpureCore hide nether portals and mob spawners already. The script looks like:
var vanilla_blocks = ["portal", "end_portal", "mob_spawner", "fire", "water", "lava"];
if (vanilla_enabled){
for each (block in vanilla_blocks){
// Vanilla items and blocks have special handlers.
NEI.hide_block_vanilla(block);
}
}
vanilla_enabled in this case is a config flag if this code should run, not checking if vanilla content is loaded.
So we should be able to just edit the default script if we wanted to diable/enable vanila stuff?
You can if you like. If you manage to mess up a default script just delete the entire custom_nei_filters folder and it will regenerate when you load Minecraft again.
I don't believe I included a hook to disable vanilla items, but I'll get that in there next go round. For blocks you can just add things to the array in the default vanilla.js.
I assume the new version hasn't been put up yet or something? Or am I crazy? Mine still isn't culling anything particular. Every NEI item is still there using INpureCore-[1.7.10]1.0.0B4-7.jar version on Curse.
I assume the new version hasn't been put up yet or something? Or am I crazy? Mine still isn't culling anything particular. Every NEI item is still there using INpureCore-[1.7.10]1.0.0B4-7.jar version on Curse.
Other than vanilla.js failing to block all the mob spawner variants I can't confirm anything being wrong with the culling on 1.0.0B4-7.
Check config/INpureProjects/custom_nei_filters and see if the scripts have generated. And see if there is a logs folder in config/INpureProjects. Beyond that just check your normal log to make sure the script system is loading. It starts up as the world is loading, so it should be near the bottom of the log file.
Hmm. Scripts did indeed generate, but there is no logs folder in config/INpureProjects at all. Additionally, it keeps telling me upon load in: [16:00:22] [Client thread/INFO]: [CHAT] §6[INpureCore]§f A new version is available: §bR1.0.0B3§f. But I am indeed playing on the newest version, double and triple-checked such.
Hmm. Scripts did indeed generate, but there is no logs folder in config/INpureProjects at all. Additionally, it keeps telling me upon load in: [16:00:22] [Client thread/INFO]: [CHAT] §6[INpureCore]§f A new version is available: §bR1.0.0B3§f. But I am indeed playing on the newest version, double and triple-checked such.
Yeah, Jenkins decided to not update the version number inside the jar for some reason, but changed the number on the file name. Very annoying. I'll run a clean on the workspace to try and fix that.
I'm working on adding logging to the culling process so we can track down exactly what is happening on your end. If you'd like I'll PM you a debug jar shortly that will give us a detailed breakdown of exactly where the process is going wrong.
I'd greatly appreciate that so PM away, thanks for a quick response.
Edit: Additionally, I didn't say it in my last post but the script system is not loading. The normal log file as the game starts says nothing about the script system starting besides the whole version thing.
Sorry for the double-post, but I tracked down the issue!
I have both jre8 and jre7. I had been using jre8 mostly due to laziness, but once I switched back to jre7, it worked fine. All proper things are culled.
Sorry for the double-post, but I tracked down the issue!
I have both jre8 and jre7. I had been using jre8 mostly due to laziness, but once I switched back to jre7, it worked fine. All proper things are culled.
Ah. That would do it. The script engine uses the build in Javascript from the Java Scripting API. This API changed in Java 8.
[Details]
1.vanilla.js
"NEI.hide_block_vanilla" does not have an effect in the following item
- spawn_egg
2.Tinkers' Construct
"NEI.hide_item/block" does not have an effect in the following items
- WoolSlab1, WoolSlab2
- ToolParts(Toollod,Pickaxehead...etc)
- Tools(Pickaxe,Shovel,Hatchet...etc)
3.Thaumcraft
"NEI.hide_item" does not have an effect in the following items
- ItemWispEssence
- ItemSpawnerEgg
4.TwilightForest
"NEI.hide_item/block" does not have an effect in the following items
- item.tfspawnegg
- tile.TFBossSpawner
5.Railcraft
"NEI.override_block" does not have an effect in the following items. And "Cannot find block" is displayed in Debuglogs
- railcraft.post
- railcraft.post.metal
6.Botania
"NEI.hide_item" does not have an effect in the following item
- buriedPetals
I report the script which did not go well.
Please excuse my poor English.
-snip-
To deal with the vanilla spawn_egg you can use this as of B5:
NEI.hide_item("minecraft:spawn_egg"); or NEI.hide_item("minecraft", "spawn_egg"); These commands are equivalent.
As for the other ones, please look in your config/INpureProjects/logs folder and post the debug.log. (You need to be running version B5 to generate this log).
As for the other ones, please look in your config/INpureProjects/logs folder and post the debug.log. (You need to be running version B5 to generate this log).
FWIW I have mixed results hiding things, too. For example none of the things from Reliquary are being hidden. Neither are the slurries or solutions from RotaryCraft or the "technical" items from DragonAPI. Neither are the "Aspects" from thaumicnei. But lots of other things do work. Backpacks work, Expanded Redstone works, the extra stuff to hide in AE2 works... Sometimes override_item seems to work (although leaving the specified metadata) while hide_item doesn't. For other things, like the springs in RotaryCraft, override_item doesn't work either.
Sorry, my list is too long and I'm too sleepy to report exactly which work and which don't, for me. B5-11, Forge 1217, Java 7, Windows.
var vanilla_blocks = ["flowing_water", "flowing_lava", "monster_egg"];
if (vanilla_enabled){
for each (block in vanilla_blocks){
NEI.hide_block_vanilla(block);
}
NEI.hide_item("minecraft", "spawn_egg");
}
FWIW I have mixed results hiding things, too. For example none of the things from Reliquary are being hidden. Neither are the slurries or solutions from RotaryCraft or the "technical" items from DragonAPI. Neither are the "Aspects" from thaumicnei. But lots of other things do work. Backpacks work, Expanded Redstone works, the extra stuff to hide in AE2 works... Sometimes override_item seems to work (although leaving the specified metadata) while hide_item doesn't. For other things, like the springs in RotaryCraft, override_item doesn't work either.
Sorry, my list is too long and I'm too sleepy to report exactly which work and which don't, for me. B5-11, Forge 1217, Java 7, Windows.
var vanilla_blocks = ["flowing_water", "flowing_lava", "monster_egg"];
if (vanilla_enabled){
for each (block in vanilla_blocks){
NEI.hide_block_vanilla(block);
}
NEI.hide_item("minecraft", "spawn_egg");
}
If that works to hide them it will prove that there is a bug in hide_item that needs to be resolved. If it does not work... then there is still a bug but it is somewhere deeper.
To deal with the vanilla spawn_egg you can use this as of B5:
NEI.hide_item("minecraft:spawn_egg"); or NEI.hide_item("minecraft", "spawn_egg"); These commands are equivalent.
As for the other ones, please look in your config/INpureProjects/logs folder and post the debug.log. (You need to be running version B5 to generate this log).
If that works to hide them it will prove that there is a bug in hide_item that needs to be resolved. If it does not work... then there is still a bug but it is somewhere deeper.
Yes, that appears to work now in all cases where hide_item failed before. However it doesn't address cases where override_item doesn't work. On a whim I tried doing hide_item_plus followed by override_item with its intended meta keys. No change.
You know, you had really good timing for me, adding this functionality. I had just gotten fed up with being unable to figure out the proper syntax for NEI's bannedItems.cfg and also with how it goes in each world save, rather than in the mod configs. Any chance you're also interested in extending the library's reach to creative tabs, like what ReCreate did in 1.6.4?
I'm also curious if it's possible, or if you plan to make it possible, to act upon groups of items determined by, say, regex. Then, instead of needing to explicitly list all items, you could write to hide_item all items with "spawner" in their unlocalized name, or all items containing "WIP" in their English localized name (checked independently from Minecraft's language setting).
And last, why make different commands to hide items and blocks? If NEI has two different API calls, can't the mod figure out which to use? Is there even any harm with calling both just to be sure?
Yes, that appears to work now in all cases where hide_item failed before. However it doesn't address cases where override_item doesn't work. On a whim I tried doing hide_item_plus followed by override_item with its intended meta keys. No change.
You know, you had really good timing for me, adding this functionality. I had just gotten fed up with being unable to figure out the proper syntax for NEI's bannedItems.cfg and also with how it goes in each world save, rather than in the mod configs. Any chance you're also interested in extending the library's reach to creative tabs, like what ReCreate did in 1.6.4?
I'm also curious if it's possible, or if you plan to make it possible, to act upon groups of items determined by, say, regex. Then, instead of needing to explicitly list all items, you could write to hide_item all items with "spawner" in their unlocalized name, or all items containing "WIP" in their English localized name (checked independently from Minecraft's language setting).
And last, why make different commands to hide items and blocks? If NEI has two different API calls, can't the mod figure out which to use? Is there even any harm with calling both just to be sure?
There are individual commands for items and blocks because there are separate look-ups for them in GameRegistry. Once the object is looked up it is the same API call for both. I could technically try both lookups by making a generic NEI.hide hook. Currently the system will refuse to do anything if the GameRegistry returns null, so there wouldn't really be any harm in having it try both.
I'd have to figure out how to get a list of all registered items. This might require hacking the GameRegistry or parsing the trace log (parsing the log might be the most sane option since I already intercept all logs for filtering anyways). To shed some light on it, the process currently goes like this:
1.) If you call the shorthand version, break the string into params. I.E.: "minecraft:spawn_egg" into "minecraft", "spawn_egg".
2.) Pass the params onto GameRegistry. GameRegistry.findItem("minecraft", "spawn_egg"); gives me the reference I need.
3.) If this is override_item, take the int array param and combine it with the reference to make a List of ItemStacks with the proper metadata.
4.) If this is override_item, pass the list to NEI. If this is hide_item, pass the reference to NEI.
I could probably add hooks for creative tabs. I'm just going to write a little list of hooks to add. Reply with more if I missed one you would use.
1.) Create a creative tab with an icon and name.
2.) Assign an item to a tab.
3.) Remove an item from all tabs.
4.) Look-up what mod tabs exist. (I'll have to figure out how exactly this one would work)
Now that we know that the bug is in hide_item I can fix that part so we don't need a custom function. In my experience override_block seems to work just peachy, so the bug with overriding must be in the item version of the command somewhere.
I've implemented basic regex for script functions. I have to say the results are pretty great. I also implemented shortcut functions that work on both blocks and items, though you will still get a "failed to find" message in the log when it tries the wrong path.
My testing Bibliocraft script now looks like this:
if (FML.isModLoaded("BiblioCraft") && Bibliocraft_enabled){
NEI.override("BiblioCraft:*", [0]);
}
How would you check if Minecraft iself was loaded?
Disabling Nether portals and mob spawners etc.
You don't need to check if Minecraft is loaded. It is obviously always loaded.
The default scripts that come with INpureCore hide nether portals and mob spawners already. The script looks like:
vanilla_enabled in this case is a config flag if this code should run, not checking if vanilla content is loaded.
You can if you like. If you manage to mess up a default script just delete the entire custom_nei_filters folder and it will regenerate when you load Minecraft again.
I don't believe I included a hook to disable vanilla items, but I'll get that in there next go round. For blocks you can just add things to the array in the default vanilla.js.
Other than vanilla.js failing to block all the mob spawner variants I can't confirm anything being wrong with the culling on 1.0.0B4-7.
Check config/INpureProjects/custom_nei_filters and see if the scripts have generated. And see if there is a logs folder in config/INpureProjects. Beyond that just check your normal log to make sure the script system is loading. It starts up as the world is loading, so it should be near the bottom of the log file.
Yeah, Jenkins decided to not update the version number inside the jar for some reason, but changed the number on the file name. Very annoying. I'll run a clean on the workspace to try and fix that.
I'm working on adding logging to the culling process so we can track down exactly what is happening on your end. If you'd like I'll PM you a debug jar shortly that will give us a detailed breakdown of exactly where the process is going wrong.
Edit: Additionally, I didn't say it in my last post but the script system is not loading. The normal log file as the game starts says nothing about the script system starting besides the whole version thing.
I have both jre8 and jre7. I had been using jre8 mostly due to laziness, but once I switched back to jre7, it worked fine. All proper things are culled.
Ah. That would do it. The script engine uses the build in Javascript from the Java Scripting API. This API changed in Java 8.
I should put a warning about that in the OP.
The preloader now detects what JVM version you have and configures the script engine appropriately.
1.0.0B5 will be on Curse shortly with this change.
Please excuse my poor English.
[Mods]
INpureCore v1.0.0-B5-11
Forge v10.13.2.1232
CodeChickenLib v1.1.1.105
ForgeMultipart v1.1.0.311
CodeChickenCore v1.0.3.29
NEI v1.0.3.63
Mantle v0.3.2 Build186
Tinkers' Construct v1.7.1c
Iguana Tinker Tweaks v2.0.6 Build73
Baubles v1.0.1.8
Thaumcraft v4.2.1.4
TwilightForest v2.3.2
Railcraft v9.3.3.0
Botania v1.2 Build131
[Details]
1.vanilla.js
"NEI.hide_block_vanilla" does not have an effect in the following item
- spawn_egg
2.Tinkers' Construct
"NEI.hide_item/block" does not have an effect in the following items
- WoolSlab1, WoolSlab2
- ToolParts(Toollod,Pickaxehead...etc)
- Tools(Pickaxe,Shovel,Hatchet...etc)
3.Thaumcraft
"NEI.hide_item" does not have an effect in the following items
- ItemWispEssence
- ItemSpawnerEgg
4.TwilightForest
"NEI.hide_item/block" does not have an effect in the following items
- item.tfspawnegg
- tile.TFBossSpawner
5.Railcraft
"NEI.override_block" does not have an effect in the following items. And "Cannot find block" is displayed in Debuglogs
- railcraft.post
- railcraft.post.metal
6.Botania
"NEI.hide_item" does not have an effect in the following item
- buriedPetals
[Scripts]
vanilla.js http://pastebin.com/AvGjDMS6
TConstruct.js http://pastebin.com/K5e34eir
Thaumcraft.js http://pastebin.com/VmzmGqC7
TwilightForest.js http://pastebin.com/64qfff42
Botania.js http://pastebin.com/wTxHyapL
To deal with the vanilla spawn_egg you can use this as of B5:
NEI.hide_item("minecraft:spawn_egg"); or NEI.hide_item("minecraft", "spawn_egg"); These commands are equivalent.
As for the other ones, please look in your config/INpureProjects/logs folder and post the debug.log. (You need to be running version B5 to generate this log).
FWIW I have mixed results hiding things, too. For example none of the things from Reliquary are being hidden. Neither are the slurries or solutions from RotaryCraft or the "technical" items from DragonAPI. Neither are the "Aspects" from thaumicnei. But lots of other things do work. Backpacks work, Expanded Redstone works, the extra stuff to hide in AE2 works... Sometimes override_item seems to work (although leaving the specified metadata) while hide_item doesn't. For other things, like the springs in RotaryCraft, override_item doesn't work either.
Sorry, my list is too long and I'm too sleepy to report exactly which work and which don't, for me. B5-11, Forge 1217, Java 7, Windows.
Loading table of contents for module: custom_nei_filters, 0.1, Author: clouds
Bootstrap setting found. Loading: Bootstrap.js
Loading: vanilla.js
hide_block called. Params: minecraft, portal
hide_block called. Params: minecraft, end_portal
hide_block called. Params: minecraft, mob_spawner
hide_block called. Params: minecraft, fire
hide_block called. Params: minecraft, water
hide_block called. Params: minecraft, lava
Loading: ThermalExpansion.js
Loading: Mekanism.js
Loading: ForgeMicroblock.js
getRandomMaterial called. Returned: tile.appliedenergistics2.BlockSkyStone_1
obliterate_microblocks called (version in info.inpureprojects.core.NEI.gtfoMicroblocks.ScriptObjects.ForgeMicroblockObject). Params: 1,2,4,257,258,260,513,514,516,769,770,772, tile.appliedenergistics2.BlockSkyStone_1
Loading: ExtraUtilities.js
override_block called. Params: ExtraUtilities, drum, 0,1
Cannot find block ExtraUtilities:drum
getRandomMaterial called. Returned: tile.PP_HardenedStone
obliterate_microblocks called (version in info.inpureprojects.core.NEI.gtfoMicroblocks.ScriptObjects.ExtraUtilitiesObject). Params: 1,2,3, tile.PP_HardenedStone
Loading: BuildCraft.js
Loading: Bibliocraft.js
Loading: AppliedEnergistics2.js
getFacadeItem called.
getSubTypes called.
getNumberOfTypes called. Returned: 907
override_item called. Params: appliedenergistics2, item.ItemFacade, 762
Loading: Custom.js
hide_block called. Params: minecraft, flowing_water
hide_block called. Params: minecraft, flowing_lava
hide_block called. Params: minecraft, monster_egg
hide_item called. Params: minecraft, spawn_egg
override_item called. Params: Backpack, backpack, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,31999
hide_item called. Params: Backpack, workbenchbackpack
hide_item called. Params: DragonAPI, minecraft:bed_technical
hide_item called. Params: DragonAPI, minecraft:piston_head_technical
hide_item called. Params: DragonAPI, minecraft:redstone_wire_technical
hide_item called. Params: DragonAPI, minecraft:wheat_technical
hide_item called. Params: DragonAPI, minecraft:standing_sign_technical
hide_item called. Params: DragonAPI, minecraft:wooden_door_technical
hide_item called. Params: DragonAPI, minecraft:wall_sign_technical
hide_item called. Params: DragonAPI, minecraft:iron_door_technical
hide_item called. Params: DragonAPI, minecraft:lit_redstone_ore_technical
hide_item called. Params: DragonAPI, minecraft:unlit_redstone_torch_technical
hide_item called. Params: DragonAPI, minecraft:reeds_technical
hide_item called. Params: DragonAPI, minecraft:cake_technical
hide_item called. Params: DragonAPI, minecraft:unpowered_repeater_technical
hide_item called. Params: DragonAPI, minecraft:powered_repeater_technical
hide_item called. Params: DragonAPI, minecraft:pumpkin_stem_technical
hide_item called. Params: DragonAPI, minecraft:melon_stem_technical
hide_item called. Params: DragonAPI, minecraft:nether_wart_technical
hide_item called. Params: DragonAPI, minecraft:brewing_stand_technical
hide_item called. Params: DragonAPI, minecraft:cauldron_technical
hide_item called. Params: DragonAPI, minecraft:lit_redstone_lamp_technical
hide_item called. Params: DragonAPI, minecraft:tripwire_technical
hide_item called. Params: DragonAPI, minecraft:flower_pot_technical
hide_item called. Params: DragonAPI, minecraft:skull_technical
hide_item called. Params: DragonAPI, minecraft:unpowered_comparator_technical
hide_item called. Params: DragonAPI, minecraft:powered_comparator_technical
hide_item called. Params: Eln, eln.itemCreativeTab
hide_item called. Params: Eln, Eln.ghostBlock
hide_item called. Params: Eln, Eln.lightBlock
override_item called. Params: ExpandedRedstone, expanded redstone_item_placer, 0,1,1,1,1,2,3,4,5,6,7,8,9,11,12,15,16,17,18,19,21
hide_item called. Params: ExtraUtilities, peaceful_table_top
override_item called. Params: ExtraUtilities, generator, 0,1,2,4,5,10
override_item called. Params: ExtraUtilities, generator.8, 0,1,2,4,5,10
override_item called. Params: ExtraUtilities, generator.64, 0,1,2,4,5,10
override_item called. Params: ExtraUtilities, watering_can, 0,1,2
hide_block called. Params: FlatSigns, blockFlatSign
hide_block called. Params: GalacticraftCore, tile.crudeOilStill
hide_block called. Params: GalacticraftCore, tile.fuel
hide_block called. Params: GalacticraftMars, tile.sludge
hide_block called. Params: Glow, shouldntHave
hide_item called. Params: Glow, misc
hide_item called. Params: Glow, glowstoneGoggles
hide_item called. Params: Glow, energeticGlowstoneGoggles
hide_block called. Params: GollumCoreLib, BlockProximitySpawn
hide_item called. Params: GollumCoreLib, ItemBuilding
hide_block called. Params: GregsLighting, carbideFloodlight
hide_block called. Params: GregsLighting, floodlightBeam
hide_item called. Params: GregsLighting, calciumCarbide
hide_item called. Params: GregsLighting, bonemealAndCharcoal
hide_item called. Params: GregsLighting, gasNozzle
override_block called. Params: IronChest, BlockIronChest, 0,1,2,3,4,6
hide_block called. Params: MorePistons, MorePistonsExtension
hide_block called. Params: MorePistons, MorePistonsRod
hide_block called. Params: ProjRed|Illumination, projectred.illumination.airousLight
hide_block called. Params: ReactorCraft, reactorcraft_block_coriumflowing
hide_block called. Params: ReactorCraft, reactorcraft_block_steam
hide_block called. Params: ReactorCraft, reactorcraft_block_duct
hide_item called. Params: ReactorCraft, reactorcraft_block_line
override_item called. Params: RotaryCraft, rotarycraft_item_slide, 0
override_item called. Params: RotaryCraft, rotarycraft_item_strongcoil, 0,8192,16384,30000
hide_item called. Params: RotaryCraft, rotarycraft_block_advancedgear
hide_block called. Params: RotaryCraft, rotarycraft_block_flywheel
hide_item called. Params: RotaryCraft, rotarycraft_item_debug
hide_item called. Params: RotaryCraft, rotarycraft_item_worldedit
override_item called. Params: RotaryCraft, rotarycraft_item_extracts, 0,1,2,3,4,5,6,7,24,25,26,27,28,29,30,31,32,33
override_item called. Params: RotaryCraft, rotarycraft_item_modextracts, 0,3,4,7,8,11,12,15,16,19,20,23,24,27,28,31,32,35,36,39,40,43,44,47,48,51,52,55,56,59,60,63,64,67,68,71,72,75,76,79,80,83,84,87,88,91,92,95,96,99,100,103,104,107,108,111,112,115,116,119,120,123,124,127,128,131,132,135,136,139,140,143,144,147,148,151,152,155,156,159,160,163,164,167,168,171,172,175,176,179,180,183,184,187,188,191,192,195,196,199,200,203,204,207,208,211,212,215,216,219,220,223,224,227,228,231,232,235,236,239,240,243,244,247,248,251,252,255,256,259,260,263,264,267,268,271,272,275,276,279,280,283,284,287,288,291,292,295,296,299,300,303,304,307,308,311,312,315,316,319,320,323,324,327
hide_block called. Params: Thaumcraft, blockFluxGoo
hide_block called. Params: Thaumcraft, blockFluxGas
hide_block called. Params: Thaumcraft, blockFluidPure
hide_block called. Params: Thaumcraft, blockFluidDeath
hide_block called. Params: Thaumcraft, blockArcaneDoor
hide_block called. Params: Thaumcraft, blockMagicBox
hide_block called. Params: Thaumcraft, blockManaPod
hide_block called. Params: Thaumcraft, blockArcaneFurnace
hide_block called. Params: Thaumcraft, blockWarded
hide_block called. Params: Thaumcraft, blockHole
hide_block called. Params: Thaumcraft, blockPortalEldritch
hide_item called. Params: Thaumcraft, ItemSpawnerEgg
hide_block called. Params: ThaumicTinkerer, infusedFarmland
hide_block called. Params: ThaumicTinkerer, gaseousLight
hide_block called. Params: ThaumicTinkerer, nitorGas
hide_block called. Params: ThaumicTinkerer, infusedGrainBlock
hide_block called. Params: ThaumicTinkerer, forcefield
hide_block called. Params: ThaumicTinkerer, gaseousShadow
hide_block called. Params: ThaumicTinkerer, bedrockPortal
hide_block called. Params: TwilightForest, tile.TFBossSpawner
override_item called. Params: TwilightForest, tile.TFTowerTranslucent, 0,1,2,3,4,5,6,7
hide_block called. Params: TwilightForest, tile.TFTrophy
hide_item called. Params: TwilightForest, item.oreMeter
hide_item called. Params: TwilightForest, item.tfspawnegg
hide_item called. Params: animalbikes, pigbike
hide_item called. Params: animalbikes, cowbike
hide_item called. Params: animalbikes, spiderbike
hide_item called. Params: animalbikes, sheepbike
hide_item called. Params: animalbikes, chickenbike
hide_item called. Params: animalbikes, wolfbike
hide_item called. Params: animalbikes, squidbike
hide_item called. Params: animalbikes, creeperbike
hide_item called. Params: animalbikes, enderbike
hide_item called. Params: animalbikes, dragonbike
hide_item called. Params: animalbikes, notchbike
hide_item called. Params: animalbikes, reindeerbike
hide_item called. Params: animalbikes, snowgolembike
hide_item called. Params: animalbikes, ghastbike
hide_item called. Params: animalbikes, irongolembike
hide_item called. Params: animalbikes, bunnybike
hide_item called. Params: animalbikes, item.null
hide_item called. Params: animalbikes, dinobike
hide_item called. Params: animalbikes, chocobobike
hide_item called. Params: animalbikes, silverfishbike
hide_item called. Params: animalbikes, batbike
hide_item called. Params: animalbikes, chinesedragonbike
hide_item called. Params: animalbikes, teasd
hide_item called. Params: animalbikes, slimebike
hide_item called. Params: animalbikes, ocelotbike
hide_item called. Params: animalbikes, flowerbike
hide_item called. Params: animalbikes, witherbike
hide_block called. Params: appliedenergistics2, tile.BlockCableBus
hide_block called. Params: appliedenergistics2, tile.BlockMatrixFrame
hide_block called. Params: appliedenergistics2, tile.BlockPaint
hide_item called. Params: ephys.playerproxies, item.PP_BiomeStorage
hide_block called. Params: fiat_lux, genericLightBlock
hide_item called. Params: thaumcraftneiplugin, Aspect
hide_block called. Params: xtrablocksdiypowered, BirchDoor
hide_block called. Params: xtrablocksdiypowered, ScreenDoor
hide_block called. Params: xreliquary, altar_idle
hide_block called. Params: xreliquary, altar
hide_block called. Params: xreliquary, apothecary_cauldron
hide_item called. Params: xreliquary, apothecary_mortar
hide_block called. Params: xreliquary, lilypad
hide_block called. Params: xreliquary, wraith_node
hide_item called. Params: xreliquary, alkahest_tome
hide_item called. Params: xreliquary, angelheart_vial
hide_item called. Params: xreliquary, angelic_feather
hide_item called. Params: xreliquary, bullet
hide_item called. Params: xreliquary, destruction_catalyst
hide_item called. Params: xreliquary, emperor_chalice
hide_item called. Params: xreliquary, ender_staff
hide_item called. Params: xreliquary, glowing_bread
hide_item called. Params: xreliquary, glowing_water
hide_item called. Params: xreliquary, gun_part
hide_item called. Params: xreliquary, handgun
hide_item called. Params: xreliquary, harvest_rod
hide_item called. Params: xreliquary, heart_pearl
hide_item called. Params: xreliquary, heart_zhu
hide_item called. Params: xreliquary, hero_medallion
hide_item called. Params: xreliquary, holy_hand_grenade
hide_item called. Params: xreliquary, infernal_chalice
hide_item called. Params: xreliquary, infernal_claws
hide_item called. Params: xreliquary, infernal_tear
hide_item called. Params: xreliquary, kraken_shell
hide_item called. Params: xreliquary, magazine
hide_item called. Params: xreliquary, magicbane
hide_item called. Params: xreliquary, mercy_cross
hide_item called. Params: xreliquary, midas_touchstone
hide_item called. Params: xreliquary, mob_ingredient
hide_item called. Params: xreliquary, phoenix_down
hide_item called. Params: xreliquary, pyromancer_staff
hide_item called. Params: xreliquary, rod_of_lyssa
hide_item called. Params: xreliquary, serpent_staff
hide_item called. Params: xreliquary, shears_of_winter
hide_item called. Params: xreliquary, twilight_cloak
hide_item called. Params: xreliquary, void_tear
hide_item called. Params: xreliquary, witch_hat
hide_item called. Params: xreliquary, witherless_rose
hide_block called. Params: NetherOres, netherOresBlockHellfish
if (vanilla_enabled){
for each (block in vanilla_blocks){
NEI.hide_block_vanilla(block);
}
NEI.hide_item("minecraft", "spawn_egg");
}
if (FML.isModLoaded("Backpack")){
NEI.override_item("Backpack", "backpack", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 31999]);
NEI.hide_item("Backpack", "workbenchbackpack");
}
if (FML.isModLoaded("DragonAPI")){
NEI.hide_item("DragonAPI", "minecraft:bed_technical");
NEI.hide_item("DragonAPI", "minecraft:piston_head_technical");
NEI.hide_item("DragonAPI", "minecraft:redstone_wire_technical");
NEI.hide_item("DragonAPI", "minecraft:wheat_technical");
NEI.hide_item("DragonAPI", "minecraft:standing_sign_technical");
NEI.hide_item("DragonAPI", "minecraft:wooden_door_technical");
NEI.hide_item("DragonAPI", "minecraft:wall_sign_technical");
NEI.hide_item("DragonAPI", "minecraft:iron_door_technical");
NEI.hide_item("DragonAPI", "minecraft:lit_redstone_ore_technical");
NEI.hide_item("DragonAPI", "minecraft:unlit_redstone_torch_technical");
NEI.hide_item("DragonAPI", "minecraft:reeds_technical");
NEI.hide_item("DragonAPI", "minecraft:cake_technical");
NEI.hide_item("DragonAPI", "minecraft:unpowered_repeater_technical");
NEI.hide_item("DragonAPI", "minecraft:powered_repeater_technical");
NEI.hide_item("DragonAPI", "minecraft:pumpkin_stem_technical");
NEI.hide_item("DragonAPI", "minecraft:melon_stem_technical");
NEI.hide_item("DragonAPI", "minecraft:nether_wart_technical");
NEI.hide_item("DragonAPI", "minecraft:brewing_stand_technical");
NEI.hide_item("DragonAPI", "minecraft:cauldron_technical");
NEI.hide_item("DragonAPI", "minecraft:lit_redstone_lamp_technical");
NEI.hide_item("DragonAPI", "minecraft:tripwire_technical");
NEI.hide_item("DragonAPI", "minecraft:flower_pot_technical");
NEI.hide_item("DragonAPI", "minecraft:skull_technical");
NEI.hide_item("DragonAPI", "minecraft:unpowered_comparator_technical");
NEI.hide_item("DragonAPI", "minecraft:powered_comparator_technical");
}
if (FML.isModLoaded("Eln")){
NEI.hide_item("Eln", "eln.itemCreativeTab");
NEI.hide_item("Eln", "Eln.ghostBlock");
NEI.hide_item("Eln", "Eln.lightBlock");
}
if (FML.isModLoaded("ExpandedRedstone")){
NEI.override_item("ExpandedRedstone", "expanded redstone_item_placer", [0, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 16, 17, 18, 19, 21]);
}
if (FML.isModLoaded("ExtraUtilities")){
NEI.hide_item("ExtraUtilities", "peaceful_table_top");
NEI.override_item("ExtraUtilities", "generator", [0, 1, 2, 4, 5, 10]);
NEI.override_item("ExtraUtilities", "generator.8", [0, 1, 2, 4, 5, 10]);
NEI.override_item("ExtraUtilities", "generator.64", [0, 1, 2, 4, 5, 10]);
NEI.override_item("ExtraUtilities", "watering_can", [0, 1, 2]);
}
if (FML.isModLoaded("FlatSigns")){
NEI.hide_block("FlatSigns", "blockFlatSign");
}
if (FML.isModLoaded("GalacticraftCore")){
NEI.hide_block("GalacticraftCore", "tile.crudeOilStill");
NEI.hide_block("GalacticraftCore", "tile.fuel");
}
if (FML.isModLoaded("GalacticraftMars")){
NEI.hide_block("GalacticraftMars", "tile.sludge");
}
if (FML.isModLoaded("Glow")){
NEI.hide_block("Glow", "shouldntHave");
NEI.hide_item("Glow", "misc");
NEI.hide_item("Glow", "glowstoneGoggles");
NEI.hide_item("Glow", "energeticGlowstoneGoggles");
}
if (FML.isModLoaded("GollumCoreLib")){
NEI.hide_block("GollumCoreLib", "BlockProximitySpawn");
NEI.hide_item("GollumCoreLib", "ItemBuilding");
}
if (FML.isModLoaded("GregsLighting")){
NEI.hide_block("GregsLighting", "carbideFloodlight");
NEI.hide_block("GregsLighting", "floodlightBeam");
NEI.hide_item("GregsLighting", "calciumCarbide");
NEI.hide_item("GregsLighting", "bonemealAndCharcoal");
NEI.hide_item("GregsLighting", "gasNozzle");
}
if (FML.isModLoaded("IronChest")){
NEI.override_block("IronChest", "BlockIronChest", [0, 1, 2, 3, 4, 6]);
}
if (FML.isModLoaded("MorePistons")){
NEI.hide_block("MorePistons", "MorePistonsExtension");
NEI.hide_block("MorePistons", "MorePistonsRod");
}
if (FML.isModLoaded("ProjRed|Illumination")){
NEI.hide_block("ProjRed|Illumination", "projectred.illumination.airousLight");
}
if (FML.isModLoaded("ReactorCraft")){
NEI.hide_block("ReactorCraft", "reactorcraft_block_coriumflowing");
NEI.hide_block("ReactorCraft", "reactorcraft_block_steam");
NEI.hide_block("ReactorCraft", "reactorcraft_block_duct");
NEI.hide_item("ReactorCraft", "reactorcraft_block_line");
}
if (FML.isModLoaded("RotaryCraft")){
NEI.override_item("RotaryCraft", "rotarycraft_item_slide", [0]);
NEI.override_item("RotaryCraft", "rotarycraft_item_strongcoil", [0, 8192, 16384, 30000]);
NEI.hide_item("RotaryCraft", "rotarycraft_block_advancedgear");
NEI.hide_block("RotaryCraft", "rotarycraft_block_flywheel");
NEI.hide_item("RotaryCraft", "rotarycraft_item_debug");
NEI.hide_item("RotaryCraft", "rotarycraft_item_worldedit");
NEI.override_item("RotaryCraft", "rotarycraft_item_extracts", [0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]);
NEI.override_item("RotaryCraft", "rotarycraft_item_modextracts", [0, 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124, 127, 128, 131, 132, 135, 136, 139, 140, 143, 144, 147, 148, 151, 152, 155, 156, 159, 160, 163, 164, 167, 168, 171, 172, 175, 176, 179, 180, 183, 184, 187, 188, 191, 192, 195, 196, 199, 200, 203, 204, 207, 208, 211, 212, 215, 216, 219, 220, 223, 224, 227, 228, 231, 232, 235, 236, 239, 240, 243, 244, 247, 248, 251, 252, 255, 256, 259, 260, 263, 264, 267, 268, 271, 272, 275, 276, 279, 280, 283, 284, 287, 288, 291, 292, 295, 296, 299, 300, 303, 304, 307, 308, 311, 312, 315, 316, 319, 320, 323, 324, 327]);
}
if (FML.isModLoaded("Thaumcraft")){
NEI.hide_block("Thaumcraft", "blockFluxGoo");
NEI.hide_block("Thaumcraft", "blockFluxGas");
NEI.hide_block("Thaumcraft", "blockFluidPure");
NEI.hide_block("Thaumcraft", "blockFluidDeath");
NEI.hide_block("Thaumcraft", "blockArcaneDoor");
NEI.hide_block("Thaumcraft", "blockMagicBox");
NEI.hide_block("Thaumcraft", "blockManaPod");
NEI.hide_block("Thaumcraft", "blockArcaneFurnace");
NEI.hide_block("Thaumcraft", "blockWarded");
NEI.hide_block("Thaumcraft", "blockHole");
NEI.hide_block("Thaumcraft", "blockPortalEldritch");
NEI.hide_item("Thaumcraft", "ItemSpawnerEgg");
}
if (FML.isModLoaded("ThaumicTinkerer")){
NEI.hide_block("ThaumicTinkerer", "infusedFarmland");
NEI.hide_block("ThaumicTinkerer", "gaseousLight");
NEI.hide_block("ThaumicTinkerer", "nitorGas");
NEI.hide_block("ThaumicTinkerer", "infusedGrainBlock");
NEI.hide_block("ThaumicTinkerer", "forcefield");
NEI.hide_block("ThaumicTinkerer", "gaseousShadow");
NEI.hide_block("ThaumicTinkerer", "bedrockPortal");
}
if (FML.isModLoaded("TwilightForest")){
NEI.hide_block("TwilightForest", "tile.TFBossSpawner");
NEI.override_item("TwilightForest", "tile.TFTowerTranslucent", [0, 1, 2, 3, 4, 5, 6, 7]);
NEI.hide_block("TwilightForest", "tile.TFTrophy");
NEI.hide_item("TwilightForest", "item.oreMeter");
NEI.hide_item("TwilightForest", "item.tfspawnegg");
}
if (FML.isModLoaded("animalbikes")){
NEI.hide_item("animalbikes", "pigbike");
NEI.hide_item("animalbikes", "cowbike");
NEI.hide_item("animalbikes", "spiderbike");
NEI.hide_item("animalbikes", "sheepbike");
NEI.hide_item("animalbikes", "chickenbike");
NEI.hide_item("animalbikes", "wolfbike");
NEI.hide_item("animalbikes", "squidbike");
NEI.hide_item("animalbikes", "creeperbike");
NEI.hide_item("animalbikes", "enderbike");
NEI.hide_item("animalbikes", "dragonbike");
NEI.hide_item("animalbikes", "notchbike");
NEI.hide_item("animalbikes", "reindeerbike");
NEI.hide_item("animalbikes", "snowgolembike");
NEI.hide_item("animalbikes", "ghastbike");
NEI.hide_item("animalbikes", "irongolembike");
NEI.hide_item("animalbikes", "bunnybike");
NEI.hide_item("animalbikes", "item.null");
NEI.hide_item("animalbikes", "dinobike");
NEI.hide_item("animalbikes", "chocobobike");
NEI.hide_item("animalbikes", "silverfishbike");
NEI.hide_item("animalbikes", "batbike");
NEI.hide_item("animalbikes", "chinesedragonbike");
NEI.hide_item("animalbikes", "teasd");
NEI.hide_item("animalbikes", "slimebike");
NEI.hide_item("animalbikes", "ocelotbike");
NEI.hide_item("animalbikes", "flowerbike");
NEI.hide_item("animalbikes", "witherbike");
}
if (FML.isModLoaded("appliedenergistics2")){
NEI.hide_block("appliedenergistics2", "tile.BlockCableBus");
NEI.hide_block("appliedenergistics2", "tile.BlockMatrixFrame");
NEI.hide_block("appliedenergistics2", "tile.BlockPaint");
}
if (FML.isModLoaded("ephys.playerproxies")){
NEI.hide_item("ephys.playerproxies", "item.PP_BiomeStorage");
}
if (FML.isModLoaded("fiat_lux")){
NEI.hide_block("fiat_lux", "genericLightBlock");
}
if (FML.isModLoaded("thaumcraftneiplugin")){
NEI.hide_item("thaumcraftneiplugin", "Aspect");
}
if (FML.isModLoaded("xtrablocksdiypowered")){
NEI.hide_block("xtrablocksdiypowered", "BirchDoor");
NEI.hide_block("xtrablocksdiypowered", "ScreenDoor");
}
if (FML.isModLoaded("xreliquary")){
NEI.hide_block("xreliquary", "altar_idle");
NEI.hide_block("xreliquary", "altar");
NEI.hide_block("xreliquary", "apothecary_cauldron");
NEI.hide_item("xreliquary", "apothecary_mortar");
NEI.hide_block("xreliquary", "lilypad");
NEI.hide_block("xreliquary", "wraith_node");
NEI.hide_item("xreliquary", "alkahest_tome");
NEI.hide_item("xreliquary", "angelheart_vial");
NEI.hide_item("xreliquary", "angelic_feather");
NEI.hide_item("xreliquary", "bullet");
NEI.hide_item("xreliquary", "destruction_catalyst");
NEI.hide_item("xreliquary", "emperor_chalice");
NEI.hide_item("xreliquary", "ender_staff");
NEI.hide_item("xreliquary", "glowing_bread");
NEI.hide_item("xreliquary", "glowing_water");
NEI.hide_item("xreliquary", "gun_part");
NEI.hide_item("xreliquary", "handgun");
NEI.hide_item("xreliquary", "harvest_rod");
NEI.hide_item("xreliquary", "heart_pearl");
NEI.hide_item("xreliquary", "heart_zhu");
NEI.hide_item("xreliquary", "hero_medallion");
NEI.hide_item("xreliquary", "holy_hand_grenade");
NEI.hide_item("xreliquary", "infernal_chalice");
NEI.hide_item("xreliquary", "infernal_claws");
NEI.hide_item("xreliquary", "infernal_tear");
NEI.hide_item("xreliquary", "kraken_shell");
NEI.hide_item("xreliquary", "magazine");
NEI.hide_item("xreliquary", "magicbane");
NEI.hide_item("xreliquary", "mercy_cross");
NEI.hide_item("xreliquary", "midas_touchstone");
NEI.hide_item("xreliquary", "mob_ingredient");
NEI.hide_item("xreliquary", "phoenix_down");
NEI.hide_item("xreliquary", "pyromancer_staff");
NEI.hide_item("xreliquary", "rod_of_lyssa");
NEI.hide_item("xreliquary", "serpent_staff");
NEI.hide_item("xreliquary", "shears_of_winter");
NEI.hide_item("xreliquary", "twilight_cloak");
NEI.hide_item("xreliquary", "void_tear");
NEI.hide_item("xreliquary", "witch_hat");
NEI.hide_item("xreliquary", "witherless_rose");
}
if (FML.isModLoaded("NetherOres")){
NEI.hide_block("NetherOres", "netherOresBlockHellfish");
}
Some items may be too complicated for the default hooks, or the failure to hide them may be due to a bug somewhere in the default hooks.
I think there may actually be a bug in hide_item. If you would add this to your script and use it instead of calling hide_item directly.
Add that to the top of your script and call it in place of hide_item. So for example replace:
with:
If that works to hide them it will prove that there is a bug in hide_item that needs to be resolved. If it does not work... then there is still a bug but it is somewhere deeper.
Thank you for your Quick Replay.
Debug.log is here http://pastebin.com/Rh6iGV5H
Then, tried NEI.hide_item("minecraft:spawn_egg"); and NEI.hide_item("minecraft", "spawn_egg");,
but none was effective.
Next, tried hide_item_custom function, it was effective for vanilla spawn_egg.
So I try it to a thing using other NEI.hide_item/block function.
Yes, that appears to work now in all cases where hide_item failed before. However it doesn't address cases where override_item doesn't work. On a whim I tried doing hide_item_plus followed by override_item with its intended meta keys. No change.
You know, you had really good timing for me, adding this functionality. I had just gotten fed up with being unable to figure out the proper syntax for NEI's bannedItems.cfg and also with how it goes in each world save, rather than in the mod configs. Any chance you're also interested in extending the library's reach to creative tabs, like what ReCreate did in 1.6.4?
I'm also curious if it's possible, or if you plan to make it possible, to act upon groups of items determined by, say, regex. Then, instead of needing to explicitly list all items, you could write to hide_item all items with "spawner" in their unlocalized name, or all items containing "WIP" in their English localized name (checked independently from Minecraft's language setting).
And last, why make different commands to hide items and blocks? If NEI has two different API calls, can't the mod figure out which to use? Is there even any harm with calling both just to be sure?
There are individual commands for items and blocks because there are separate look-ups for them in GameRegistry. Once the object is looked up it is the same API call for both. I could technically try both lookups by making a generic NEI.hide hook. Currently the system will refuse to do anything if the GameRegistry returns null, so there wouldn't really be any harm in having it try both.
I'd have to figure out how to get a list of all registered items. This might require hacking the GameRegistry or parsing the trace log (parsing the log might be the most sane option since I already intercept all logs for filtering anyways). To shed some light on it, the process currently goes like this:
1.) If you call the shorthand version, break the string into params. I.E.: "minecraft:spawn_egg" into "minecraft", "spawn_egg".
2.) Pass the params onto GameRegistry. GameRegistry.findItem("minecraft", "spawn_egg"); gives me the reference I need.
3.) If this is override_item, take the int array param and combine it with the reference to make a List of ItemStacks with the proper metadata.
4.) If this is override_item, pass the list to NEI. If this is hide_item, pass the reference to NEI.
I could probably add hooks for creative tabs. I'm just going to write a little list of hooks to add. Reply with more if I missed one you would use.
1.) Create a creative tab with an icon and name.
2.) Assign an item to a tab.
3.) Remove an item from all tabs.
4.) Look-up what mod tabs exist. (I'll have to figure out how exactly this one would work)
Now that we know that the bug is in hide_item I can fix that part so we don't need a custom function. In my experience override_block seems to work just peachy, so the bug with overriding must be in the item version of the command somewhere.
My testing Bibliocraft script now looks like this: