#Create rotational energy custom block

15 messages · Page 1 of 1 (latest)

rancid agate
#

Title explains it fairly well, i want to make a custom block that uses creates rotational energy. Preferably with spinning shafts and stuff but i'm fairly certain that kubejs doesn't support block animations and especially not ones like what create does.

static hollowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

kindred junco
#

you cannot create block entities with kubejs (i dont know if it is possible with BeJS)

#

I suggest installing Multiblocked mod you can create parts which supports create rotation, stress unit

rancid agate
#

i'll look into it, thanks

#

ah no, thats still on 1.18.2

hoary jolt
#

I know you can extend blocks in 1.19, so maybe if you extended the encased shaft or something. Not sure if that would work though, and I have no experience with 1.19

rancid agate
#

thats one of the snapshots for 1.19.5 i think. i'm still on 1.19.2

#

but its a good thought, maybe i'll have to wait for that unless i can find an alternative way

hoary jolt
#

KubeJS is not on snapshots... ?
Neither is create as far as I know,
Encased shafts are in the game even in 1.16 and extending is in KubeJS 1.19.2

rancid agate
#

i assumed you meant display entities

hoary jolt
#

I mean this

shy thornBOT
#

[Quote ➤](#1082700619569188874 message) This requires many files, but I will list all of them, along with their contents.
Ask me if you have any questions, or if you need something explained!

:warn_lex:The file contents in this example are compressed to not make the post very long.:warn_lex:

/kubejs/startup_scripts/dark_glass.js

const $TintedGlassBlock = Java.loadClass('net.minecraft.world.level.block.TintedGlassBlock')
const $Blocks = Java.loadClass('net.minecraft.world.level.block.Blocks')
const $Properties = Java.loadClass('net.minecraft.world.level.block.state.BlockBehaviour$Properties')
const $BlockItem = Java.loadClass('net.minecraft.world.item.BlockItem')
const $IProperties = Java.loadClass('net.minecraft.world.item.Item$Properties')

let darkGlass
StartupEvents.registry('block', e => { darkGlass = e.custom('dark_glass', new $TintedGlassBlock($Properties.copy($Blocks.TINTED_GLASS))) }) // Block
StartupEvents.registry('item', e => { e.custom('dark_glass', new $BlockItem(darkGlass.get(), new $IProperties())) })  // BlockItem (delete this line if you just want a block without item)

/kubejs/assets/kubejs/blockstates/dark_glass.json

{ "variants": { "": { "model": "kubejs:block/dark_glass" } } }

/kubejs/assets/kubejs/models/block/dark_glass.json

{
  "parent": "block/cube_all",
  "textures": { "all": "kubejs:block/dark_glass" },
  "render_type": "translucent"
}

/kubejs/assets/kubejs/models/item/dark_glass.json

{ "parent": "kubejs:block/dark_glass" }

/kubejs/assets/kubejs/textures/block/dark_glass.png
This is where you add the texture

hoary jolt
#

which is more complicated then I remember

rancid agate
#

Its fine, i'll figure something out. Thanks