@Senk-Ju thanks, another thing:
idk if thats a bug or if it is intended but if you .reload or .scriptmanager reload and your script adds creative tabs, it reloads the tabs and adds them but does not clear the old ones.
this does not have any priority of any kind and i dont think this is a major issue but i just wanted to say that bcs idk if it is intended to work that way.
If it is, im sorry ^^
KnechtRobert5
Posts
-
plz help -
plz help #2@Senk-Ju thanks
-
plz help #2Is this the optimal way to check wether a setting was changed while a module is enabled?
This is my example script:/// api_version=2 var script = registerScript({ name: "ExamplePfiff", version: "0.0", authors: ["KnechtRobert5"] }); script.registerModule({ name: "Pfiff", category: "Misc", description: "Does some Pfiff here and there.", settings: { examplesetting: Setting.boolean({ name: "enable", default: true }) } }, function(module) { var wasenabled = false; module.on("enable", function() { if (module.settings.examplesetting.get()) { Chat.print("§aon") wasenabled = true; //module enabled } }); module.on("disable", function() { if (module.settings.examplesetting.get()) { Chat.print("§coff") wasenabled = false; //module disabled } }); module.on("update", function() { if (module.settings.examplesetting.get() && !wasenabled) { Chat.print("§aon") wasenabled = true; //setting enabled } if (!module.settings.examplesetting.get() && wasenabled) { Chat.print("§coff") wasenabled = false; //setting disabled } }); });
The main module here does nothing, only if the setting in it is true / false it loads / unloads code. this script works perfectly for what im trying to do, but is it the optimal way to check for that and does it impact the performance of the game if it checks every tick (while module is enabled) if the setting is true or false? (Sorry if this sounds dumb but im new to this kinda stuff)
If asked for what this is needed, i want to make a clean module which doesent break that easily or in general doesnt break (user friendly) -
plz help@commandblock2 for items e.g. an apple which hasnt a block form, i could just search for apple and find an obfuscated name (?)
(FD: net/minecraft/init/Items/apple net/minecraft/init/Items/field_151034_e
)
which worked and displayed the correct texture but for e.g. a sponge its different idk why but there is no item like structure like that one shown above for that.
ive tried varius different obfuscated names that where found when searching sponge but no one seemed to match, anyway if that issue is fixed sooner or later i can probably live with that because i just need a working tab, icons can be adjusted later on. -
plz help@commandblock2 found most of what i needed by just STRG + F searching for it in the file, sorry to bother you but how do i find blocks as items? searching for it didnt seem to be helpful in this case
-
plz help@superblaubeere27 thanks
edit: i didnt especially want an apple as the icon and i dont want to bother you with giving me every single obfuscated name but is there a way for me to know which item (?) equals which obfuscated name?
-
plz helpwhat do you mean by that?
minecraft:apple gave me the same error but instead of apple it said minecraft:apple in the crash report -
plz helpi have a problem with these Creative Tabs
this is what my script looks like:/// api_version=2 var script = registerScript({ name: “ExamplePfiff“, version: “0.0“, authors: [“KnechtRobert5“] }); script.registerTab({ name: “Pfiff“, icon: “apple“, items: [ Item.create(“wooden_button 1 0“) ] });
my script is much more complicated but the error also occurs when its just this simple version.
if i click on the arrow that leads me to the second section of the creative tabs my game crashes and i get a “java.lang.NoSuchFieldException: apple“
i believe it has to do with the icon?im not that experienced with scripting and coding in general, but i think i did nothing wrong.
if im not dumb this looks almost exactly like the examples that are shown on the liquidbounce.net website.