#Display entities conveyor belt help

1 messages · Page 1 of 1 (latest)

willow birch
#

what addons u are using?

silent nebula
#

skbee

#

i can install any other plugin, i am doing it on a localhost server at the moment

willow birch
#

i was asking bcus i never saw spawn an item display 1 block north of event-block... i dont know how to help you.. sorry

silent nebula
#

that is vanilla skript

willow birch
#

let me try that rq

#

what version?

silent nebula
#

I am going to stop responding because I am asking for help and i dont want this chat to be cluttered

willow birch
#

u want something like that:

on break of diamond ore:
    # cancel event
    set {_loc} to block 1 north  event-location
    skbee spawn item display at {_loc}

    set display item of last spawned entity to diamond

    set {_lastspawn} to last spawned entity
    set {_bb} to block below {_lastspawn}


    while {_bb}'s type is blackstone:
        wait 0.5 second

        kill {_lastspawn}
        set {_loc} to block 1 north {_loc}


        skbee spawn item display at {_loc}
        set display item of last spawned entity to diamond

        set {_lastspawn} to last spawned entity
        set {_bb} to block below {_lastspawn}


    wait 1 second 
    # ------ end on blackstone road ------ #
    kill {_lastspawn}

this is only strait line.... but idk if that what u want

#

and i use skbee spawn item display at {_loc} bcus the line u send didnt work for me

silent nebula
#

i want it to work in any way that it is built

#

i can try and see if it works

#

you can also just push the item or just "teleport" instead of killing/respawning

#

that works really well just make it so it can turn

willow birch
#

it will not be hard... u want my help with that?

silent nebula
#

plpease

#

please*

#

im not too good with display entities

#

ive spent a long time on it for it to not work

slim bronze
#

to optimize your skript a little you can check the 'facing' of block below entity

willow birch
#

so could u help me with itrm display thing that isnt working for me?

slim bronze
#

not really any line in specific

silent nebula
#

well if it helps i kinda changed the skript given to me a bit to make it simpler

slim bronze
#

just check the block below the entity, then teleport it to location X [facing of block below it, which returns 'north', 'south', etc] of itself

silent nebula
#
on break of diamond ore:
    cancel event
    set {_loc} to block 1 north  event-location
    spawn item display at {_loc}
    set display item of last spawned entity to diamond
    set {_lastspawn} to last spawned entity
    set {_bb} to block below {_lastspawn}
    while {_bb}'s type is top blackstone stairs:
        wait 0.2 seconds
        kill {_lastspawn}
        set {_loc} to block 1 north {_loc}
        spawn item display at {_loc}
        set display item of last spawned entity to diamond
        set {_lastspawn} to last spawned entity
        set {_bb} to block below {_lastspawn}
    wait 0.3 second 
    kill {_lastspawn}
    add 1 to {balance.%player's uuid%}
    send actionbar "&a$+1" to player
        
#

it is killed instead of teleporting

#

im wondering if thats why the animation looks choppy

slim bronze
#

only time i ever kill and respawn something continuously is for falling blocks

silent nebula
#

im just going to change it to teleport real quick

#

it cut it down a few lines too

#

oh wait

#

wrong one

#

i hate windows' default text thing

#
on break of diamond ore:
    cancel event
    set {_loc} to block 1 north  event-location
    spawn item display at {_loc}
    set display item of last spawned entity to diamond
    set {_lastspawn} to last spawned entity
    set {_bb} to block below {_lastspawn}
    while {_bb}'s type is top blackstone stairs:
        wait 0.2 seconds
        set {_loc} to block 1 north {_loc}
        teleport {_lastspawn} to {_loc}
        set {_bb} to block below {_lastspawn}
    wait 0.3 second 
    kill {_lastspawn}
    add 1 to {balance.%player's uuid%}
    send actionbar "&a$+1" to player
#

i still dont know where to go with the rotational thing

slim bronze
#

facing of (a block location) returns north, south, east or west

silent nebula
#

just change the last part to

facing of (a block location)
slim bronze
#

the parentheses are there to show what needs to be there

#

it's not actual code

#

facing of is the actual code

silent nebula
#

i want it to be any way

#

north south east or west

slim bronze
#

tried doing shit with facing and ig skript doesn't like recognizing directions

silent nebula
#

lol

slim bronze
#

this works however

silent nebula
#

im at a loss with this honestly

slim bronze
#

because of course the stair's "front" is the side you don't climb up

#

👍

silent nebula
#

hm

#

theres another issue im working on fixing

#

any block that isnt blackstone stairs kills the entity and in my case adds money

#

i want it only to be the one

slim bronze
#

yeah so i got it working fine

#

¯_(ツ)_/¯

silent nebula
#

ok

slim bronze
#

location 1 above and 1 behind block at location 1 below player

#

1 above so you're not in the stair block

#

1 behind so you're "in front" of it

#

block at location 1 below player is the stair block they're currently standing on

silent nebula
#

im not following

#

oh

#

you were just explaining what each part is

slim bronze
#

it does tend to get goofy with stairs like this though, as far as I can tel

#

might need debug stick to fix it

#

nvm its just super weird orientation

#

if the stairs are facing North -> South, you can invert the yaw and be pointed the right way

#

if you're not, it doesn't 🤷

#

prob an issue with location default yaw idk

silent nebula
#

i am having this issue now

#

i cant solve it

slim bronze
#

gonna see if i can come up w/ something to fix it

silent nebula
#

basically, like i said, when the item runs into any block that isnt blackstone stairs; it despawns the entity

#

tried fixing it with a check, did not work

on break of diamond ore:
    cancel event
    set {_loc} to block 1 north of event-location
    spawn item display at {_loc}
    set display item of last spawned entity to diamond
    set {_lastspawn} to last spawned entity
    set {_bb} to block below {_lastspawn}
    while {_bb}'s type is top blackstone stairs:
        wait 0.2 seconds
        set {_loc} to block 1 north {_loc}
        teleport {_lastspawn} to {_loc}
        set {_bb} to block below {_lastspawn}
    while {_bb}'s type is stone cutter:
        wait 0.3 second 
        kill {_lastspawn}
        add 1 to {balance.%player's uuid%}
        send actionbar "&a$+1" to player
        set line 5 of player's scoreboard to "&fBalance: &a$%{balance.%player's uuid%}%" 
#

second while is what i added

#

and the money is infinitly going up lmao

#

because of that check

slim bronze
#

nvm im just a fool and forgot you add 180 to yaw instead of inverting it

#

it's always good btw to add emergency exits into while loops

#
exit loop if {_c} >= 50```
#

just in case it runs forever

silent nebula
#

how would that apply to mine

slim bronze
#

your two while loops

#

just taking notice of them

silent nebula
#

ive never worked with emergancy exits

#

plus what i did isnt even working lol

#

its not stopping

slim bronze
#

idek what its doing

#

you spawn a display entity

#

but only set the location once

#

{_bb} is a static location, it's not going to change

silent nebula
#

im trying to make a check to see if the block is not a top blackstone stair or whatever

#

and if its not that or a stone cutter it stops everything

slim bronze
#

yours: while {_bb}'s type is top blackstone stairs: [ {_bb} = block below {_lastspawn} ]
mine: while block at location 1 below player is top blackstone stairs:

#

mine is also using the player instead of a different entity for testing

silent nebula
#

hm

#

so i can just change player to the spawned entity

slim bronze
#

swap out {_bb} to block below {_lastspawn}

willow birch
#

u dont need the second while

silent nebula
#

well

willow birch
#

just replace it wil if, see if that will work

slim bronze
#

can just be a basic if statement

willow birch
#

yes ^

slim bronze
#

also that second while loop would in fact run forever\

#

so that's cool

willow birch
#

replce the work 'while' with the word 'if'

silent nebula
#

i dont have the second while anymore anyways

#

but just keep it in the same spot?

#

wait it worked

silent nebula
#

i dont know if im following

willow birch
#

but, if u are using staiis for the road, its can get unpredictable, clould break

slim bronze
#

you set {_bb} to a single location, and it is never going to update

#

as a result, your while {_bb}'s type is top blackstone stairs: will only run once

silent nebula
#

i understand that

slim bronze
#

nvm you're re-setting {_bb} afterwards 🔥

willow birch
slim bronze
#

still better to just use the location of the entity

#

less work for skript to do

silent nebula
#

which means less lag

slim bronze
willow birch
#

but the entity is getting killed over and over again, u cant do that

silent nebula
#

not anymore we changed it to teleport

silent nebula
#

just with the one line

slim bronze
#

needed like 5 lines of code

silent nebula
#

o

#

but its something i would assume mine can do

slim bronze
silent nebula
#

set {_bb} location 1 above and 1 behind block at location 1 below {_lastspawn}
did i do this right?

slim bronze
#

set {_bb} to location 1 above...

#

i am seeing some weird stuff going on though when trying to turn it to use display entities

willow birch
#

just send to him the all code...

slim bronze
#

not properly registering the block beneath it

#

fixed it idk what was wrong with it

silent nebula
#

oops

#

i missed the to

#
on break of diamond ore:
    cancel event
    set {_loc} to block 1 north of event-location
    spawn item display at {_loc}
    set display item of last spawned entity to diamond
    set {_lastspawn} to last spawned entity
    set {_bb} to location 1 above and 1 behind block at location 1 below {_lastspawn}
    while {_bb}'s type is top blackstone stairs:
        wait 0.2 seconds
        set {_loc} to block 1 north {_loc}
        teleport {_lastspawn} to {_loc}
        set {_bb} to block below {_lastspawn}
    if {_bb}'s type is stone cutter:
        wait 0.3 second 
        kill {_lastspawn}
        add 1 to {bal.%player's uuid%}
        send actionbar "&a$+1" to player
        set line 5 of player's scoreboard to "&fBalance: &a$%{bal.%player's uuid%}%" 
    else:
        send "&cBAD!" to event-player

its sending the "bad" which means its not registering as what it needs to

slim bronze
#

you're also still using "block 1 north"

#

and not one that adapts to the conveyor layout

silent nebula
#

so change it to one block north and one block behind?

slim bronze
#
  set teleport location to 1 above and 1 behind the block below entity
  teleport entity to teleport location
  wait 1 tick
#

this is not real code, just guidelines for it

willow birch
#

try this

on break of diamond ore:
    cancel event
    set {_loc} to location 1 above block at location 1 below event-location
    skbee spawn item display at {_loc}
    set display item of last spawned entity to diamond
    set {_lastspawn} to last spawned entity

    set {_bb} to block below {_lastspawn}

    while {_bb}'s type is blackstone stairs:
        wait 0.2 seconds
        set {_loc} to location 1 above and 1 behind block at location 1 below {_lastspawn}
        teleport {_lastspawn} to {_loc}
        set {_bb} to block below {_lastspawn}
    
    if {_bb}'s type is stone cutter:
        wait 0.3 second 
        kill {_lastspawn}
        add 1 to {bal.%player's uuid%}
        # send actionbar "&a$+1" to player
        set line 5 of player's scoreboard to "&fBalance: &a$%{bal.%player's uuid%}%" 
    else:
        kill {_lastspawn}
        send "&cBAD!" to event-player
silent nebula
#

still same thing

willow birch
#

its working for me

silent nebula
#

hm one moment

willow birch
#

tried that road, works fine

silent nebula
#

ah solved my own issue

#

it does work

#

the issue was my diamond ore was on a stone brick

#

it works so well

#

thank you

willow birch
#

np

silent nebula
#

any tips for this, im trying to make the stair when placed face opposite from the player

#
set block 1 above event-block to top blackstone stair
#

maybe a variable

#
on right click:
    player's tool contains evoker spawn egg:
        cancel event
        set block 1 above event-block to top blackstone stair
#

when its placed it placed upsidedown and the stair part needs to be facing the player

willow birch
silent nebula
#

Well actually now that i think about it

#

I don’t even know why we needed conveyors to be buildable lol

#

Only one ore can be mined

#

Which means no need for longer conveyors

#

Basically you can upgrade the block you can mine maybe we can add smelters or something that increases money ultimately needing a longer conveyor

#

Hm

willow birch
#

wdym longer conveyor? they can just make a long line, with stairs...

silent nebula
#

correct why would it be needed for just a singular ore

willow birch
#

if u need more help, ask

silent nebula
#

I will thank you I’m just wondering what the need for building conveyors would be

silent nebula
#

if i was going to add more items to this skript is the easiest way to just add if event block is x and copy n paste

#
on break:
    player's tool contains stick:
        event-block is diamond ore:
            cancel event
            set {_loc} to location 1 above block at location 1 below event-location
            spawn item display at {_loc}
            set display item of last spawned entity to diamond
            set {_lastspawn} to last spawned entity
            set {_bb} to block below {_lastspawn}
            while {_bb}'s type is blackstone stairs:
                wait 0.2 seconds
                set {_loc} to location 1 above and 1 behind block at location 1 below {_lastspawn}
                teleport {_lastspawn} to {_loc}
                set {_bb} to block below {_lastspawn}
    
            if {_bb}'s type is stone cutter:
                wait 0.3 second 
                kill {_lastspawn}
                add 1 to {bal.%player's uuid%}
                send actionbar "&a$+1" to player
                set line 5 of player's scoreboard to "&fBalance: &a$%{bal.%player's uuid%}%" 
            else:
                kill {_lastspawn}
                send "&cBAD!" to event-player
#

line 3

#

and then paste the rest

#

or is there a condensed way

willow birch
#

u could make a function

#

u can just copy and paste, that will be the easiest... no need to learn new things

silent nebula
#

im not sure how to do functions

#

ive never messed with functions

#

but also this

set block 1 above event-block to north facing top blackstone stair
#

its erroring and idk what its about

#

fixed

frank garnet
silent nebula
#

i wasnt being rude

frank garnet
#

kinda ;(

silent nebula
#

i just didnt want the chat to be cluttered

#

either way what gives you the right to come in here and "moderate" another users conversation

frank garnet
#

bro it's a public conversation

silent nebula
#

doesnt mean you should jump into the conversation and tell people how to talk

frank garnet
#

i was just telling you that people who help are doing it for free and can be respected

silent nebula
#

nothing about what i said wasnt respectful

frank garnet
#

💀

silent nebula
#

again, its your opinion