Support Tickets
This page is still WIP!
KubeJS, when paired with DH, Iris, and Sodium, causes the fog of distant chunks to be black.
Pyrolyzed: Heyo, so when I use DH, Iris, and Sodium, it's fine, but when I add KubeJS (the latest build or 348), it breaks the distant fog when shaders are disabled.
is there any way to run an event when an entity is unloaded
asof: i want to ensure only one entity exists for each entry at a time, so doing something when an entity is about to be unloaded (e.g. remove it, add to persistent data to use later) would be very useful.
Is there any way to stop/remove mob goals without making the mob's behavior weird?
Andrezinh0: I'm trying to make mobs alternate between their MeleeAttack/RangedCrossbowAttack goals and an EAIAvoidTargetGoal from the enhancedAI mod
proper loot_table inclusion/exclusion
mr_ron: how are we supposed to be adding or removing items so the show or don't show as being part of a loot_table or removed from it?..
Armor Attributes
nox (Canary v1.81.4): How do I add attributes to armour? I currently have
Updating block's entitydata
U.N. Jiang was Them?: I wanna update a block's entitydata to track items stored inside it as a number. I can't really find a solid answer on here about how to add a simple +1 to the initial blockdata after a blockevent.rightclick. I'm completely in the dark on this so any help would suffice
Custom Aether Gloves for 1.21
NASisawesome10: I'm trying to get custom gloves to work from the Aether mod, but the model texture does not render.
Healing an entity on spawn
MrNubCake: So the last part of my code below "Biomancy:size 2" im trying to heal the entity, as it still keeps its base health before the biomancy size works.
Summoning a Block Display, tilde coordinates not working properly.
legobrick22: This is part of a script that is supposed to summon a block display copy of a raycasted block. However, it spawns it offset 0.5 blocks in every direction, no matter what modifiers I add to the tildes. Is there any way to solve this?
Adding items with custom data to creative tabs and modifying tacz recipes
Orpheus: In the modpack I am making, I want to move all of the items added by the Tacz gunpack create armorer into a single creative tab. Unfortunately for me, Tacz guns aren't registered as items, but instead versions of a base item that have custom data from which they get their model and attributes. if I try to add these items to a creative tab kubejs won't recognise it as an item, and I suspect trying to modify the recipie will have a similar result. Does anyone have any ideas as to how to resolve this?
Detecting and removing broken recipes
PseudoSquared: I'm playing with Pam's HC 2, the updated version where the content is spread out across 4 mods, and I want to remove all the recipes that include any items from the Fruit Trees mod since they're missing and I just don't want to play with the trees. How can I detect and remove the recipes with these missing items?
is there a way to check if an item exists?
colby (pls ping): im using scripts to make multiblock versions of existing machines, and i learned one of those recipes references an item that doesnt exist.
Is it possible to manipulate soundtrack using KubeJS?
Sacri Pan (ping me please): I'd love to play hand selected custom music for each biomes, or fighting each boss, etc...
Removing recipes with missing item tags
PseudoSquared: I am trying to remove all the recipes from Pam's Harvest Craft 2 Food Extended that involves anything from the Trees mod, but cannot find an effective way to do so. I figure it would be easy enough to see what recipes have missing item tags and remove them, but I just don't know how to do that
Forcing modded enchantments to be incompatible with eachother
Cat: You read the title, I'm making enchancement enchantments incompatible with eachother on my silly little configed modpack and I needs helps
Quick little AnimationJs question
Kaleido: So im tryna make a guard/block system with kubejs where the player has a posture system and can guard physical attacks for as much posture they have. I made an animation with geckolib, and im very confused to as to how i can have the kubejs file play animations. I just want the animation to play somehow through kubejs and im kinda lost. Anyone know how?
Swap item drop with another item, WITHOUT use of loot tables
Atom Sorcerer: This is going to be a very specific problem.
How do i make mobs dual wield or spawn with a shield?
☩ Hiruka ☩ - ひるか DEV: I wanna that mobs spawns with two daggers when they spawns with a dagger from spartan weaponry, or if they spawn with a sword they spawn with a shield as well
Repeat item in creative inventory
ikea_shark: Is there a way to put repeat entries of an item in a custom creative inventory tab, for example to act as a spacer to keep different wood types on different lines as the stained glass does in this image? Ideally I'd want to reuse the same item to keep it neat (ie all light gray stained glass).
Custom FTB + KubeJS quest
GMO Bee: Hello, im quite new to he kubeJS and was going to use to for custom quest in FTB quests, To be more precise I want to make a kill entity quest, which will track entity type ofcourse, but also must check what type of weapon player uses + distance the kill wa made, as this quest is done for firearms.
Textures applying with Kubjs error
NanChik: Kubejs doesn't want to load textures for item from any folder except block and item
Somewhat custom recipe type
EEX5: Basically I’m trying to make a custom event where if the player has a certain item in their main hand and another item in their off hand and then right clicks, the items used get deleted and the player is given a resultant item, probably with a sound and particle effect. Im quite unsure where to start so if someone could help put me in the right direction that would be nice.
How can i use kubejs with the create addon Dragon's Plus for bulk stuff
CommandJohn: I want to make a recipe with the bulk ending from create dragon's plus addon but i dont see any documentation about it in the wiki
KubeJS specific accessor for PlayerEvents.chat?
Billy Batts: In KubeJS 2101.7.2 for NeoForge 1.21.1, what's the cleanest way from a PlayerEvents.chat handler to read:
Kubejs error only on first load of server script
the_walk.: Very Weird Issue, On initial load into a world, Kubejs throws this error ```[18:31:13] [ERROR] ! server_scripts:heatedrecipes.js#6: Failed to create a 'create:pressing' recipe from args [kubejs:tin_plate, net.minecraft.world.item.crafting.Ingredient@92c53179]: Unable to set 'ingredients: either<create:sized_fluid_ingredient, ingredient>[]' to 'net.minecraft.world.item.crafting.Ingredient@92c53179' as 'either<create:sized_fluid_ingredient, ingredient>[]'! - Failed to read ``` but then, after second reload, no errors are found and the recipes are correctly loaded into game, heres the server script, is this a priority issue? or something else. ```js
Structure Spawning Restrictions
RedΛngel: Can KubeJS prevent structures in one single DIM?
Reload Failure
NoMoreStars: Getting a consistent reload failure even though I'm sure my code is correct. I can confirm that it's correct since it reloads properly if I leave the world and rejoin. Interestingly I don't get a reload failure if I'm in a superflat world and do /reload. Not sure what mod could be causing this. Could be EveryCompat, could be Moonlight, could be Aeronautics. All I know for sure is the error I'm getting is an "Exception caught during firing event: null" followed by a bunch of listeners.
How can I get all the entities in a certain radius around a non-living entity?
Spookysquid19: I'm trying to get boss rifts from the boss rift mod to move depending on the boss they generate from. To do this, I figured I would need to get all nearby entities, and ended up with this (Minecart is for easier debugging)
Custom Pickaxe
Vexxen: How would i make a custom item mine blocks like its a netherite pick, and be able to mine obsidian in 1.21.1 neoforge.
Immersive engineering js help with refinery
Engineer_Ashe: I am trying to add this recipe to the refinery and it wont work and also if it did work how would I tell it the MBs to use for each one?
Questions about projectiles in kubejs for spells
Andrezinh0: First question: Is it possible to make a projectile render even when it's outside the player's screen? I can achieve this by increasing the projectile’s hitbox, but that's definitely not the best method and it causes other problems as well
Healing nerfs And enchantments being incompatible with eachother
Cat: Okay so i want to nerf all healing by 50% and make certain enchantments incompatible (the enchants are from enchancement mod on 1.21.1 neoforge since sinytra)
Use EntityJS to make one mob protect another type of mob?
cpubutcher: Hi, I want to use EntityJS to modify an existing mob (cockatrice) so it will protect chickens. I'm not sure where to start though. I'm looking at EntityJS's website where it talks about adding goals to mobs, but I'm pretty confused by how it all works, or what kind of goal I would need in order to achieve this result.
How Did You Learn To Use EntityJS?
cpubutcher: Sorry if this is dumb, but I've been searching and have found no good tutorials to help me break into EntityJs. Specifically I want to modify mob AI. The wiki is pretty confusing and doesn't explain what goals exist or how to apply them from the ground up.
Is highPriorityData still exist in 1.21 kubejs?
gundami: It said it's not defined
Reading mainhand weapon attack speed
Hexite: Hello! im trying to modify a script to include any tool with less then a swords attack speed to work with an ability. I know how to make it work for any tool, but ive run into issues checking the tools attack speed. I know how to read attack damage, but the same syntax doesnt seem to work for attack speed and I dont know why. ive included a copy of what im trying to do:
Mining Change
IRBan: I'm currently trying to change how mining works in my modpack. I recently changed as a whole for stone/cobblestone to give you overgeared:knappable_rock. However, I'm currently trying to change to where primitive tools give you that while Iron tools gives you original loot drops. This is what i have as the block script. But nothing is working. Can anyone explain what i did wrong and how to fix it please!.
Changing stats of specific mob on spawn
MrNubCake: Im trying to make code that does two things: A: lessen Hullbreaker spawns in the Abyssal Chasm (Alex's Caves), and B: set it's scale attribute (biomancy:size) to 2,
kubejs mekanism has outdated documentation
SoBinary: the documentation on the kubejs wiki and the mod page claims the infuser recipes should follow the mekanismMetallurgicInfusing(input, output, infusiontype, infusionamount) format, but the actual format is (input, output, infusionitem(with quantity information), is_per_tick)
modify skillet attack power
mr_ron: is it possible to modify the skillet attack from farmers delight refabricated with kjs? i'm finding it a little overpowered
Get FuelLevel for Blaze Burner
uihibjhhgj: When I'm writing my custom machine, I encounter some problem with getting the FuelLevel of blaze burner. Do anyone know how to get the FuelLevel Value using kubejs?
A way to rename items
Pakaru: Is there a way to rename items upon specific event triggers? Like for example, renaming a stick into "right-clicked stick" upon right clicking with it
Renaming Enchantments
CaptConrad: How can I use KubeJS to rename enchantments? The ClientEvents.lang function doesn't seem to do enchantments and putting a resource pack in the /kubejs/assets folder doesn't work.
Custom chains & bars?
akhill: How could I make custom chain blocks and bars (like iron bars)?
AStage - How to use
Kammy: Looking at the wiki I have... very little clue how to use it for what I wanted to do
Accessing item tags in client scripts
mo_mo (ping me): How do i get an item tag as a list/array in a client script, if possible?
rotating blocks
PosingCarton: I've got the plushie I'm making rotating, but like a log, instead of like a skull, which while funny, isn't the desired result
is there a way to hide all items form a mod except a select few
harrison: ```RecipeViewerEvents.removeEntries('item', event => {
How to cancel block breaking if tool tier is too low?
KCtops6: Hey everyone! I'm trying to implement a progression system where players are physically prevented from breaking certain blocks if their tool tier isn't high enough.
Custom Painting
WildFire905: I was just wondering how to create a custom painting using kubejs?
Adding biomes to advancement criteria
Snowy♡: I'm attempting to add compat for modded biomes to the adventuring time advancement, but I'm very lost. It says that the trigger builder should return a `PlayerTrigger$TriggerInstance`, how would I get that?
Question about custom fluids
cjaawesome: Is it possible to make custom fluids burn items and entities?
Is there a way to swap recipe inputs and outputs?
Yurik: Im currently working on a modpack and want to unify resources that are fluids, the question is there a method in KJS which lets you swap recipe inputs and outputs.
Creating a block making particles like crying obsidian
NanChik: I want to create a block that will make parts like a crying obsidian but red particles
How do I get custom blocks going for a multiplayer server without needing clients to do anything?
Anonymous: It seems that clients will need to mess around with their kubejs files if I want to register custom blocks with my own textures with it, which sucks.
How to make custom Create haunting recipe method?
Atom Sorcerer: This might not even be possible at all, but i was curious if there would be any way to create a custom method to do the "Haunting" recipe process from Create.
Shearing using entityInteracted
lopiditty: Could someone lend me hand on how I'd be able to modify this script to make only goats be affected by this script when sheared? Because, while it does work, it only seems to check if you could shear the entity at all, which affects sheep as well.
How to take/insert/read items from adjacent inventories?
Rimevel: What the title says. I am working on a custom block, and one part of it is that when the block is right-clicked, the item held by the player should be inserted in the block behind my custom block.
how would I make a block that has a different texture on the front?
Your Least Favorite Comedian: I know how to create blocks but I don't know how to texture them directional from the player's perspective (like a furnace's face placed to the player) and the wiki is confusing me
Add components to item depending on enchantment
Jake: I want to remove quarks color runes from my modpack, but I want the enchantment glint to change color depending on the enchantment (tools only have one enchantment at a time)
change blocks nether portal overwrites
Aceplante: i would like to prevent nether portals overwriting some custom kubejs blocks. For example, nether portals overwrite dirt, but surely they dont overwrite bedrock? Is there a way to tag blocks as unable to be replaced by nether portals?
Iterating existing tag names within ServerEvents.tags
KCtops6: I am trying to dynamically create new tags by filtering existing ones (e.g., finding all `#chipped:X` tags to create `#modpack:chiseled/X`), but I cannot find a way to list the current tag registry from within `ServerEvents.tags('item', event)`. Attempting to use `event.getRegistry()` or similar calls results in a TypeError, as the PreTagEventJS object doesn't seem to expose the registry for querying. Is there a specific binding or method in KubeJS 6 to retrieve a list of all currently registered ResourceLocation tags so they can be processed and remapped?
Attribute editing for items not working properly
Smoke: As seen in the pics, when trying to buff some weapons, not only do certain attributes not align with the json but for some reason some weapons have become absurdly fast out of nowhere. Am i doing something wrong?
prevent kubejs' autogenerated assets from taking priority over resource pack assets
asof: i switched from using kubejs/assets to using openloader with a zip file for perfomance, but it is not loading the correct model file for these assets. (furthermore, what is the correct generateAssets priority to load before resource packs but after kube's autogenerated assets?)
Particles while passing through a liquid
PosingCarton: I've got a liquid that is acting as a ball pit, and I'd like to create particles that come up as the player wades through the ball pit, all the player events I've seen don't seem to check for if a player is walking while on (in) a block. Granted I could be (and probably am) overlooking something
How can I find the closest entity to a mob when it's spawned?
Spookysquid19: I'm working on a script to modify boss rifts when they're spawned from a specific boss, particularly bosses of mass destruction ones. The first step is figuring out what boss spawned the rift, and I thought the best way to test that would to check for the closest entity, since the boss rifts are spawned directly on the entity when they die. Right now I've got this
Changing the mob model in EntityJS when the player writes a command
Dunrox: Is it possible to somehow change the model of the mob after its registration, for example, when the player wrote some command?
Example of how to modify the Tool Level required to break a block so it drops an item?
Ranman: Searched up and down 1.21.1 support and struggling to find a clear cut example of this.
KubeSJ with FTBQuests
Anonymous: Hello, I am looking into creating a custom task, which would require player simply to play for amount of time (as a way of slowing down the entire quest tree (to avoid speedrunning it).
Custom food items for drinking
naxxo_rayo: I was wondering how I can make an item provide hydration for the Tough as Nails mod using KubeJS. For example, I'd like to give a melon slice the ability to hydrate the player just like a water bottle does. I'm using NeoForge 1.21.1. Thanks!"<:BigEyes:1110630956051726377>
KubeJS Produces an Internal Error when this script is added. Supposed error recipe still works.
Anonymous: I understand if the number of mods makes this an impossible issue to parse. The script editing one recipe has supposedly affected a completely unrelated recipe. The apparent affected recipe still functions as normal however. In game error message persists regardless. It seems like it can be ignored, but the message is annoying. Please let me know if there is other information you require thank you.
JEI compat with anvil material repair
Neohedron: I recently added a 'repair with material' recipe for items from a mod which didn't come with them by base, but since it isn't handled like other recipes, it doesn't show up in JEI/EMI like other repair with material recipes. I understand the material/tiers system has been funky for a while, can some wizards lend a hand?
Creating Min-Max values for Player Max Health Attribute
Gambleputty: Abt as the title says, I cant use AttributeFix since I want this to apply to the player specifically and not every mob. I just wanna make sure that player health doesnt go below a certain value and cannot exceed a certain value in terms of maxhealth is all
Changelog?
Kieran // OperatorTriz: I seen there was 2 versions for 1.21.1 neoforge pushed to Cf on April 29th, but the changelog directs to an empty commit history?
Creating a food item in 1.21.1
CORY: So I followed the docs pretty much exactly (rookie mistake <:FREEZE:1402503362032828427> ) and got this
Gravity Affected Block
Jyhrie: is there any way to register new gravity affected block?
How to make a trident-based weapon
Enquen: Hi I'm sorry if this is a dumb question, but I haven't found anything even though I've been searching between here and wikis for a couple hours.
KJS block doesnt work in Create HeatJS
Hexa: I tried to make a simple ice automation mechanic, but when i start up my game with the following code:
Cant create custom commands
u_888: I tried some example scripts too but i cant add custom commands like !spawn or /spawn when i add its loading without problem but when i try to use its saying unkown command
How do I remove the strafing from spell casting mobs?
Cr0w37: Hey I heard you have made a script for this or know something at least? <@696035922030100561>
fluid registry updating from 1.20.1 issues
Lens: ```StartupEvents.registry('fluid', (e) => {
for my auto tp the code seems to not work for debug it just doesnt run the command it just says unex
Anonymous: unexpected error when i run
Modify burn time on all fuels
smearfo: I'd like to divide the burn time of all fuels in the game by 8, but I've gotten conflicting information while looking into it. Is this possible?
fluid has no texture
Kirillpro3000: For some reason my fluid doesnt have a texture. Heres the script:
more accurate syntax error detection
Akari_Enderwolf: By this I mean say we have the below code
How do I build working recipe schemas and convert recipe types between each other?
Plazzy: I want to improve my knowledge of recipe schemas so I can implement simpler functions in my scripts. This would clean up a lot of my code significantly.
How can I make an ISS spell that shoots a laser from Cataclysm?
Spookysquid19: I'm trying to learn the ISS addon and using Cataclysm spellbooks as kinda reference. Right now I want to just recreate the laser spell, which on paper sounds simple. It's just something you cast and it shoots out a laser, the same kind as the Watchers and Harbinger.
How do I deal with mods injecting tags after kubejs loads?
readf0x: I'm trying to change the weight of some blocks in create aeronautics, but the related tag is empty when kubejs processes tags. What do I do?
Custom fluids always missing texture. Can't find functional example anywhere.
Anonymous: I can't figure out how to add a custom fluid.
BUG REPORT with latest update
Aceplante: In the latest kubejs update (build 24), any unspecified food values are automatically assumed to be 0 instead of using their vanilla defaults. Here, for example, the sweet berry had no food values at all. In the previous update this did not happen and the vanilla values were properly used if none were specified.
recipes and interactions etc
łukasz: im making rpg server with friends and we want to make one person to be able to enchant and make potions and another to be the only one that can craft iron or better gear (and also be the only person to melt raw iron or raw whatever) and i have no idea how to start with the script so im asking for help
How do I use custom effects and projectiles with the ISS addon?
Spookysquid19: I want to try and make some spells with KubeJS and I'm starting by trying to recreate a few spells from Cataclysm Spellbooks. Right now I picked the laserbolt and Hardware Upgrade, because they seemed straightforward enough, just a projectile and a status effect.
Tag Blocks in a Dimension or Biome
Cryptic: I’m wondering if it’s possible to tag any block within a certain biome with a tag, I am trying to prohibit phasing through blocks in this custom dimension I have made, and within the dimension there is a custom biome that I have a dungeon in. We have the origins mod, and I’ve made blocks unphaseable before by simply adding the “origins:unphasable” to the list.