Support Tickets
This page is still WIP!
trying to make a code to stop hostile mobs from spawning.
Raw Master: im sure something in the grammar here is wrong, i just don't know what to use.
How to get world's difficulty
Puff: I want to know how to get it, because i need to make system that makes certain recipes on peaceful difficulty
Make the minecraft:sculk_shrieker always be able to summon warden
Obstinate: Hi there. I was looking for a script to make the shrieker always have the "can_summon" data to be true. I tried something simple and it didnt work, can someone help me please?
how to make a block look like a vanilla block?
800020h: there is <https://kubejs.com/wiki/ref/BlockBuilder#model>, but I can't see one for blockstates
Attribute modifications don't work on specific modded armors and or parts of armors
marcnum2: I'm having a recurring issue where sometimes the leggings of armors won't be able to accept added attributes, sometimes an entire armor set doesn't make an adjustment either, like in this example. They have the same script, but the exoskeleton doesn't get changed (even the armor). I used /kubejs hand to ensure I had the correct name.
Handling NBT in recipes (weakNBT, strongNBT and ignoreNBT)
TGMM: I'm trying to have some recipes that partially match on NBT, and some that ignore it altogether. I've noticed through trial and error that the default behavior seems to be the equivalent of `strongNBT` where it will only match an item that has all of the specified NBT tags and nothing less.
Custom Ore Gen
TJ: Hi, can someone help me understand how to create ore gen using KubeJS? I'm using Minecraft 1.20.1.
listen for mod event
ava (she/they): looking to use the recipe addon for gamestages, i want to listen for the "stage added" event from gamestages and add a recipe if the event is fired.
bulk item replace for recipes from one mod?
Nyx: ie i want all ae2 recipes to use silver instead of iron but i dont know where to find out how to do that this is for a 1.21.1 neoforge pack
Simple script to change display name of item
Sigurd: Been trying everything but can't seem to change any item's name. I have two different silvers so I'm changing one into Stersilver but it won't work
tell the game to skip even loading certain items during boot
Caelan & Snow: I'm working on a modpack, and I've nearly finished, at this point I've written something like 60 thousand recipes, and I've put a hell of a lot of work into making sure this can run on 'lower' end devices, and the biggest issue my lower-end testers are facing when running the pack is during the phase when jei loads in every item, and when it stitches the texture atlas for every item in the game, and as I'm looking back, i notice a lot of extrenuous materials which no longer serve any purpose, and I want the game to just not load them in the first place
Tooltip based on Stage
Loc: Trying to create a tooltip that changes based on whether the player has a certain stage or not
can someone add chances in here so it doesnt give you all 3 potions everytime in every chest? I cant
Dexxas (Ichigo) Valentine: just keep the chances high enough for me to be able to test if it works or not quickly enough
/heal command
Wyvernity: I want to add a heal command instead of adding a whole mod for it. For example, `/heal @s 6` would simply heal the executor for 3 hearts of health. I don't wanna use the instant health effect because it is not precisely adjustable.
low randomChance value
mr_ron: how would i ensure an item has a 1 in 10k chance of resulting from a loot_table?
KubeRecipe.java#88: Failed to parse recipe ....
Maybe: I get 21 errors for mods that have broken recipes.
Texture isn't loading
PilotKhaotic: I am currently using kubejs to make custom items for a modpack I'm working on and I have tried everything I can yet the texture won't load and I don't know what to do now
Ironspells JS: Alchemist Cauldron recipes don't work
Fruitsnack: I've looked at a similar post and I tried what was suggested there but it wasn't working either.
is there a way to change smithing table armor requirements?
SYZO: for example instead of needing diamond to upgrade to netherite you would need to use modded armor inside the smithing table, if thats possible i would really glad if someone were to tell me a guide about it
State condition to Create smoking/blasting
Henka: I have a block that can be lit or unlit and I would like to make this block usable for smoking recipes when lit only. Exactly as with the campfire.
Trying to make an advanced combat goal
Andrezinh0: I'm trying to create a custom goal for a mob that can behave intelligently and use multiple types of attacks and tools, including:
Optimisation
filipsbrahh: im making a modpack and i got like 1000 lines of code, it started runnning really crappy so any tips on optimising it? im sure it comes because of KubeJS, and yes almost every line is a new block i know im fixing that but if yall got any other tips it would be much appreciated.
are there any events for a chunk loading?
Raw Master: i want to make it so there is a random chance to run a command every time a new chunk is generated in a certain dimension.
KubeJS Version Mismatch - 1.20.1
Auz: Hello! I am trying to set up a server for my friends to join, and one of the mods being used is KubeJS version 2001.6.5-build.16.jar. We have tried everything in these support threads and unfortunately nothing has worked. What's strange is the KubeJS script folders have everything server side, but the client side KubeJS folders are completely empty. We've tried copying and pasting into their client side startup folders but that hasnt worked either. Should we try a more dated version of KubeJS?
Hi. How can i make logs require axe to collect
> LIMI: ServerEvents.tags('block', event => {
LootJS Fire Resistance potion chest loot tables not working
Dexxas (Ichigo) Valentine: why is this not working?
Can you access tags from startup scripts?
Jordan: I'm trying to make a script that makes logs require an axe to break it.
Changing the tool mining tier in the big 1.21.1
UltraGamerJay: I tried to make the copper pickaxe backport mod to be changed from stone tier to iron, i've tried 2 different methods and neither seemed to work, not in startup scripts or server scripts
Listing events
Jmynii: I know with kubejs you can fire events when specific events fire, is there a way I can list all the different events, including ones from mods?
Aspects similar to Thaumcraft
Qtqbss: Is it possible to create smth like aspects from thaumcraft with kubejs? If it is, then what is it exactly - an attribute, effect?
Prevent Ice N Fire Dragons spawning on the nether roof
Mango~: I'm working on a Modpack where fire dragons are configurated to spawn only in the Nether, but im having trouble with the smaller dragons only spawning on the nether roof. Can I disable/prevent this with KubeJs? Ive never changed Y-levels with kube js, and ice and fire is a little bit fickle abt spawning dragons in with their structures.
can anyone help me?
AwareFreak_97: i need help to fix conflickts on my modpack. sorry is verry lage
KubeJs crashing minecraft when loading
Elman: Whenever i try to open minecraft with the modpack The immersive revolution: rebirth with a few extr mods by me, it gives this error.
Player Movement
vastlyis_saved: Before i try this via datapack, just wanted to know if its possible to manipulate player movement via KubeJS through addon or base mod
Excessive bars
Sฬทอ ฬง_ฬทอกฬจgฬถอฬขaฬทออขmฬถาฬกeฬดอ ฬกzฬดอ: Is there code to hide bars from a mod that would force it?
Cancel Eat Food
Satsu The Vladat: How can I cancel the Eat Food event?
How do you edit armor attributes
pipobutter: i want to make the electrum armor from oreganized faster by 15 percent but within the wiki there is no documentation for armor
A Few Questions about Enchantments
Henry (Ping if not present!): After playtesting my modpack last night, I... realized some enchantments were way overtuned, aaaand I have some ideas of my own
Block removed event??? (NeoForge 1.21.1)
kito1z: I need to handle block removal from the world, including explosions, player breaks, and any other way a block can be removed. I tried using `BlockEvents.broken`, but it only handles player breaks.
Need Script to -atk Attribute From Mobs
MysticWubs: Just to preface, I have 0% coding ability.
Getting Tick Time Since World Start
ClassicDagger: Hello, I'm looking to get the same tick time of the world that you see when you use the command "/time query ticks", I've looked through other's code and saw online you can do this by getting the .time of the level, but it results in a different number than the Minecraft command. I'm curios how you can get the same tick amount shown by the command, and what the code below is giving me if it's less than the ticks printed by "/time query ticks".
Get players keyboard characters when pressed
Jaofumi: is there a way to get the inputs like when the player is typing is chat so i can get if the letter is uppercased or lowercase and get characters that share spots on the keyboard like @ and 2
API question for block-breaking
Ashudene: So, I'm trying to figure out how to customize block hardness for Spore. [Mcreator](<https://mcreator.net/wiki/list-hardness-values-blocks>) and the [Minecraft Wiki](<https://minecraft.wiki/w/Breaking#Blocks_by_hardness>) have agreeable lists of Hardness values, but the [kubejs wiki](<https://kubejs.com/wiki/ref/MutableBlock>) for altering blocks has two qualities, `destroySpeed` and `explosionresistance`, neither of which are `hardness`. All properties within are marked WIP. Is this feature even enabled? Which is which is which? Am I blind?
is it possible to change the amount of an item inside the "or filter"
ALPHA WARHEAD: the title basically
Custom Crop Textures
LemonLime: Do custom crop textures not work in another name space thats not the kubejs/textures/blocks?
Removing Specific Items from every loot table in an efficient manner
AcaGamer5: I've been working on a modpack and found a few items to not fit into the gameplay loop too well or are duplicates. My main issue is that they generate in chests and such, so I was wondering if it could be possible to have a kubejs script get a list of all the loot tables from the game and then print them out either in the logs or in an external text file, so I could copy them to my loot remover script.
How can i change the attack speed of a tool?
XEloteX: If i wanted to change the attack speed of the iron sword how could i do it? I've tried this but it's not working
Make new friend
Skemech or something: How would I go about having a script that makes it so that right clicking on any mob with chains removes their Ai, essentially "chaining them down"
Shield blocking animation
emihead: Hi I'm trying to make some custom shields but I can't figure out any way to give them the blocking animation. I'm using createCustom so normal item builder methods like useAnimation don't work (at least not in my experience).
KJS Mek Slurry
Lexi: So, I've been attempting to register slurries for crimson iron and azure silver (silentgear ores). KJS Mekanism was my first thought. This is what I tried first:
I need help with entityJS
๐๐ฅ๐จ๐ฎ๐โ: I want to modify an entity, for example, minecraft: zombie, and have it have as a second ability to make a scream and push all the players that are within a radius of ten blocks backwards, but the truth is I'm a bit lost with the wiki ๐
Trying to replace diamonds in loot
SeparateBeast68: Im trying to replace diamonds in loot with 1-9 rough diamond shards, and i only have figured out how to have one shard
How to host a server with this modpack(chicken block)
JATIN RANA: i am trying to host a server on my pc and strugling with this a bit can someone please help me.
[Question]Any ways to make createdelight:ethylene_fluid a fuel that can be used in engines?
Akira_foli: As the topic goes,i wanna know how to use kubeJS to edit the definition of the things in create to make createdelight:ethylene_fluid a fuel that can be used in engines
Sound not working
Night: I'm trying to use the right harvest click code present in the <#1048591172165189632> but the sound doesn't play when right clicking on a grown crop, I tried to modify it to make it work but nothing works, how can I fix the code sound?
PonderJS fire animation is gone
snowydevo: I tried to make a ponder, everything works, but the fire block has no animation. Is there a way to fix this? Or did I somehow accidentally disable it?
How to get started with commands?
TheAwesomeLord1: Im working on a server currently and i need to run a certain command automatically. From rummaging through the wiki i think the best way to un them would be through the PlayerEvents.loggedIn event, and the commands i would want to do are /setringtime @s 10000 and /setnoringtime @s 1, as i can't run them automatically through ftbquests after a certain quest completion. i haven't been able to find anything substantial on the wiki yet and any help would be great (if possible).
Block oxidizing into different blocks based on dimension
DANMATISK: I want this block to oxidize like copper but it becomes a different oxidized block depending on the dimension
entities understanding issues
BRANDX: i'm having issue understanding entities and how they work, i cant even create an entity while im watching a tutorial everything just doesnt make any sense and so complicated, i've spent a week trying to understand it by watching tutorials, reading documentries, reading codded mods on github but still feels so complicated, if anyone wants to reach out to me and help me understand it i will really really appreciate it, voice or not, DM me if you would like to help.
Combining Mana Systems
CorneredCube: I want to combine the mana systems of rpg style more weapons, iter rpg and iron spells and spellbooks. Is there a way I could do this? Im a little confused on the capabilities of kubejs still.
Client script not working
SK: Hello, I am trying to get this client script to work but Its not working i found it on the wiki and I want to use it to display messages on JEI. Here is the script and log:
Default crop builder issues with making a nether wart clone.
Planemaster3000: I'm currently trying to make a Nether Wart clone, but there's immediately some issues that stand out.
KubeJS ISS
zoup: Is there a guide for normies like myself on how to create new spells/schools for iss, I know the wiki has alot of info but for someone who has never tampered with this stuff it doesn't make sense, So was wondering if there is a guide out there that will inform how to utilize
ScheduleInTicks
Pakaru: Why does ScheduleInTicks repeat the command? Any alternative way to delay executing command without repeating it?
How to Raycast and trigger looking at entity
Jmynii: Hello! I want to make a script that detects if the player is looking at an entity (far away or close), how can i do this?
Common modules for server and client scripts
k8s_enjoyer: How can I reuse code made for both server and client scripts?
What is the AltBuilderKey for creating a block that rotates the way logs rotate?
Caelan & Snow: everything is in the title, this should hopefully be a quick one
"minecraft" namespace completely skipped over in both assets and data folders
a.j.: I don't know if I'm doing something wrong but every time I try to add files into the `minecraft` namespace it gets completely skipped over. Every one of these folders is loaded by KubeJS except for the `minecraft` one. I loaded the assets through a proper resource pack so I know there's nothing wrong with the files or the folder structure itself. I looked through the log both after a `/reload` and a F3+T and nothing seems out of the ordinary. It's as if the `minecraft` folders do not exist. Am I doing something wrong or is this a bug?
Custom Tier Methods
Emre: I managed to find custom tier values on another ticket but I couldn't find methods for actually create'ing the items. Registry uses stuff like attackDamageBaseline that no longer seems to work as intended even if it loads with no problem.
Adding item durability and using durability on right click
MIRV: I'm trying to add durability to an item which seems to not be working and along with that i'm trying to make the durability get used up when right clicked. The code is attached and it is in the startup scripts folder.
Increase output of existing recipe?
butteredcoffee: hey guys! Any easy way to just increase the items outputed by a recipe? I tried replaceOutput but it cant change the item count for some reason
Making modded recipes unlockable after meeting requirements
Weaver: I'm working on an RPG Server with mods. the limitedcrafting gamerule only affects vanilla crafting stations and doesnt work on modded crafting like Farmer's Delight's cooking pot etc (and I've been told is kind of broken now anyway as the vanilla Autocrafter ignores it)
How to unhide items in JEI
D.A.V.E.: Hey I have a general question about JEI. by default create hides it's old Shadow steel item/casing is there a way to unhide it?
How would I disable players using shields when they have certain items in their main hand?
OtaPic: New to kubejs, but from the wiki I can somewhat grasp how I would go about this. I think a solution would be to add #two_handed to items that players can't use shields with and just let the event check for the tag instead of individual items. What I don't know is what the code would be to let me do basically:
Removing Blocks From World Gen 1.21.1
JoshWP: How can I using KubeJS (I think it is possible, maybe I need another mod), to disable/swap blocks spawning? So I don't get 7 types of the same block when playing modded haha.
Unify, replace all honey into 1 cutstom and modded honey
Stonurd: Hi, I'm trying to replace all the honey in my modpack (not only this fluid) by my honey in recipe input, also output. I tried a lot of way and... nothing change. My honey doesn't have tag, I did added the forge honey tag but... my honey is not being added in the automated recipe.
Create contraption speed limit
Eqis: I want to make a limitation on the rotation speed of rotating contraptions in create, how and is it possible to do this at all?
How to take an item from a string
Reabstraction: I need to take an item as an input
Replacing an icon
CelyanRbx: How to replace the texture of icons with those from 1.21.1? please
Recipe using Ars Nouveau NBTData
๐๐ช๐ฝ๐ฝ๐ฒ๐ถ๐พ๐ผ๐ผ: I'm currently trying to make a recipe for creative source jar... a new sourcejar with 0% source would be too easy to gather.. so i need help with the nbtdata and what to put into the code
How can I modify the player head block so it doesn't get destroyed/replaced by fluids
Zetadrayzer: I'm looking for a way to make the player head block sustain fluids/liquids in other words lava & water, in vanilla water/lava replaces/destroys the player head and it becomes the item version (just like when you have redstone in water) how can I prevent this?
Biome Tracker doesnt work and keeps detecting a new biome.
Jmynii: Im trying to make a biome tracker that tracks what specific biomes you have visited and how many you have visited in total.
Playing music while a player has an effect?
the crumb: Would there be any way to have certain music/sound play while the player is under a certain effect?
Removing recipe ids
CostlierSquid: Hello, so I'm trying to remove the recipe id from an entire part of a mod, which is miners delight. Moreover, I wanted to just remove all recipes that were made/created from the use of the copper cooking pot. I have made a script that should work, but for some reason, the recipes still appear present in JEI/EMI. Any thoughts as to why this might be?
trying to have my script run based off when a /trigger command is used, is there a way to do this?
jijop9: // Re-enable the trigger for the player whenever they use /trigger statpenalty_trigger
how can i have events loop?
Raw Master: I think this only runs the command once on server load? I would like it to loop every so often.
GeckoJS Weapon rendering like a block
Henry (Ping if not present!): Is there something I'm missing for this gecko stuff, because no matter what i do, this weapon always renders like it's a block and it's a little frustrating-
Canceling Item Swap animation on stack change / PowerfulJS
MelodicCougar7: I have a script that edits the nbt of an item every tick to decrement its energy. Is there a way to prevent the item from being affected by the item swap animation?
Video Player on Event
snowydevo: Is there a possibility to play a media or video in fullscreen, or interact with WATERMeDIA through KubeJS? I'm trying to play a video that celebrates a major milestone in the game + custom-made music for such milestone.
Mobs armor drop chance
Just_Dude.It: I'm trying to make it so that mobs don't drop their armor. Trying to make it through the change their nbt.
Failed to save fluid texture
D.A.V.E.: I'm not sure what this problem is but i can't seem to be able to make a fluid on 1.21 neoforge no matter what method i use i just get this error here's the code:
Blocking a recipe until something has been done
Pigfection: Gamestages is not available for fabric 1.20.1 and im wondering if i can do something similar with it in Kubejs (e.g. give whoever kills the wither a recipe for netherite and block it until then)
Creating recipes for a custom multiblock without a UI
Caelan & Snow: So, as the title said, I'm working on a custom multiblock structure for my modpack using multiblocked2, it's in the images, it's called the glass kiln and the way i want it to work is that you open the door on the front (which dissassembles the structure) and fill the inside with glass, then you close the door, put power/heat into the copper coil inside (see the copper input) and 'hot air' (from TFMG) in through the steel input on the back, and I want it to pressurize with air and then slowly heat up, and then once it's hot enough it will turn the glass blocks into molten tempered glass (from tinkers' thinking) and then you can open it up and remove and then cast the glass, but I've never made a custom multiblock before, and in the multiblocked2 discord they said I could create the recipe system with kubejs and I'm just looking for some advice/help on how to do that.