Support Tickets
This page is still WIP!
check if block exists in the game from id
duck: Is there a way to check if the generated id exists?
copycats from create and copycats from copycats+ don't work the same for changing with kubejs
duck: ```js
Recipe Ingredient that only matches empty component data
amertune: I'm trying to write a custom recipe for FTB Industrial Contraptions that uses a fluid cell. When a fluid cell is empty, there is no component data.
How can I change a curio's slot?
Spookysquid19: I need to make the Ring of Grudged go in the `ring` slot and not the `rings` slot. I've tried the following, but it hasn't worked.
Export & Import / Require helper recipe functions from files
RoarkCats: I occasionally make helper functions for my recipes, however, I've always had problems when trying to separate these to their own files so I could easily import/export them between files- I know I'd have to pass `event` in of course, but is this possible with the way KubeJS is structured and what would the code in each file look like?
Make mobs within radius of player glow
SageofTurtles (ping me): Hello! I'll put the scripts below, but I'm trying to make a script that will cause all mobs/players within 30 blocks of the player to glow. When I try to apply this effect to myself by right-clicking with the item, the chat shows the event firing but I get a server.log error saying:
Player attributes
lx6o: Is there a way to effect player attributes with kubejs
Random chance to apply unique texture to mob
voidmage: I have recently found a really funny texture for cod on planet minecraft (https://www.planetminecraft.com/mob-skin/hot-dog-6220376/), and id like for there to be a really small chance to apply it to a cod mob upon spawning (something like the textures of axolotls). is there a way to do this with kube?
How can I make a custom compass for a structure?
Spookysquid19: I want to make a compass that points the player to the nearest temple in the Deeper and Darker dimension, similar to how the Wayward Compass in Iron's Spells points to the nearest catacombs.
Create custom Tinkers Construct tool parts
The Kamen Rider enthusiast: I tried doing that a few months ago by trying to make tconstruct diamond tools so i could remove the diamond took recipes and replace them with the tinkers tools (although doing so made netherite gear inaccessible)
Make existing block immovable by any means (teleportation, pistons, contraptions etc)
Viktor Shield: Please help
Trying to add custom smithing templates but in crafting not functional.
pop: Trying to add upgrade templates and kubejs returns no errors and allows materials into the crafting, but when trying to craft I get returned with the message 'Item cannot be crafted this way'. I don't think this has to do with mods - maybe theres a tag I'm missing for the smithing templates as they're just read as basic items right now? Help would be appreciated.
Custom loot box items
Krispy: Hello, to clarify, im wanting to make an item that will act as a loot box (assume the item all ready exists and for item ids just use the diamond sword id)
Trying to disable left clicking, right clicking, and crouching tied to a potion effect
Dracus: First time asking for support in here but I've been looking at some of the posts for guidance as I experiment with kubejs for an addon to a mod I've been working on!
Trying to make a fluid that hurts
Vigilante: I've been trying to make a fluid that either damages players on contact like lava does, or if that isn't possible, try to make a fluid that applies a potion effect like harming or wither to get the same result. I haven't been able to find anything online or on the wiki about either option, is it something I'd have to set up in server scripts instead of the fluid builder?
Binding Xaero's WM/MM to an Item (1.21.1 Neoforge)
cani: Yet another thing im clueless about and cant really find useful info. See image.
lock a Create sequenced assembly behind a gamestage
Monsh: .stage(x) only works on vanilla recipes i think.
Can I use kubejs/advjs to remove all advancements?
EEX5: I'm unsure if I can, but if possible, I'd like to remove all achievements with kubejs/advjs I just have no idea how to. If it's impossible, then I'll kist use a mod
creating copies of modded blocks
Po: is there a way to register an identical yet distinct copy of a modded block similar to the entityjs "clone" builder?
Iron's spell script
BEAR: I've been trying to get this script to work. it's purpose is to have a random 30% chance to spawn in the player with-or without mana. the issue is if I set the base mana value to 0 it causes some bugs, I want to just make it so it spawns you without the mana attribute period if you spawn without mana. and I wanted to know if anyone had any expertise in iron's spells kubejs stuff.
How do i modify MultiMine's block damage levels?
Ivy :3: Trying to implement something akin to Factorio's structure health system but per block, and I'd like to use multimine and some form of repair kit item with durability where when you right click the block it decreases how close the block is to breaking by some increment and takes durability away from the item. the durability is easy, but im not sure how to modify how broken a block is.
LootJS and LootModifiers
AcaGamer5: Hello. I've been trying to modify some loot tables today that have been altered through the use of LootModifiers with LootJS, which, for some reason, don't seem to do anything when I use removeLoot and replaceLoot functions.
trying to create a coal into diamond recipe using create mixing
ser puntazza: this is my very first project so I just copied the create mod code and made some adjustments, this recipe is not working can someone explain to me why?
Alchemistry addon
Piña_robótica: I don't know what i'm doing wrong. Here's the code:
Syntax for regex in tag event?
ratemisia!: I would like to add a set of blocks to a tag in ServerEvents.tags using regex. In 1.20.1, I was able to do it this way:
enable swim mode in a dimension
HoneyVee: I'd like to know if its possible to enable swim mode like when you are in water, as a way to enable flying in a dimension, i dont know if anyone has done it before or has any examples i could follow that could allow it
Event handler 'StartupEvents.modifyCreativeTab' requires extra id
TokiPonaEnjoyer: below are my logs and the code causing it
How to check for partial item data component?
SageofTurtles (ping me): Hello everyone! I'm still learning my way around data components, so this is probably really simple to do, but I'm having a hard time finding anything telling me how to do it. I have an block in my modpack that I want to replace with a different block when right-clicked on with an item called a soul catcher. However, I *only* want this to happen if the soul catcher has a blaze in it. I used a command to get the data for the item, which I'll put below. Basically, the only thing I need to check is that the item ID is `create_mob_spawners:soul_catcher`, and that it includes `id: "minecraft:blaze"` within the `entity_data`. How would one go about that using a KubeJS script?
Need Help with FTBQuest Custom Task and Player UUID Error
Ranman: I'm attempting to make a Custom Quest Task to have above an amount of Create: Numismatic Currency in your Bank Account.
replace item in loot randomly with 4 other items lootjs
Salt: im trying to replace or modify all instances of iron helmets in loot tables with a random helmet from a selection of 4 helmet items
Iron's spells & EntityJs (Cast spell level.
ErikolGamer14: Hello! I'm new over here, I'm working on a modpack and I have some question about the EntityJS compatibility that has with Iron's spellbooks, I was able to get a boss too cast spells but all of them level 1, is there a way to increase the level for the casted spells??
Removing crafting remainders from a custom recipe?
DawnAndTheStars: I have made several recipes in KubeJS that use water bottles and milk bottles. Some of these recipes are for crates, in those cases I do not want the empty glass bottles to return to the crafting table. How can I override this behavior.
Recipes with Durability Restrictions.
Cryptic: I am trying to edit a recipe within 1.20.1 fabric,
How do I make an existing modded tool unbreakable? I've tried .uses, .maxDamage, neither worked.
PrototypeShadowBlitz β§: I want to make a set of tools unbreakable for a modpack I am making, truly unbreakable. Is there a way to modify the tool to make it no longer take durability damage, or just have infinite durability or something?
A liquid in a mod doesn't show up in the item's information when using /kjs hand.
PrototypeShadowBlitz β§: Is there a way I can fix this myself or do I need to wait for the mod author to fix this? Is this considered a bug on their end? Never ran into an issue like this.
How do I make an enchantment compatible with an existing item
Rex: I'm using the clockwork mod, and they either removed enchantment support for their crossbows, or it somehow broke. Is there a way to make them enchantable again?
Is there a way to give a specific item an enchantment without glint?
Lucky: Trying to give some items some default features that are locked behind enchantments that really shouldn't be
Detecting a block at a specified location relative to the player.
legobrick22: Is something like this possible? I'd like a script to return true if a specific block is at a predefined location relative to the player.
Hi, I'm building a 1.20.1 Forge modpack (528+ mods) and need help with a KubeJS script.
PepeTheGrimReaper: **The Problem:**
staff creation not working
Dracoruff1211: ```StartupEvents.registry('item', event => {
item being repairable in anvil by a single item
Anonymous: is there any way so any item can be repaired by a single item through kubejs
Trying to hide itens in jei by custom data
Diju: I'm trying to remove some specifcs guns from TacZ, but they all have the same name, so I tried by the custom data, but it's not working, the client.log doesn't give any error
Game Crash Removal of item help please!
Gummy Bear: need help removing an item with code that'se causing the game to crash well multiple items I have no idea how to code btw
Custom Create Mod Recipe Please Help
Gummy Bear: I need a gold and netherite scrap recipe to make netherite thats easy and cheap custom made
my foreachrecipe script doesn`t work properly
MeeM: i watched guide from gnomebot and google search to make this script but only shows null/undefined
Can't find function .textureAll
samm: Hi, I couldn't open the logs file for some reason. Here's a screenshot of what I saw upon launch
im having issues with adding more than one effect onto a food item
Mosca: The script works perfectly fine when add a single effect but when i add multiple effects it just adds the effect but twice which im unsure how to fix
Get blocks in an area
Owen: how would i get all blocks in an area around the player? for example, `let tarBlocks = entity.level.getBoundingBox().inflate(range).block.filter(block => whitelist.includes(block.id))`
fluid instantly going out of bucket and into world once obtained
Zote(3): ```ItemEvents.entityInteracted('minecraft:bucket', event => {
Glass pane block type through block registry
Tanker: Is there a way to add a custom block with KubeJS that uses the glass pane block type? Been looking through the wiki for a bit trying to find a solution to this but I'm no longer sure if this is actually possible since glass panes aren't listed in the list of alternate block builders.
Invalid Quantifier for Regex
Ben: I'm getting invalid quantifier error * for this script, I've tried with the other negative lookahead/lookbehind ```?<!``` and ```?!``` but they give the same error but for ?
Snowlike layer block
Mellowitsch: Is it possible to create a block that works like snow? So for example i have a block that looks like dirt and i can place this like snow (layer over layer)
gregtech machine syntax help
TheNimbleNinja: im looking for help finding out how to do specific machine stuff like the metal molding. it usies the alloy smelter but i dont know its syntax to use it
Is it possible to automatically load datapacks from a folder upon world creation?
Mushroom: So that you don't have to open a folder every time you wanna create a world with the same datapacks.
Custom rock block model
Lachry-mosa-D: I've been trying to make a block with a custom rock model, but I have not yet found out how to use .model(value: ID). Can someone explain how to because there is no tutorials for this and the wiki is no help with this :p
Custom Trial Vaults
NASisawesome10: I noticed that there are seemingly no posts talking about making custom trial spawners or vaults?
Is it possible to detect when a player hovers over an item with another item and right clicks?
WiiSafetyManual: There is an event `PlayerEvents.inventoryChanged` but I'm not sure exactly how to use it to do whatever you want here.
detect if player is in water and or swimming
naik: is there an event to do this? i wanna make it so that the player eventually gets freezing if they swim for too long without armor (maybe change the time until u freeze with each tier but i wanna figure that out on my own)
Having trouble with ItemEvents.modifyTooltips for Durability Tooltip
Waris Kung: Hi everyone! I'm trying to make a script that adds a custom durability tooltip to all damageable items. However, my current code isn't working
Speed up suspicious block brushing
RoarkCats: Is it possible to speed up suspicious block brushing from somehow for tiered brushes?
Create a Crop
SuCr1lh0sγ: Can someone help me create a simple crop for my world? I'm a beginner and I can't find anywhere that teaches how, and I don't want to use AI.
Play sound periodically while wearing specific item(s)
Anonymous: Hey there! I was going to try reading up on the wiki to figure it out myself, but since it's down, I might as well ask.
Tough As Nails
Lilo: Hey, good morning, does anyone know where to find the commands to edit things in the Tough As Nails mod using kubejs?
Modifying Existing Projectile Spells Provided by Iron's Spells and Spellbooks (and addon mods)
Io: I'm using the startup kubejs script attached to apply a potion effect to a spell that otherwise did not have such a function. I used EntityJS to apply the effect on the "elemental_synergies:brimflame_bolt" projectile entity. However, using the same code for the "elemental_synergies:brimstone_hellblast" did not result in applying the effect on hit entities.
Curios Slot Get/Set
Owen: how would i "get" an item in a curios slot, without using the kubejs-curios mod (dont want loads of dependencies). similar to `entity.getItemBySlot()` but for curios slots
Having trouble with tier.incorrectBlocksForDropsTag
Darkus: So I have given a modded pickaxe a tool tier that allows for breaking obsidian but not ancient debris... But for some reason it can break ancient debris. here's a toll modification that I used:
Im trying to import my code into datapacks but it keeps denying it, why?
The_Good_Guy: Message not found
how to make a block not place on another
Anonymous: im trying to make a new sapling for my pack but it keeps being placed on blocks i dont want it to i tryed makeing a start up script were it tryed to diable the right click on other blocks but it will places
New redstone stuff/block tinting
Anonymous: How do I add a new redstone block and also how to add biome tints to greyscale blocks
How to make blocks flammable?
Xmapka: `.soundType` does not copy this property
Curios rendering
Captn138: Hello, so I wanted to have the Create Aeronautics' aviator's goggles as a curios for the head slot, just like the Create's engineer's goggles.
My Shaped recipe isnt working and Idk why
DemonyoTV: ```//onEvent('recipes', event => {
Kube js doors/trapdoors
Anonymous: I need help adding new door types/trapdoors to my modpack im useing kube js for pretty much most of it
registering a bed with a custom model (STILL NEED HELP!!!!)
Alterated: im having trouble registering a bed with kubejs, got this from a friend:
leave block block tint
Anonymous: i need help meking my new leaves have biome tints but also have the apple texture on them i been struggleing even getting the tint to work idk if im doing something wronge or not
custom spells
βοΈ»β¦θ«≡ππ²π·π°ππ±πͺπ·π½πΈπΆββ-β: im trying to create a spell, i managed to make a school but i cant figure out how to make the spell particle effects, make the spell damage entity, icon, name, and a texture, but i did make the spell appear in game but thats abt it and the wiki doesn't really help much, and i cant find any tutorials videos, so can someone help me with this
Modifying a modded recipe
corvus: I just wanted to run this by people with more experience than me. I'm modifying a recipe for food in a minecraft server and I don't wanna mess something up.
item crafting with any food item
duck: this is a weird combo of old and new code
Better Than Wolves Squid
kimaris: I'm wondering if there's a way to make squids behave like in BTW using EntityJS (Forge 1.20.1).
Changing Enchantment Values
Nitai: Hey, Can anyone point me out to an example or something that let me change values of protection effects?
Adding custom enchanted fishing rod trade to villager?
ZonkoTheGreat: I am trying to make it so level 2 Fisherman only sell level 1 Lure enchanted fishing rods, this is my first example I am trying to make work. How do I fix the item registry?
I want to make the alexsmobs vulture and swordfish into living variants that spawn in the world
Not LumpyAcidFish: how would I go about doing that. Giving them neutral AI and spawning in the overworld.
Removing Potion Recipe
Zanguuz: I'm using MoreJS to remove a potion effect I don't like for my modded server, and I can't figure it out.
Everlasting
Krispy: Is there a way to make an item indestructible to the void, lava, cacti, and anything else that might destroy something?
How to take the functionality from a modded item and give it to another?
Bruno: title
raycast
WavyShark: I'm trying to understand raycasting, and add it to my script. I'm wanting it to turn whatever block I'm looking at to air, but it's just not working. Can someone help me out here?
Create a Timer
Lilo: Hey, good morning, does anyone know how to create a timer? Or a delay to be more exact?
Kubejs Error during loading.
Fers: Every time the game is loaded the following error appears on the logs, it does not crash the game but it is there
Is it possible to remove enchants from the game using KubeJS?
UltraPlaysETC: essentially the title explains it, but more indepth, I want to remove specific enchantments for my server (like power, infinity, etc), is there a way to remove them so it cant be used? or what would be the best method to prevent players getting them?
Armor set with an Active Ability
frank mayonnaise: So what I’m looking to do is essentially if a player is wearing a certain set of armour, they can press a keybind to activate some sort of ability, (ex granting a player a potion effect). Optionally it would also be neat if it could consume and require mana from Irons Spellbooks as well if that’s possible
unlock a recipe via quest
harrison: hello i mean the tital says alot but basicaly all i need is a way to unlocka locked reicpie with a quest i have had a looka round and cant really figure out a way to do it is there a way i can ? (Ftb quests)
Is it possible to summon blue wither skulls?
minari: They're tied to the entity's NBT in Vanilla, so /summon cant spawn them, but I was wondering if KubeJS can?
Bug Create: Protection Pixel KubeJS
Meiseside: KubeRecipe.java#90: Failed to create custom recipe from json {"type":"create:filling","ingredients":[{"item":"protection_pixel:incompletehammer"},{"type":"fluid_stack","amount":250,"fluid":"minecraft:lava"}],"results":[{"id":"protection_pixel:incompletehammer"}]}: Failed to read required component 'ingredients: either<create:sized_fluid_ingredient, ingredient>[]' - java.lang.IllegalStateException: Failed to parse either. First: Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Second: Failed to parse either. First: Not a json array: {"type":"fluid_stack","amount":250,"fluid":"minecraft:lava"}; Second: Unknown registry key in ResourceKey[minecraft:root / neoforge:ingredient_serializer]: minecraft:fluid_stack
Is it possible to modify multiple model json files with kubejs?
titin: I'm using the butchery mod in my modpack and the render scale for some of the items (the carcasses) is too big. Is it possible to make a script that can modify the json files for the models? I've gone and manually modified a few of the items, but there are a lot of them and it would be much nicer to have a script rather than having to go through and manually modify each file individually.
is it possible to create a block that emits a redstone signal?
ducky: I want to create a block that emits a redstone signal constantly. Is is possible? I did not find anything in the blockbuilder wiki.