Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft

Gatewaysjs Mod FAQ

10 questions players actually ask, answered.

How do I start making a custom gateway?
Create a new KubeJS script file in your `kubejs/server_scripts/` folder, then use `GatewaysJS.registerGateway()` to define your gateway with a unique ID, custom pearl appearance, wave configurations, and event listeners. You can reference the Custom Gateway Pearl guide for the full structure and available properties.
What's the difference between gateway events and how do I use them?
Gateway events fire at different stages: `onOpen` (gateway created), `onStart` (wave begins), `onWaveEnd` (wave cleared), `onMobSpawn` (each mob appears), and `onFail` (arena lost). Attach listeners to each event in your script to trigger custom actions like spawning items, playing sounds, or modifying the boss bar.
Can I apply potion effects to mobs in my waves?
Yes, use the Entity Modifiers system in your wave configuration to add potion effects, custom equipment, NBT data, and stat multipliers to spawned mobs. You can apply these modifiers per-wave or per-mob-type to create difficulty scaling and unique boss mechanics.
How do I give players rewards when they complete a gateway?
Set up a Dynamic Reward Pool by defining loot tables in your gateway script, then trigger them in the `onWaveEnd` event listener to drop items when players clear waves. You can randomize rewards or give specific loot based on wave difficulty.
Do I need to know JavaScript to use this mod?
Yes, Gatewaysjs Mod uses KubeJS scripts, so you'll need basic JavaScript knowledge to write event listeners and customize gateways. However, the mod provides event hooks and helper functions that make common tasks straightforward even for beginners.
Can I change how the boss bar looks during a gateway fight?
Yes, you can customize boss bar display styles through the gateway configuration or dynamically update it during events using the provided customization options. This lets you match the boss bar visuals to your custom gateway theme.
What happens if I register two gateways with the same ID?
The newer gateway registration automatically replaces the older one, so you can update gateway configurations without conflicts. This is useful for rebalancing or redesigning existing gateways.
Can I use ProbeJS autocomplete with this mod?
Yes, Gatewaysjs Mod supports ProbeJS code autocompletion for gateway attributes and event properties, which helps you write scripts faster and avoid typos. Make sure ProbeJS is installed and your IDE is configured to use it.
Does this mod work with other gateway mods or KubeJS addons?
Gatewaysjs Mod extends GatewaysToEternity specifically, so it's designed to work alongside that mod and other KubeJS scripts. Compatibility depends on whether other mods conflict with gateway event handling or KubeJS integration.
My custom gateway isn't spawning mobs—what's wrong?
Check that your wave configuration includes valid mob types, your script file is in the correct `kubejs/server_scripts/` folder, and there are no JavaScript syntax errors in your code. Use the server logs to debug script errors and verify your gateway ID is unique.