#dev-general

1 messages · Page 196 of 1

high violet
#

so i'm like cracking open a cpu

prisma wave
#

Always has been

hot hull
#

Always has been reversed_fingerguns

frigid badge
#

math & registers

prisma wave
#

Ha

high violet
#

you got me

hot hull
#

Smh BM

high violet
#

where you the impostor?

#

always has been

hot hull
#

Have*

frigid badge
#

were*

high violet
#

oh god what have i done

#

sorry

#

4 am here

hot hull
#

Always were been?

high violet
#

i'm tired

jovial warren
#

computers are purely logical, I’d be surprised if they were bad at it lol

prisma wave
#

always were been

frigid badge
#

@hot hull bruh what no, were you the impostor

jovial warren
#

shut it BM

obtuse gale
#

Question: If Im making like a minigame in which both players get teleported to like a 3x3 cube, where should I make the 3x3 cube, because I wouldnt wanna just chuck it down where someones built or something by just using the players location

frigid badge
#

dumbo

high violet
#

Just open Maven

computers are purely logical, I’d be surprised if they were bad at it lol
@jovial warren

hot hull
#

Lemmo, Always has were been yes

frigid badge
#

smh

prisma wave
#

@obtuse gale different world?

hot hull
#

Void world

obtuse gale
#

hm, I guess I could just make one minigame world and then do it all in there.....

prisma wave
#

That's usually the convention

obtuse gale
#

I dont think its worth making a world per game

jovial warren
#

@obtuse gale different world?
dis good idea

prisma wave
#

Then you can just destroy the world once it's done

frigid badge
#

wouldn't do that ^

high violet
#

So folks

obtuse gale
#

I mean the games only gonna go for like 1-2mins

prisma wave
#

😟

obtuse gale
#

So is it worth making a new world per game?

frigid badge
#

if it's a 3x3 cube

#

and only 1-2 mins

prisma wave
#

1 world for all of the games I guess

frigid badge
#

just make an algorithm to determine a new place

obtuse gale
#

yeah thats what im thinking

hot hull
#

Just use a single world, and space the games out

prisma wave
#

Just keep them out of render distance

#

Yeah that's what I meant

high violet
#

Why would someone need more than 1 world for minigames

hot hull
#

Or use packets so you have a single cube and trick the players to think it's multiple reversed_fingerguns

prisma wave
#

PerWorldPlugins > Bungee

hot hull
#

BM

#

No.

frigid badge
#

perplayerplugins > perworldplugins

#

perblockplugins > all

prisma wave
#

PerEntityPlugins

hot hull
#

PerPixelPlugins

heady birch
prisma wave
#

PerPluginPlugins

frigid badge
#

percountryplugins

prisma wave
#

Racism

obtuse gale
#

so should I just on enable if a world named x doesnt exist make it?

heady birch
#

Like "master" branch

prisma wave
#

🙄

frigid badge
#

white discord theme is racist

hot hull
#

Yes Aj, but you should also be removing the world when the plugin shuts down

obtuse gale
#

oki

#

also should I be doing this kinda stuff in the main class or does that break srp or whatever

frigid badge
#

diff class

hot hull
#

You shouldn't be doing anything in your main class

obtuse gale
#

what would one call that class lol

frigid badge
#

well first split it all up into lil parts

hot hull
#

WorldManager?

frigid badge
#

and then think about the names

#

like what goes into this

#

you have to manage arena's and determine where each arena goes

hot hull
#

AbstractSimpleWorldManagerHandler

frigid badge
#

etc

jovial warren
#

Like "master" branch
I mean, there are worse things, think about the master-slave model for example, if you really consider that racist

hot hull
#

Ngl that was just some idiots having too much time..

frigid badge
#

way too controversial topic to talk about tbh

heady birch
#

Rust vs Java

obtuse gale
#

anyone know how to make a void world lol?

heady birch
#

void world() {
}

prisma wave
#

Rust with JNI

hot hull
#

What a comek Niall

frigid badge
#

@heady birch let's make rustmc

heady birch
#

He asked for void world

#

Maybe

#

But none of this map() stuff

#

I dont like that part of rust

obtuse gale
#
WorldCreator creator = new WorldCreator("world");
creator.generator(new ChunkGenerator() {
    @Override
    public byte[] generate(World world, Random random, int x, int z) {
        return new byte[32768]; //Empty byte array
    }
});
World world = creator.createWorld();``` found this online, guess ill give it a go...
heady birch
#

That array will use alot of memory

#

0.03MB

distant sun
#

Damn ..

obtuse gale
#

is that bad?

heady birch
#

No not at all

#

Although

#

I guess that's for each chunk

#

Let's say that for example

obtuse gale
#

I dont think that method even exists anymore...

heady birch
#

You generated 10000 chunks

obtuse gale
#

that method doesnt even exist lol

heady birch
#

And the GC is not running

#

Then that would be 300 megabyte

distant sun
#

Isnt the method used only for new chunks?

heady birch
#

No idea

obtuse gale
#

apparently this might work

#
        creator.generator(object : ChunkGenerator(){
            override fun generateChunkData(world: World, random: Random, x: Int, z: Int, biome: BiomeGrid): ChunkData {
                return createChunkData(world)
            }
        })
        creator.createWorld()```
distant sun
#

Also the value 32768 means what? Because 16x16x256 equals 64k

heady birch
#

just return null lol 🙂

frigid badge
#

well

hot hull
#

Just loop through it and set it to air

frigid badge
#

actually

hot hull
frigid badge
#

it depends on the jvm if it'll use 0.03mb or not

obtuse gale
#

now how tf do you delete worls lol

#

do i just have to get the world folder manually

distant sun
#

Pretty sure there is a method

obtuse gale
#
class WorldManager {
    fun createWorld() {
        if (Bukkit.getWorld("mapgames") != null) return
        val creator = WorldCreator("mapgames")
        creator.generator(object : ChunkGenerator() {
            override fun generateChunkData(world: World, random: Random, x: Int, z: Int, biome: BiomeGrid): ChunkData {
                return createChunkData(world)
            }
        })
        creator.createWorld()
    }

    fun deleteWorld() =
            Bukkit.getWorldContainer().resolve("mapgames").delete()
    
}```
#

Also could these methods be like static? If no why not? I only call them onEnable and disable

prisma wave
#

object

obtuse gale
#

like the class?

prisma wave
#

yes

distant sun
#

what is object : ChunkGenertor

prisma wave
#

anonymous class

#

Kind of

distant sun
#

Mhm

jovial warren
#

it’s an anonymous object

obtuse gale
#
class Mapgames : JavaPlugin() {
    companion object {
        var debug: Boolean = true
    }


    override fun onEnable() {
/*        PDMBuilder(this).build().loadAllDependencies().join()*/
        "Loaded dependencies".print()
        debug = this.config.getBoolean("debug")
        CommandHandler.registerCommands(this)
        "Loaded commands".print()
        WorldManager.createWorld()
        "Loaded world"
        "Plugin fully loaded".print()
    }

    override fun onDisable() {
        WorldManager.deleteWorld()
        "Deleted world"
    }

}``` hows this
jovial warren
#

companion object at the top ew

prisma wave
#

Ok please explain why pdm is commented out

#

You are clearly clinically insane

obtuse gale
#

Because my hotswapping wasnt working so i removed pdm and it still didnt work and I just havent added it back in

prisma wave
#

add it back in now 🙂

obtuse gale
#

thats an option

prisma wave
#

no it isn't

#

private set for debug pls

#

Public mutability bad

obtuse gale
#

what?

prisma wave
#

Debug should have a private setter

obtuse gale
#

how

prisma wave
#

private set

obtuse gale
#

like literally just that?

prisma wave
#

yes

obtuse gale
#
        var debug: Boolean = true
        private set```
prisma wave
#

yes

#

Yes

#

Yes

#

yes

obtuse gale
#

yes?

prisma wave
#

Type inference

#

yes

obtuse gale
#

no?

#

yes?

frigid badge
#

yes

#

give it an indent tho

#
        var debug = true
            private set
obtuse gale
#

Why is there Player#teleport and Player#teleportAsync?

#

And what should I use

frigid badge
#

it loads the chunk async

prisma wave
#

teleportAsync is only from paper iirc

obtuse gale
#

so should I use it?

frigid badge
#

depends

#

if I were you and creating your cubes I'd already load the chunks

#

and since teleporting to your cubes you know they'll be loaded already so no need to use the async method

obtuse gale
#

I mean is there a downside to it?

frigid badge
#

to what

obtuse gale
#

teleportAsync

#

Like why dont I always use it

prisma wave
#

It's only on paper for one thing

frigid badge
#

I wouldn't use it for this usage since then I'd have to ugly with completable future

#

and Iknow it won't need to do so

prisma wave
#

^

#

Was about to say that

#

You'd need a messy callback system

#

suspend fun teleport(to: Location, callback: () -> Unit)

#

teleport

#

obligatory /s

obtuse gale
#

mf-cmd just started throwing me NPEs 😦

prisma wave
#

Scary

obtuse gale
prisma wave
#

me.mattstudios.mf.base.CommandHandler.tabComplete(CommandHandler.java:306) what is line 306

#

Also wrong channel

obtuse gale
#

why would I know lol

#

Guess imma have to dive in

prisma wave
#

@ocean quartz

#

ez fix

obtuse gale
#

at org.bukkit.craftbukkit.v1_16_R2

#

I saw that, im on a 1.16.3 server

#

306 is this final Method completionMethod = subCommand.getCompletionMethod();

prisma wave
#

so subCommand is null

obtuse gale
#

but why lol

frigid badge
#

find out

obtuse gale
#

sounds like a job for matt fingerguns

#

nope im just dumb

prisma wave
#

smh

obtuse gale
#
    fun deleteWorld() =
            Bukkit.getWorldContainer().resolve("mapgames").delete()``` this no work 😦
prisma wave
#

don't you have to unload it first?

#

Check docs

hot hull
#

MaGiC vAlUeS eee

obtuse gale
#

this didnt work either

#
    fun deleteWorld(){
        Bukkit.unloadWorld("mapgames", false)
        Bukkit.getWorldContainer().resolve("mapgames").delete()
    }```
steel heart
#

@steel heart
That annotation just tells the IDE that that interface is supposed to be a functional interface and thus should only contain exactly one function to be implemented
@old wyvern I’m aware of that but else there is no other functionality of the annotation

#

?

prisma wave
#

You can convert any interface with 1 method to a lambda

#

The annotation isn't necessary

steel heart
#

Yeah exactly

#

But someone said to me @FunctionalInterface is for reflection?

prisma wave
#

Don't think so

steel heart
#

Hmm okay

frigid badge
#

sure a library might use reflection with the annotation

#

but it's only default use is just to show it's a functional interface and shouldn't have more than 1 method

steel heart
#

Yeah, so mainly to explicitly tell anyone it’s a functional interface

old wyvern
#

mhm

obtuse gale
#
    fun deleteWorld(){
        Bukkit.unloadWorld("mapgames", false)
        Bukkit.getWorld("mapgames")?.worldFolder?.delete()
    }
``` rEE this no work 😢 😢 🤣 😦 😦
#

Turns out delete doesnt work on folders :/

#
    fun deleteWorld() {
        val world = Bukkit.getWorld("mapgames")
        if(world == null){
            "shit".debug()
            return
        }
        world.worldFolder.deleteRecursively()
    }``` this should work but it doesnt ![thonking](https://cdn.discordapp.com/emojis/379541184697204736.webp?size=128 "thonking")
hot hull
#

What would make the most sense to use for statistics and a building menu,

I was thinking of having a normal menu for statistics where the user could freely interact with them, and the having a book which would list all the unlocked "blueprints" as well as show the locked ones and their required cost. Then once you'd select a blueprint it would give you a map with an image of the blueprint which you could then somehow place down (if you had all the required materials, still not sure how that would work but it's still far away)

#

Open for ideas reversed_fingerguns

heady birch
#

Statistic<T>

#

Whats the problem

hot hull
#

Niall imma smack your 4head

heady birch
#

When you dont give us a stacktrace how can we help?

hot hull
#

Bruh not this shit again

cyan sleet
#

how do i transfer %player_server% to the server expansion?

hot hull
#

You can't

cyan sleet
#

then why doesnt %player_server% work?

hot hull
#

Do you have the player expansion installed?

cyan sleet
#

yes

hot hull
prisma wave
#

I pinged you in #dev-general since this isn't the right channel

#

@cyan sleet

hot hull
#

What would make the most sense to use for statistics and a building menu,

I was thinking of having a normal menu for statistics where the user could freely interact with them, and the having a book which would list all the unlocked "blueprints" as well as show the locked ones and their required cost. Then once you'd select a blueprint it would give you a map with an image of the blueprint which you could then somehow place down (if you had all the required materials, still not sure how that would work but it's still far away)
Since chat got flooded with nonsense

oak coyote
#

So what kind of layout for a the GUIs

hot hull
oak coyote
#

A way I’d do it would be to split the blueprints up into generalised categories (themes, sizes) and have it so you can freely click them to gain the placeholder items of the blueprints

hot hull
#

Basically a preview or?

oak coyote
#

Yeah the placeholder would be the preview

#

So a map works perfectly

hot hull
#

You can't force a block to have a different texture (even if it's another blocks texture) without a RP right?

#

Cause I was thinking that when you'd place the blueprint down it would build it with lime glass

#

So you could see if it suits the location, and then if you have all the materials you could build it

oak coyote
#

You could use the player ghost block feature forgot what the method is

#

But it just shows up blocks for one player

hot hull
#

Well but stairs would be cucked, cause you couldn't see if it was built or not

oak coyote
#

Just have a action bar telling them it’s a preview?

#

And if they try and break a block or something you could also display that message

distant sun
#

is basically the default Material Oceanic theme

obtuse gale
#

just doesnt like stuff that starts with i lol

distant sun
#

😡

obtuse gale
#

welp

#

looks like I cant make a world delete?

distant sun
#

Dont you have to unload it?

obtuse gale
distant sun
#

Guess you will have to use schematics or smth

obtuse gale
#

I mean I dont necessarily need to delete the world

#

lol Bukkit.unloadWorld worked

#

¯_(ツ)_/¯

#

If im making a plugin that has multiple games should I have like an interface for game or something? I dont think ive ever used an interface/abstract class in a plugin before lol

heady birch
#

Probably yeah

obtuse gale
#

What would that consist of?

heady birch
#

interface Game {

#

maybe

#

void start

#

void end

#

}

obtuse gale
#

alright

#

also can data classes not have varargs?

heady birch
#

No idea

#

What is the var arg type?

obtuse gale
#

String

#

¯_(ツ)_/¯

#

doesnt matter I guess lol

heady birch
#

Aren't you working on spring projects 😦 ?

obtuse gale
#

naaa

hot hull
#

@oak coyote Trynna recreate something with this, so trynna follow the mechanics, otherwise that'd be good yea

obtuse gale
#

How would you guys handle the arenas and their location in relevancy to the game

#

Like if the arena is say a 3x3 box (not for every game, size varies), how would you connect that to the game

distant sun
#

Wdym?

obtuse gale
#

im confusing myself here lol

#

Cos im tryna keep things as general as possible since im gonna have multiple game implementations

#

So

heady birch
#

Can a game have multiple arenas?

obtuse gale
#

No, but there will be multiple games going at once

heady birch
#

I see

#

I would say keep arenas seperatley

#

I think it makes sense for the Arena to reference the Game

#

Arena.startGame(Game game);

obtuse gale
#

right

#

then in the games start method I need access to the arena tho

#

Since the game has stuff like player interact event, and I need to get the location of that, and get the game based off the location

#

oh wait

#

I can just get it from the player cant I

#

would you maybe have this has the game start method or is this a weird way to do it?

#
interface Game {
    fun start(playerOne:Player, playerTwo:Player)```
#

actually wait that doesnt make sense

#

im confusing myself more now lol

heady birch
#

class Game {
void start(final Arena arena) {
//do some stuff
}
}

#

Game sounds like it should be stateful maybe

#

As in have a lifetime the same as the game duration

#

Instead of existing through multiple games

#

new DuelGame(playerOne, playerTwo).start(arenaOne);

obtuse gale
#

wdym

#

hm

heady birch
#

Perhaps

#

I wouldn't worry about it too much it will only slow you down

remote goblet
#

You ever look at java and think

#

damn u suck

heady birch
#

Nope

#

Although that is kinda neat

distant sun
#

Map.of exist on java 9 I believe

obtuse gale
#

Can I make a kotlin extension that like overrides the normal method but changes it? for example

#
fun Player.sendMessage(text:String){
  // Do something to the message
  this.sendMessage(editedMessage)
}```
heady birch
#

Yes

high violet
#

What does the fun type do in Kotlin?

distant sun
#

Method

high violet
#

no return type?

distant sun
#

the return type is specified after the ()

#

fun toString(): String {}

high violet
#

oh ait

heady birch
#

fn to_string() -> String {}

wispy abyss
#

java devs: man im so proud of my work of java art

kotlin devs in the background: java man, java man

heady birch
#

Rust users:

distant sun
#

Who?

obtuse gale
#

If I have an enum whats the best way to store the type of game it should be?

#

Like I want the enum to hold the game type, and from that type I can make a new instance of the class that implements Game

wispy abyss
#

In that case, Make an enum with all the game types

And pass that enum to the constructor for that class

distant sun
#

Supplier<? extends Game>?

heady birch
#

pub enum Game {
GameTypeOne {

 }

}

wispy abyss
#

^ probably better (above that one)

obtuse gale
#

tf is a supplier

heady birch
#

it supllies

heady birch
#

class GameType {
TYPE (YourGameImplementation::new)
}

obtuse gale
#

:what:

#

whats that in kotlin lol

#

or is that rust

#

or what

#

now im confused lol

distant sun
#

Java

#

Supplier use lambda

obtuse gale
#

also tf is ? extends Game in kotlin, wouldnt it be like <idk : Game> or something liek that?

distant sun
wispy abyss
#

also, @obtuse gale , what is this for anyway?

obtuse gale
#

im making like a game plugin thing

#

and im confusing myslef

#

so this works

#

val game:Supplier<out Game> but it also works with in not out, whats the difference?'

wispy abyss
#

no, like, what game types are there

#

and whats the game class's purpose?

obtuse gale
#

only tic tac toe atm, and I havent even started making the game itself

wispy abyss
#

just to supply generic methods (like player maxes, etc.)

obtuse gale
#

Game is an interface that has a prepare() method and start() method

#

YourGameImplementation::new whats this in kotlin lol

distant sun
#

kotlin doesnt have method refference?

obtuse gale
#

probably does but YourGameImplementation::new aint working

distant sun
#

that's the alternative for () -> new ClassName()

wispy abyss
#

If anything, just dont make an enum

#

and just make different classes per game

obtuse gale
#

I have that

wispy abyss
#

unless theres a specific purpose for the enum

obtuse gale
#

the enum just contains basic information about the game,

wispy abyss
#

i would just use is/instanceof (wait are you writing it in kotlin or java?)

obtuse gale
#

kot

wispy abyss
#

k

heady birch
#

basic information

wispy abyss
#

metadata?

obtuse gale
#

that's the alternative for () -> new ClassName()
lol I never went that far in java to know what that was

distant sun
#

method refference, usually used when the method has all params provided by the lambda in the right order

#

(name, age) -> new Person(name, age) can be replaced by Person::new

obtuse gale
#

Imma just copy & paste do this in java, then get IJ to convert it for me lol

wispy abyss
#

Java --> Kotlin is decently good

#

but the cleanup isnt worth it if you're tryna initially make it in kotlin

obtuse gale
#

Wait are we tryna use a consumer or a Supplier lol

#

Cos I typed this

enum Test{
    ONE(GameImpl::new);
    
}``` and IJs consuctor generated a consumer lol
#

oh wait

#

nope ignore me

distant sun
#

well, use a consumer if you need to pass a value 🤷

obtuse gale
#

welp

#

it was thsi

#

Supplier<Game> { TicTacToe() }

heady birch
#

GameTypeRegistry {
Map<String, GameType<?>>
}

GameType<T> {
String getName();
String getDescription();
GameFactory<T> getFactory();
}

GameFactory<T extends Game> {
T create();
}

ocean quartz
#

@obtuse gale Show your code

obtuse gale
#

fixed it :))

#

It was just me being dumb and not putting a @Default command lol, if this is in reference to the npe from earlier

ocean quartz
#

Yeah

distant sun
#

so kotlin doesn't use equals() ?

heady birch
#

No it uses ==

distant sun
#

noice

frigid badge
#

====

prisma wave
#

Ok real talk here (no circlejerking)

If I wanted to make my own calculator (hypothetically ofc), would Rust be a good option? Or would C / something else be better

#

Like an actual physical calculator running on a Pi or something

frigid badge
#

asm boi

prisma wave
#

Supplier<Game> { TicTacToe() }
@obtuse gale ::TicTacToe

obtuse gale
#

o

prisma wave
#

@frigid badge sounds scary

frigid badge
#

yes but also fun

prisma wave
#

Scary tho

#

Wouldn't maintaining something big in ASM be very difficult?

frigid badge
#

something big wouldn't be made in asm

#

maybe parts of it would if it were critical

#

but otherwise I'd all just be c

onyx loom
#

java

prisma wave
#

isn't Rust theoretically as fast as C?

#

but slightly nicer to use

onyx loom
#

i remember someone saying that yea

frigid badge
#

rust excels at certain stuff and so does c

#

but I'd compare c++ with rust rather than c

prisma wave
#

true

#

but aren't they all pretty much the same in terms of speed?

frigid badge
#

afaik yeah

#

it just depends on what you write I'd suppose

#

but that's for every language really

#

but I'm by no means an expert in, c, c++ or rust

#

so your best bet is googling the stuff for factual data.

heady birch
#

Ok real talk here (no circlejerking)

If I wanted to make my own calculator (hypothetically ofc), would Rust be a good option? Or would C / something else be better
Oh look

#

After all those months of saying rust is bad

#

Ironic

#

😅

frigid badge
#

lmao

onyx loom
#

unless im missing an obvious point here, i dont see the need to compare performance from languages that compile, theyre all gonna be fast enough, especially for the program u wanna make

heady birch
#

Depends on compiler

frigid badge
#

and what you compile to

onyx loom
#

yea obvious exception being java

frigid badge
#

java is a compiled language too

heady birch
#

Well the last point is true

frigid badge
#

so is c# etc

heady birch
#

True but

#

Machine code compiled, I dont know the proper term for that?

#

Native?

prisma wave
#

Yea

heady birch
#

Id love to write something in assembly one day

onyx loom
#

lemmo knows assembly iirc

heady birch
#

So cool

prisma wave
#

unless im missing an obvious point here, i dont see the need to compare performance from languages that compile, theyre all gonna be fast enough, especially for the program u wanna make
@onyx loom for something like this though you need every optimisation you can get

heady birch
#

Like I bet JIT cant optimize any of those stupid .map.filter.collect functional things

#

ColdSpot

prisma wave
#

Lol

#

They're inlined

astral quiver
#

So, lets try do be a app manager at the Senior

#

that knows kotlin

#

They done a inspection

#

and I fail with this message: "Must use Java"

#

That do you folks think about that?

onyx loom
#

🤮

#

disgusting behaviour

astral quiver
#

The problem is that they don't have a application manager that knows Kotlin

#

I'm appling that help, but, who knows if they will accept me

heady birch
#

Or just switch to rust 🙂

astral quiver
#

I like rust

#

But I don't use C or C++

#

In this case....

#

I really want to try a little of Goroutines

#

I want to know the different that does when the Runtime it self uses green threads

prisma wave
#

Goroutines ez

astral quiver
#

@prisma wave do you know the benefits from Goroutines vs Coroutines from Kotlin?

prisma wave
#

Goroutines are simpler

white fable
#

where can i get help with the plugin?

prisma wave
#

what plugin

white fable
#

DeluxeMenu

ocean quartz
white fable
#

thx

astral quiver
#

@prisma wave do you mean the use of Goroutines, right?

#

because they don't have blue/red functions

prisma wave
#

Yeah

empty flint
#

@quiet depot So I've configured a root project that has my lib and my plugin projects imported as independent modules. When I edit the lib that is used as a dependency by the plugin and re-build the root project, IntelliJ recognizes there are changed classes and lets me reload them at runtime using the hotswap agent. The agent says the hotswap is successful but in the execution, nothing actually changes. It seems so close to working but it won't work after all.

This is the only clue in the console when the hotswap happens:
[17:08:16] [JDWP Transport Listener: dt_socket/INFO]: HOTSWAP AGENT: 17:08:16.368 RELOAD (org.hotswap.agent.plugin.jvm.AnonymousClassPatchPlugin) - Class 'me/blocky/core/plugin/command/BlockyCommand' has been enhanced with anonymous classes for hotswap.

Got any ideas?

frigid badge
#

are you shading/relocating by any chance?

empty flint
#

No I disabled all the shading

high violet
#

Sorry for sending it here, but is someone experienced enough to help me make a spigot plugin?

#

Like, not code wise

#

But since i am new to releasing my stuff on spigot, i won't mind someone with experience teaming up with me to release some stuff

#

I'm fine with whatever

#

just to get the hang of it

prisma wave
#

what

high violet
#

what indeed

#

Like, i know i am asking something unreasonable

#

But i was looking for someone to develop and release a plugin on spigot, to understand how the deploy process works

old wyvern
high violet
#

ait

surreal quarry
#

@high violet just create a new resource and upload the jar then like add a description if you want

hot hull
#

@high violet It gives you all the info you need when clicking Post Resource or whatever the button is called

high violet
#

Ait

#

was also interested if any specific code is needed in the plugin for like, update and stuff

#

If someone has any links feel free to share them

hot hull
#

Update checkers are annoying af, don't be that guy reversed_fingerguns

high violet
#

I'm awful at programming so my stuff will be full of bugs 🙃

#

So >bugfix

#

bugfix

#

bugfix

hot hull
#

I mean OS usually helps with this since others can give you advice on what to improve

obtuse gale
#

Update checkers are annoying af, don't be that guy reversed_fingerguns
Update checkers are okay, auto updaters on the other hand....... don't.. just don't auto update

#

It shouldn't exist

hot hull
#

Nah update checkers are doodoo as well, especially when they make it so they don't run async, and you can't disable them, that's just ew in every way

obtuse gale
#

Well I mean if it's worst case scenario yes of course

#

But make it show in console every once in a while, async and a setting for it to not run

#

Like Vault basically lol

hot hull
#

Lowkey if the user isn't willing to check spigot atleast once a week that's just sad

obtuse gale
#

I rely on spigot/dbo sending me an email for updates lol

hot hull
#

Jesus

ocean quartz
#

Nah update checkers are doodoo as well, especially when they make it so they don't run async, and you can't disable them, that's just ew in every way
I mean that's on the dev, the dev is doodooo not update checkers themselves, those are fine if you make them well

hot hull
#

Well yea, but you know what I mean Matt, it is spigot afterall

obtuse gale
#

Jesus
Hey it's been working perfectly for my needs ¯_(ツ)_/¯

high violet
#

I mean, even Microsoft uses auto updates for Windows

obtuse gale
#

I can get behind auto updates for security updates, but brah windows be like download 10GB of "cumulative updates" and I'll never know what the fook they bring

old wyvern
#

RandomPlugin Security Patch KLMN45689. Restart to complete auto update.

#

Do it

heady birch
#

If I ever make auto updates I'm going to make sure it kicks everyone on the server and doesnt let them on for the next hour

#

Just to fix a typo 🙂

ocean quartz
#

I mean, even Microsoft uses auto updates for Windows
You're comparing a huge company with a small dev, you choose who's more trustworthy lol

hot hull
#

The smaller dev reversed_fingerguns

distant sun
#

You're comparing a huge company with a small dev, you choose who's more trustworthy lol
matt

ocean quartz
#

Me

#

Ghost pinging huh

hot hull
#

I agree with that

#

Bruh I got so good ideas for a plugin I'm working on, but don't got time cuz I gotta study, fuck school sad_fingerguns

jovial warren
#

on Windows for the first time in ages lol

#

(had to setup dual booting because of Roblox lol)

prisma wave
#

Roblox

#

Why

jovial warren
#

because Roblox doesn't support Linux any more

#

and Roblox has games that are actually half decent believe it or not

#

it's so weird being on Windows though after getting used to AL for some time

prisma wave
#

I guess I shouldn't judge since we're all Minecraft Devs

#

But like

#

Roblox

onyx loom
#

roblox thonking

old wyvern
#

ew

hot hull
#

What makes sense in a way that a user can view their statistics (health, stamina, etc), a normal ass menu or anyone got any fancy ideas?

old wyvern
#

yea a single row gui I guess

hot hull
#

There's 11 stats

old wyvern
#

paginated?

#

Or I guess just 2 rows

hot hull
#

That'd look hella odd imo

old wyvern
#

But I feel like singlular row would look fancier

hot hull
#

Would a book make sense, or perhaps even a map which has drawn shit on it?

old wyvern
#

Yea I guess map works

hot hull
#

Could perhaps do bossbar with symbols, but that could get confused as hell

pastel imp
#

yo just to clarify... you can't use bukkit/spigot/paper plugins in modpack servers using sponge (or anything else) right? You gotta learn & use the (for ex.) sponge api.. right?

hot hull
#

Indeed

ocean quartz
#

Let's make a sponge plugin to run spigot ones fingerguns

onyx loom
#

🤔

distant sun
#
enum class RobotType(private val texture: String, val displayName: String) {

    MONEY(
        "aaa",
        "Money"
    ),

    TOKENS(
        "bbb",
        "Tokens"
    )
}```
How do I add a `skull: ItemStack` variable here? It will be generated using the texture of each enum entry
prisma wave
#

val skull: ItemStack = blah?

#

in the body*

distant sun
#

ah, you need a semicolon

prisma wave
#

yea

distant sun
#

@ocean quartz SEE!!! COLI WAS NOT WORTHLESS

onyx loom
#

but coli dead 🙂

distant sun
#

fu too

#

@prisma wave can I do more stuff on the elvis operator right side or only one thing like "return"

prisma wave
#

1 expression

distant sun
#

aight

prisma wave
#

or a return statement

distant sun
#

ye figured I don't need more than 1

prisma wave
#

you can use ```
run {
}

#

ok

distant sun
#

and return is enough

#

what's so bad about !!

prisma wave
#

You should never be hardcoding an NPE into your code

#

in kotlin or java

#

Personally the only time I consider it acceptable to use is if it will never be null, but the compiler can't tell

distant sun
#

I use it here

val skull: ItemStack = ItemBuilder.from(XMaterial.PLAYER_HEAD.parseItem()!!).setSkullTexture(texture).build()```
prisma wave
#

hmmm

#

questionable

distant sun
#

why

prisma wave
#

parseItem is nullable for a reason?

#

although actually I guess every version has PLAYER_HEAD

distant sun
#

yes it is nullable

#

is for a private project so I dont worry about 1.7 or whatever

prisma wave
#

I guess that's fine then

ocean quartz
#

@distant sun COLI HAS USES BUT NOT WHERE YOU WANTED!

distant sun
#

😡

hot hull
#

Coli?

onyx loom
#

coli bad

#

dw about it 🌝

hot hull
#

Ok

ocean quartz
#

It's a semicolon Frosty

distant sun
#

anybody got some code to set the facing direction of an entity based of the direction of a player, but only on N S E W and not NE / NW / SE / SW

hot hull
#

@ocean quartz oh..

obtuse gale
#

Just / 90? @distant sun

heady birch
#

Anyone interested in a web-based ticketing system

obtuse gale
#

No

#

No one

heady birch
#

Ok

distant sun
#

will leave it for now fehfo

#

can you override functions using extensions in kt?

#

I want my own Location#serialize / Location#deserialize

prisma wave
#

nope

#

member functions always take higher priority

distant sun
#

😦

prisma wave
#

just use a different name?

distant sun
#

yea

onyx loom
#

gonna have to name it Location#lolnicetryiloveobfuscation now

lavish notch
#

@prisma wave is Elara an actual language now?

surreal quarry
#

in kotlin if i have something like event: Class<out Event>, as a method parameter is there a way to get the exact type of event provided?

distant sun
#

event is x ?

surreal quarry
#

event can be any event the user provides

#

its for an event waiter im trying to make

distant sun
#

well yea but I don't think you can check the event type in another way thonking

surreal quarry
#

so i wanna be able to do something like turn the generic event into like PlayerDeathEvent or something depending on what it is

#

or if there's a different way im open to that too. im just trying to take the event class that they are providing right now and then listen for that but i need to get an exact event not a generic one from that parameter

surreal quarry
#

nvm figured it out

distant sun
#

show us

ocean quartz
#

@frigid badge Do you by any chance know anything about jFrog artifactory?
got it working

surreal quarry
#

i think i need to make it blocking somehow maybe with coroutines but thats next

#

but the idea is you can handle your events inside commands without making a list of players that are waiting and cooldowns and such

distant sun
#

Interesting

surreal quarry
#

my intellij is building things fine with gradle, but in files where i use my dependencies, it says they don't exist. they are in the jar, and i've never been more confused

#

ive restarted intellij, my pc, invalidated caches, etc

#

anyone have any ideas?

fading drift
#

why does this happen when i press tab

#

@org.bukkit.event.EventHandler

#

im trying to do @EventHandler

half harness
#

.. well rip James

surreal quarry
#

you have another EventHandler imported

#

check your imports

fading drift
#

ah ur right

surreal quarry
#

lmao dkim
im literally so confused. i've never seen something build before while having visual errors about the thing not existing in intellij

half harness
#

^ lol I don't understand any of that code 😛

onyx loom
#

lol thats so weird james

surreal quarry
#

yea its really annoying lmao

#

i might ask stackoverflow and see if they know

#

but i also will probably get told im stupid

onyx loom
#

good ol' stackoverflow

half harness
#

I know i've asked this before, but where do I get these? (I'll bookmark the site this time 🙂 )

surreal quarry
half harness
#

ah thanks!

surreal quarry
#

thats where i get mine

half harness
#

ye thats what someone told me earlier on this discord server

#

hmmm

#

flat vs plastic

#

xD

fading drift
#

why

#

Error:(15,55) java: incompatible types: net.neednot.listeners.Dupe cannot be converted to org.bukkit.event.Listener

#

getServer().getPluginManager().registerEvents(new Dupe(), this);

#

im making a dupe plugin

surreal quarry
#

does Dupe implement Listener

fading drift
#

bruh

#

i made it implement eventhandler

surreal quarry
#

lol

onyx loom
#

lol

fading drift
#

why do i make plugins

#

i took a 1 month break

surreal quarry
#
class DupeListener implements EventHandler {
  @Listener
  public void onEvent(SomeEvent e) {
    System.out.println("I am professional programmore");
  }
}```
#

:)

onyx loom
surreal quarry
ocean quartz
#

Lmao you got it the way around implementing EventHandler and annotating Listener xD

surreal quarry
#

i made it implement eventhandler

#

was making a joke about that

#

lol

ocean quartz
#

Oh didn't read everything xD

surreal quarry
#

lmao

obtuse gale
#

Now to work out how to connect arenas to games

#

Since each arena is a different sized cube

#

I could try and store the bottom left & top right co ord I guess....

#

or I could just store the size and the centre block

fluid walrus
#

guys

#

ny friend

#

said they have mc server

#

with no paper

#

and iasked what

#

and they said custom server jar

#

can you do that xd

obtuse gale
#

I mean yeah?

#

Why not

fluid walrus
#

but like

#

what is there to imporve

#

that paper devs havent already?

#

they said all this

obtuse gale
#

Then yeah that lol

fluid walrus
#

bruh

#

why wouldnt devs have already done this? with apper?

ocean quartz
#

All of those are already on paper/tuinity lol

#

Most (if not all) of the custom server jars people sell are nothing special compared to paper

fluid walrus
#

hm

#

i see

regal gale
#

After all, they are open-sourced

ocean quartz
#

If they are so much better than paper, might as well PR it

fading drift
#

how can i detect when a player is in an inventory such as a chest or their own
i need to to determine if the player dropped an item using Q or threw it out of their inventory or chest or whatever

ocean quartz
#

First one, when they click on the inventory you can check if it's player inventory or chest and things like that
Second, i don't think you can, i could be wrong but i don't think so

fading drift
#

yeah so im going to use knowing if their in an inventory to know what kind of drop it is

#

what even is it for the inventories

fading drift
#

how can i check the slot an item was dropped from

#

that would fix it

hot hull
#

The event gives you all the required info

fading drift
#

is the item slot a thing?

#

or am i wishing for too much

hot hull
#

Well have you checked the events methods?

fluid walrus
#

Er

#

What is best fork of Bungee

fading drift
#

@hot hull i can't find anything about it

ocean quartz
#

@fluid walrus None, use Velocity instead

fading drift
#

i dont know how hard it would be to check which slot the item came from

#

i could just do a check to see if the hand and slot are equal and boom problem solved

fluid walrus
#

?

#

U sure

#

If u say so

obtuse gale
#

So with my game plugin, each game is gonna have an arena, how can I make it so that each class that implements Game has to have an arena? Can I just make a val in the interface? Is that how it works lol?

ocean quartz
#
interface Game {

  val arena: Arena  

}

Now it's forced to implement it and can't be null

obtuse gale
#

actually

#

mm, I was thinking of just having the arena size in teh class, and then the class that handles the game can handle making the arena and stuff

#
interface Game {
    val arenaSize: Int
    fun start(playerOne: Player, playerTwo: Player)
    fun prepareArena()
}```
#

its just handling the arenas location that im unsure about, since each arena is a different size

#

Whats the best way to determine where the arena goes? Each should be like 100 blocks away from the last

hot hull
#

Aj, your spacing :((

obtuse gale
#

better?

#

, its just I am unsure what the best way to go about spacing them is, they probably need to be like 100 blocks apart, so whats the best way to space them out? Obviously I could just add like 100 to a location for every arena but then its just gonna be a straight line, and id rather its like a grid kinda thing...

#

I mean I doubt it will ever get to that scale so idk if its worth it

#

I could just do somethbing like this and screw having a grid system

#
    private val lastLocation = Location(Bukkit.getWorld("minigames"), 0.0, 0.0, 0.0)
    fun getNextLocation():Location{
        val loc = lastLocation
        lastLocation.add(100.0, 0.0, 100.0)
        return loc
    }```
That would probably make it like

X
X
X
X``` Id prefer if it was

X X X X
X X X X 
X X X X``` But I mean I guess eithers fine, I dont think it will ever get to the scale where it will become an issue....
#

imma just do a straight line

#

she'll be right

prisma wave
#

@prisma wave is Elara an actual language now?
@lavish notch not exactly but kind of

#

It doesn't run yet but it's like 50% ready

lavish notch
#

what's it based off?

obtuse gale
#

assembly

prisma wave
#

In terms of what?

#

The lexer, parser, etc are written in Go if that's what you mean

heady birch
#

String builder

obtuse gale
#

why is x & z always 0 even when arenaAmount

#
    private var arenaAmount = 0
    private val x = 100 * (arenaAmount % 50).toDouble()
    private val z = 100 * (arenaAmount / 50).toDouble()```
#

even when arenaAmount goes up they are still both 0

prisma wave
#

because the value never changes

#

Use a getter

#

get() = blah

obtuse gale
#

ohh

#

right

#

how come this always makes one at 0 100 0 then

#
class ArenaManager {
    private var arenaAmount = 0
    private val x
        get() = 100.0 * (arenaAmount % 50.0)
    private val z
        get() = 100.0 * (arenaAmount / 50.0)
    private val location
        get() =  Location(Bukkit.getWorld("mapgames"), x, 100.0, z)

    fun createArena(game: Game) {
        x.debug()
        z.debug()
        arenaAmount.debug()
        ArenaCreator.createHollowCube(location, game.arenaSize, game.material)
        arenaAmount++
    }
}```
#

it doesnt print 0 0 0 tho

old wyvern
#

Whats the output?

obtuse gale
#

First time its called its
0.0
0.0
0
Second time its
100.0
2.0
1
Third time its
200.0
4.0
2

#

imma try a different approach other than this random guys code lol

old wyvern
#

Thats seems to be right?

obtuse gale
#

yeah but the location is always 0.0 100 0.0

old wyvern
#

Have you tried printing it out in the same place?

obtuse gale
#

hold up

#

bruh

old wyvern
#

yea?

remote goblet
#

You know

#

i may of found an Island.java worse than mine

obtuse gale
#

The arenas were always being placed in the right spots.... I just had this hard coded in

#

playerOne.teleport(Location(Bukkit.getWorld("mapgames"), 0.0, 100.0, 0.0))

old wyvern
#

link to yours ori?

#

gg

#

lmao

remote goblet
#

absolute trash

#

1k lines long and uses lombok

old wyvern
#

M8

#

why tf do you have getters and setters in kotlin

#

😂

#

oh wait nvm

#

actually yea

#

xD

remote goblet
#

Listen

#

That's all deleted now

#

Also it was in Java

#

then i just ctrl + alt + shift + k it

#

and got it in kotlin

old wyvern
#

It should normally convert them to properties

remote goblet
heady birch
#

😕

#

How did you do this

obtuse gale
#

imagine using github white theme

heady birch
#

https://github-readme-stats.vercel.app/api?username=oribuin&show_icons=true&theme=tokyonight

#

Nice

heady birch
#

What does A+ mean?

obtuse gale
#

Petition to integrate this into barry

heady birch
#

Yeah!

#

@pallid gale

pallid gale
#

little complicated since its not an image

#

is there a non animated image variant?

heady birch
#

Well looking at Ori's page it looks as if it's an image

#

I expect its dependent on the content type you request

obtuse gale
#

Looking for a way to fill all the walls of this cube with maps

#

except the highlighted ones, those have maps with a different pattern

#

And I only have the centre block of this cube

distant sun
#

gl😂

obtuse gale
#

yeaaaa

onyx loom
#

oh no, math

#

yeah no thanks 😂

obtuse gale
#

Actually I could probably just do it when I make the cube in the first place....

#

    fun createHollowCube(location: Location, size:Int, material: Material) {
        val firstLocation = location.clone()
        for (x in -size..size) {
            for (y in -size..size) {
                for (z in -size..size) {
                    if (abs(x) != size && abs(y) != size && abs(z) != size) continue
                    val loc = firstLocation.add(x.toDouble(), y.toDouble(), z.toDouble())
                    loc.block.type = material
                    loc.subtract(x.toDouble(), y.toDouble(), z.toDouble())
                }
            }
        }
    }```
#

This is the logic I have to make the cube...

remote goblet
#

pain

obtuse gale
#

im thinking i could do something

#

it might work and it might not

#

the corners might fuck me over :)(:

remote goblet
#

I had the genius idea of forking IridiumSkyblock and then changing the source code for someone's server im working on

#

and then I looked at iridium's source code

#

and i wanna throw up

heady birch
#

Your trying to make hollow cube?

remote goblet
heady birch
#

Personally I would do the sides instead of a full cube and continue on the hollow parts

remote goblet
obtuse gale
#

I was thinking I could maybe just check if the block relative to one side was air, then if it was set it to an itemframe, and that would cover me for one side

heady birch
#

The way your doing now probably works fine to be honest

obtuse gale
#

well how do I go about the item frames

heady birch
#

Might fare worse as the volume of the cube increases

obtuse gale
#

thasts the hard bit

heady birch
#

What do you want to do with item frames?

obtuse gale
#

put an item in them

#

I thouigth I could chuck this in teh loop and hope for the best

#
                    if(loc.block.getRelative(BlockFace.WEST).type == Material.AIR || loc.block.getRelative(BlockFace.WEST).type == Material.ITEM_FRAME){
                        "mm".debug()
                        loc.block.getRelative(BlockFace.WEST)
                    }``` and that would cover me for one side, that prints `mm` once, then throws me an `IllegalArgumentException: Cannot get data for not block ITEM_FRAME`
distant sun
#

So annoying because you have to set 3 frames in corners

#

Wont that cause lag for players if are too many?

#

Iirc banners do

obtuse gale
#

idc

distant sun
#

5 left

obtuse gale
#

3 more now

#

we got some popping off the wall as well for some reason

#

also this has gotta be the messiest code if ever typed btw

#

I did it

#

anyone prepared for the code?

#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

obtuse gale
distant sun
#

set of BlockFace ?

#
val faces = setOf(BlockFace.UP, BlockFace.DOWN, ...)

//

faces.asSequence()
    .filter { loc.bloc.getRelative(it).type == Material.AIR || loc.bloc.getRelative(it).type == Material.ITEM_FRAME }
    .forEach { spawn the frame }```
obtuse gale
#

what the fuck have I done here

heady birch
#

Woo

#

That looks kind of cool

obtuse gale
#

I filled it up with maps with no renderererererer

#

How come this works

#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

obtuse gale
high violet
#

Why are you using Kotlin

obtuse gale
#

Why are you not

high violet
#

Becuase i don't know how

#

Mind if i just yoink the code?

distant sun
#

should the yaw and pitch be 0?

#

@obtuse gale

#

don't you have to set the itemframe facing the opposite direction?

#

if the block in west is air the frame should face east I think

obtuse gale
#

how come it works without the renderer tho

#

eyy

#

got it working

#

now I just gotta work out why a shit ton of maps/itemframes spawn on the ground

frigid badge
#

damn what for minigame you making lol

distant sun
#

what have you changed?

obtuse gale
#

I just added a check

frigid badge
#

he's making heaven or smth

obtuse gale
#

if(loc.block.getRelative(it).type != Material.AIR) return@forEach

distant sun
#

:))

pallid gale
#

paint 3d

distant sun
#

how to make a greenscreen in minecraft

misty coral
#

I want to make somethink like market gui where players can sell own items, how can i save items in array or something that they stay even after server restart?

distant sun
#

base64 I guess

obtuse gale
#

Now my options are
A) Work out whats causing the items to pop off and leave a bunch of item frames/maps on the ground orrrr
B) Just kill all the item entities and be lazy

distant sun
#

A

obtuse gale
#

sounds like effort to me

high violet
#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

distant sun
misty coral
#

thanks

heady birch
#

@frigid badge General question

#

For a database

#

Is it best to use a seperate table for something simple as UserStatus

#

e.g

#

UserStatus.APPROVED

#

To be

#

user_status
id name
0 "approved'

obtuse gale
#
    fun createHollowCube(location: Location, size: Int, map: ItemStack) {
        val firstLocation = location.clone()
        val renderer = ImageRenderer.createSingleColorRenderer(Color.WHITE)
        val map = MapBuilder.create()
                .world(Bukkit.getWorld("mapgames"))
                .addRenderers(renderer)
                .build().createItemStack()
        for (x in -size..size) {
            for (y in -size..size) {
                for (z in -size..size) {
                    if (abs(x) != size && abs(y) != size && abs(z) != size) continue
                    val loc = firstLocation.add(x.toDouble(), y.toDouble(), z.toDouble())
                    loc.block.type = Material.SEA_LANTERN
                    faces.filter { loc.block.getRelative(it).type == Material.AIR }.forEach {
                        if(loc.block.getRelative(it).type != Material.AIR) return@forEach
                        location.world.spawn(loc.block.getRelative(it).location, ItemFrame::class.java) { itemFrame ->
                            itemFrame.setFacingDirection(it, false)
                            itemFrame.setItem(map)
                        }
                    }
                    loc.subtract(x.toDouble(), y.toDouble(), z.toDouble())
                }
            }
        }
    }```
#

halp this makes a crap ton of item frames/maps go onto the ground

#

how can stop

#

I also just realised my method of spawning itemframes covers the outside as well....

misty coral
#

XD

obtuse gale
#

depth perception is so weird in here....

#

like that door looks really far away but its only like 4 blocks

#
interface Game {
    val players:Pair<Player, Player>
}``` vs
```kotlin
interface Game {
  val playerOne:Player,
  val playerTwo:Player
}```
heady birch
#

That;s really clever and unique @obtuse gale

#

Never seen that before

obtuse gale
#

what?

#

the map room? Ive seen it in another discord server before lol, havent seen it used for minigames tho, I feel like it might lag some people....

heady birch
#

Alot of item frames I guess

#

But cool

remote goblet
jovial warren
#

lol

obtuse gale
#
  fun createHollowCube(location: Location, size: Int, map: ItemStack) {
        val firstLocation = location.clone()
        val renderer = ImageRenderer.createSingleColorRenderer(Color.WHITE)
        val map = MapBuilder.create()
                .world(Bukkit.getWorld("mapgames"))
                .addRenderers(renderer)
                .build().createItemStack()
        for (x in -size..size) {
            for (y in -size..size) {
                for (z in -size..size) {
                    if (abs(x) != size && abs(y) != size && abs(z) != size) continue
                    val loc = firstLocation.add(x.toDouble(), y.toDouble(), z.toDouble())
                    loc.block.type = Material.SEA_LANTERN
                    faces.filter { loc.block.getRelative(it).type == Material.AIR }.forEach {
                        if(loc.block.getRelative(it).type != Material.AIR) return@forEach
                        location.world.spawn(loc.block.getRelative(it).location, ItemFrame::class.java) { itemFrame ->
                            itemFrame.setFacingDirection(it, false)
                            itemFrame.setItem(map)
                        }
                    }
                    loc.subtract(x.toDouble(), y.toDouble(), z.toDouble())
                }
            }
        }
    }

Ive got this and it makes the cube, and fills it with maps and item frames, but it also covers the outside, and a bunch of item frames like pop off and just fall on the floor
But I suck at maths and stuff like this, anyone got any ideas how i can make it not cover the outside and make them not pop off?

distant sun
#

they are placed on the outside because you check the relatives of the wall

obtuse gale
#

right so how would I not do that lol

frigid badge
#

I just ask nicely to my code

distant sun
#

what about another loop inside the cube?

obtuse gale
#

that sounds harder

#

or could I just subtract 1 from the size

distant sun
#

hmm

#

I dont think it would be that easy since you place the frame on the wall, don't you?

obtuse gale
#

well

#

To place the itemframe you need to spawn it in since its an entity

#

Which means you need the facing direction + the location

jovial warren
#

yeah, it’s a bit like spawning a painting

obtuse gale
#

right

#

so whats my best bet?

jovial warren
#

what are you trying to do?

frigid badge
#

if the statuses are changeable sure but I'd name it either statuses or user_statuses due to convention

#

@heady birch

heady birch
#

By changeable

obtuse gale
#

what are you trying to do?
@jovial warren spawn a box of x radius around a centre block, with item frames with maps in them on the inside only

heady birch
#

Do you mean statuses may be added/removed

jovial warren
#

“statuses”
👌 top quality English xD

frigid badge
#

yes

heady birch
#

Considering spring, its alot of boiler plate

#

I dont expect it to change really

#

1 enum compared to 3 classes 😄

frigid badge
#

statusses*

#

or what is it

distant sun
#

$tatu$

heady birch
#

user_status

#

kind of implies many to many

frigid badge
#

yes hence why you wouldn't name it that lol

jovial warren
#

actually according to dictionaries, both “statuses” and just “status” are valid plurals of “status”

obtuse gale
#

I thought it was status'

heady birch
#

Pagination is fun

onyx loom
#

statii

frigid badge
#

ha so I was right all along

#

😛

heady birch
#

Proper pagination

#

None of this jquery stuff

obtuse gale
#

sooo

jovial warren
#

statii
that was one that was explicitly mentioned as being wrong

onyx loom
#

🙁

obtuse gale
#

anyone know what to do about my map/itemframe problem?

jovial warren
#

I thought it was status'
that’s literally just a contraction from “statuses”

obtuse gale
#

I think its statoos

jovial warren
#

anyone know what to do about my map/itemframe problem?
explain thy problem to me

#

I think its statoos
that’s how it’s pronounced, according to some sources, not how it’s spelt

obtuse gale
heady birch
#

Ya know spring property configurations

jovial warren
#

wdym it “covers the outside”

heady birch
#

Can you set the values programatically and expect spring to save it to file?

#

Wouldn t be suprised if its capable of that

jovial warren
#

wat niall?

obtuse gale
#

thats the outside of the 5X5 cube

#

The outside doesnt need covering

jovial warren
#

ah okay

frigid badge
#

couldn't we make new blocks by just y'know covering them with itemframes

#

;p

#

rainbow block

distant sun
#

kinda

old wyvern
#

Just use vector to check direction opposite to outside

obtuse gale
#

how would one do that lol

jovial warren
#

also, if only Kotlin had something like this for for loops: ```kotlin
for (x, y, z in -size..size)

old wyvern
#

vf - vi
center - current location

#

Is modulus of that is +

#

You are facing inwards

#

Move that direction

#

And check for air and stuff

obtuse gale
#

none of those words make sense to me....

old wyvern
#

ok one sec let me write thus down a bit more explanatively

jovial warren
#

vf-vi? you talking about final velocity - initial velocity?

old wyvern
#

final vector in this case my guy

jovial warren
#

like, that old school science equation used to calculate acceleration?

old wyvern
#

A direction vector is final positional vector - initial positional vector

#

like that old school science equation used to calculate acceleration
No that would just be relative velocity if in that context

#

Acceleration is velocity per unit time

obtuse gale
#

also like when I say some itemframes/maps pop off from somewhere, I dont mean like a few, like a get a few stacks from that

jovial warren
#

true

#

what’s the size given?

obtuse gale
#

Its varies why? ATM its just 2, but in future it will be more

#

that gives us a 5*5 inside the cube

#

actually no

#

atm its 3

jovial warren
#

no no no no no

obtuse gale
#

which gives us that internal 5X5

jovial warren
#

I know what it is

#

the z loop will loop 5 times for every time the y loop loops, which will loop 5 times for every time the x loop loops

#

meaning that inner code is ran 5x5x5=125 times

old wyvern
#

Assume center = (cx,xy,cz)

current_position = (x1,y1,z1)

trying to find inward direction:
inward_direction = (center - current_position) with sigma function applied to each coords

block_to_check = current_position + inward_direction

obtuse gale
#

the only location I have is the centre btw

#

Like I have to base the entire thing off that

old wyvern
#

What about the position you are iterating off to place the block?