your current location:首页 > news>Kubejs uses the Custom Portal API to create a custom portable door [KJS] Kubejs Minecraft Game

Kubejs uses the Custom Portal API to create a custom portable door [KJS] Kubejs Minecraft Game

2024-12-10 17:49:10|Myriagame |source:minecraft skins

This tutorial is set by the author's setting without permission.

This tutorial environment is tested in Kubejs 200.6.5-boild.14 and CustomPortalapi-0.0.1-Forge-20

 const $ customPortalBuilder = java.loadClass ("net.Kyrptonaugt.customPortala.api.customPortalDer")

const $ BuiltindiseNSionTypes = Java.loadClass ("Net.mineCraft.WORLD.Leveel.Dimension.BuiltindiseTypes"))))

Startupevents.postinit (e => {{

$ CustomPortalBuilder

.Beginportal () // Start construct a custom portable door

["FrameBlock (Net.MineCraft.WORLD.LEVEL.BLOCK.BLOCK)"] (Blocks.stone) // The frame of the portal of the portal

.Destdimid ($ BuiltindInSionTypes.nether_effects) // Transmission dimension

.Tintcolor (131, 66, 184) // The RGB color of the portal of the portal

.Registerportal (); // Register a custom portable door

$ CustomPortalBuilder

.Beginportal () // Start construct a custom portable door

["FrameBlock (Net.MineCraft.WORLD.LEVEL.BLOCK.BLOCK)"] (Blocks.diamond_block) // The framework of the portal .Destdimid ($ BuiltindIMENSIONSIONTYP. es.nether_effects) // Transmission dimension

.Lightwithitem (items.diamond) // Activate the items of the portal door

.Flatportal () //

.Tintcolor (131, 133, 184) // RGB color of the portal

.Registerportal (); // Register a custom portable door

})

Reference document: Custom transmittance | Kubejs1.20.1 tutorial