#Removing Create Train Tracks Except For one

23 messages · Page 1 of 1 (latest)

buoyant jungle
#

Hi i'm using this

ServerEvents.recipes(event => {
    event.remove({ output: '#create:tracks', not: [{ID: "railways:track_phantom"}]});

})
worn yewBOT
#

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

gilded geyser
#

also id not ID

#

actually the array is fine.

noble adder
#

try ```js
ServerEvents.recipes(event => {
event.remove({ output: '#create:tracks', not: { id: "railways:track_phantom" }});
})

buoyant jungle
#

Correct?

#

It seem to remove all train tracks but not keep phantom tracks

noble adder
#

oh wait

#
ServerEvents.recipes(event => {
    event.remove({ output: '#create:tracks', not: { output: "railways:track_phantom" }});
})
buoyant jungle
noble adder
#

you need some js basic knowledge

buoyant jungle
buoyant jungle
noble adder
#

js Item.of('minecraft:potion', '{Potion:"..."} }}); // ----------------------------------------^-- ⭕```js
Item.of('minecraft:potion', '{Potion:"..."}') }});
// ----------------------------------------^^--

buoyant jungle
#

I see there was a missing )

noble adder
#

and the '

buoyant jungle
#

changing the item.of to item'of? no wait that

#

hmm

#
ServerEvents.recipes(event => {
    event.remove({ output: '#create:tracks', not: { output: "railways:track_phantom" }});
    event.remove({ Item.of('minecraft:potion', '{Potion:"apotheosis:flight"}') }});
})

this is what i typed

#
ServerEvents.recipes(event => {
    event.remove({ output: '#create:tracks', not: { output: 'railways:track_phantom' } });
    event.remove({  output: Item.of('minecraft:potion', { Potion: 'apotheosis:flight' }) 
    });
});