#Cipher

1 messages ยท Page 2 of 1

viral escarp
#

yep i see now github just makes it look weird

#

kk ill merge

outer sail
#

this project is just growing

lethal glen
#

the line counting of alex gets a bit more complex

#

since he refactored a bit

hard ravine
#

it was by accident since something was merged while I added stuff

viral escarp
#

i assume we dont count AllTests class

hard ravine
#

i only added one line

outer sail
#

test classes are there just to verify everything works

#

no functionality

lethal glen
#

do we count package as import?

hard ravine
#

no that'd be bullshit

#

and could be easily avoided by just not using packages

lethal glen
#

so you've made 2 lines then

outer sail
#

but its cool to add we.are.project.cipher

hard ravine
#

oh well I mean, ignore the package line, don't count it

viral escarp
#

^

lethal glen
#

ah, okay

viral escarp
#

so just one line

#

looks good to me

tight rain
#

package is required there isnt really anything you can compress so it shouldnt be counted imo

viral escarp
#

yep yep

outer sail
#

but then its ugly

tight rain
#

yeah

viral escarp
#

its already ugly

tight rain
#

does it even work with bukkit

viral escarp
#

not much more beating it with the stick you can do lmfao

tight rain
#

if you dont have it in a package

outer sail
viral escarp
#

@hard ravine

lethal glen
outer sail
lethal glen
#

changed it to Tests are excluded from the above 3 rules

viral escarp
#

ruh roh

outer sail
#

lol

viral escarp
#

alex has merge conflicts

outer sail
#

with who

lethal glen
#

oh well i should've accepted the PRs first

hard ravine
#

I hadn't when I created the PR ๐Ÿ˜„

outer sail
viral escarp
#

this projects gonna have shitloads of merge conflicts lmfao

#

anytime we merge the next PR will have a conflict

outer sail
#

that's my merge conflict lmao

#

the throws exception

viral escarp
#

fuck exception handling in cipher

outer sail
#

required

#

I had to add it

#

otherwise java would complain

lethal glen
#

or you have to waste 3 lines on a try catch

viral escarp
#

javas just being a big baby

outer sail
#

but you use up 2 semicolons

viral escarp
#

^

tight rain
#

can you add like throws Throwable to functional interfaces

#

and will it work then

tight rain
#

in lambdas

outer sail
#

no

tight rain
#

bruh

viral escarp
#

gl adding functional interfaces to this project

outer sail
#

you need to add it to the method its overriding

viral escarp
#

whoever does that is gonna use 50% of theyre lines

tight rain
tight rain
#

but will it work in lambdas then

outer sail
viral escarp
outer sail
#

look at InfiniteCode in my PR and you'll see what i did

tight rain
#

then we can just add it to the infinite code executor right

#

ArgRunnable

outer sail
#

Yeah i added it there

tight rain
#

oh ok

outer sail
#

I actually realized I can do most stuff with this

#

InfiniteCode just boosted my lines by alot

#

and everyone else's

viral escarp
#

imagine someone doesnt know it exists

#

they commit

outer sail
#

F

viral escarp
#

and someone steals theyre lines

outer sail
#

LMAO

lethal glen
#

their

#

their*

#

their********

tight rain
#

where

#

or is it in the Pr

outer sail
viral escarp
tight rain
#

oh

outer sail
#

I also added in line command registration

tight rain
#

k

#

nice

outer sail
#

I am just carrying everyone

#

@lethal glen when can you merge

viral escarp
#

i think were waiting for merge conflicts to be fixed

#

unless alex is away

outer sail
#

merge conficts is a single throws exception

ember blaze
#

What should be cipher?

outer sail
#

just accept mine for my line and its fine

outer sail
#

cipher is just anything you want it to be

#

just add whatever you want

ember blaze
#

Oh okkk

#

Its a public project that everybody will work on it

#

Allr i understand

#

Thanks

outer sail
#

ye

#

35 lines max

#

so its a mess

#

but its so fun

ember blaze
#

What you can do in 35 lines?

outer sail
#

anything

#

For example

#

I extended everyone's lines count

viral escarp
#

ike addd life steal

#

in like one line

outer sail
#

yep

#

Because i made the infinite code class

#

that really helped

#

Would've taken like 15 lines

lethal glen
#

1 line per feature lol

outer sail
#

yep

#

I can now add 29 more features

viral escarp
#

optic doesnt love us

outer sail
#

I have only 29 lines left

viral escarp
#

he doesnt wanna contribute ๐Ÿ˜ฆ

outer sail
#

L

#

we have an entire team over here

#

13 people

#

working on this

#

its hilarious

viral escarp
#

has anyone like

#

actually ran this plugin lmfao

outer sail
#

no

#

I can try tho

#

do you want me to?

viral escarp
#

lets not

#

xD

#

sure

#

try it

lethal glen
#

xD

outer sail
#

kk

lethal glen
#

why cant i give this thread a description

#

"less code = faster"

outer sail
#

LMAO

viral escarp
#

i wish we could pin msgs in here

#

kinda bs

outer sail
#

my infinite code thing is pretty bad actually

viral escarp
#

discord should allow thread owners to pin stuff

lethal glen
#

your infinite code thing creates unnecessarily tons of throwaway objects

#

but hey

#

it saves lines

outer sail
#

no actually

viral escarp
#

Server TPS: 12

outer sail
#

the objects are just the return of the previous

#

meaning that if you pass null no object is created

viral escarp
#

Memory used: 6764

outer sail
#

and primitives are boxed

lethal glen
#

new challenge

#

optimize it

viral escarp
#

whats that

outer sail
#

no thanks

viral escarp
#

its already a one liner

lethal glen
#

looking over the PRs can take a bit since im at work atm

viral escarp
#

its as fast as it possibly can be

outer sail
#

Its a one liner that makes one liners

#

what more do you want

viral escarp
#

as alex's has a conflict

outer sail
#

Alex's conflict is with my exception handling

lethal glen
#

we wont merge it

outer sail
#

because gh is stupid

lethal glen
#

registerCommandh as too much semicolons

outer sail
#

nope

#

3

lethal glen
#

really?

viral escarp
#

lemme double check

lethal glen
#

its so hard to count xD

outer sail
#

yes

#

oh shit

#

there's 4

#

lemme fix that

lethal glen
#

yup 4

viral escarp
#

make sure to add

#

useless methods

#

so no one can add onto your line

outer sail
#

wdym

viral escarp
#

Bukkit.getServer(); Bukkit.getServer();

#

bam

#

3 semicolons

#

and no one can save lines for that line

lethal glen
#

at the end ;;;

viral escarp
#

they can just insert something in between

#

i mean

#

i didnt say that

#

lets ignore what i said

#

yeah ;;;

#

do that

#

:))

#

imagine md_5 commits

outer sail
#

i made it 3

#

somehow

#

with the same code

viral escarp
#

we gotta get some spigot dev to commit to this

lethal glen
#

Luziferium requested a review from Burchard36

#

now you have merge conflicts

viral escarp
#

was just about to say lmfao

#

was gonna add my review but

outer sail
#

Fixed a semicolon

lethal glen
#

also now its 3 lines

#

instead of 1

#

btw

viral escarp
#

LMAO

outer sail
#

what

#

OH

#

SHIT

#

WAIT

viral escarp
#

wait

#

what u do now

lethal glen
#

whooops merged the 3 liner

outer sail
#

no

lethal glen
#

daaaamn feel bad for you

#

anyways

outer sail
#

no you don't

lethal glen
#

my lines

outer sail
#

no

#

cipher

#

you fuck

viral escarp
#

i added my review already

outer sail
#

Dont

#

you

#

dare

viral escarp
#

prank em john

outer sail
#

wait

#

new push

#

saved an extra line kwk

#

and another one

viral escarp
#

couting lines on github web is aids

lethal glen
#

i already lost how many lines ike has

viral escarp
#

same lmfao

outer sail
#

i used 5 lines

viral escarp
#

we should have commit authors tell how many they used

lethal glen
#

so another repo for a github bot

outer sail
#

(managed to save another one)

viral escarp
#

so thats

#

25 lines left right

#

or

outer sail
#

30 lines left

viral escarp
#

ahh

outer sail
#

i am keeping track

#

5 lines used in total

viral escarp
#

follows all rules in readme.md so looks good to me

outer sail
#

wait

viral escarp
#

poor alex

#

is gonna have so many merge conflicts after this

outer sail
#

Fixed an error

#

I am literally carrying this xD

viral escarp
#

i say this looks good

#

in reality

#

its the most aids thing i ever worked on

lethal glen
#

wait for people bigbraining whole infrastructures into one line

outer sail
#

dude i already am

viral escarp
#

now make custom blocks

outer sail
#

LMAO

#

watch me

lethal glen
#

*implementing custom entity AI

outer sail
#

I can remake hypixel in one line

viral escarp
#

fuckin

#

do it

#

you wont

outer sail
#

You bet?

#

Imma first add A* pathfinding to mobs

viral escarp
#

all game modes and multiple server support

outer sail
#

Then imma move on to add bw

lethal glen
viral escarp
#

with data storage

outer sail
lethal glen
outer sail
#

all of my code

#

will be lib free

viral escarp
#

welcome to the shitshow sam

outer sail
#

Meaning 0 libs

#

apart spigot lib

#

api*

viral escarp
outer sail
#

should I

#

should I actually make smt like uh

#

uhhhhhh

#

uhhhhhhhhhhhhhhhhhhhhhhhh

#

sumo

#

yes

#

lets make sumo

viral escarp
#

remake BurchAPI in one line

outer sail
#

send me it

lethal glen
#

lets make custom armorstand mobs together

outer sail
#

lol

#

give me an idea

viral escarp
#

have fun

outer sail
#

I'll make it

lethal glen
#

wait, yk the game rappelz?

outer sail
#

no

#

This whole thing is sorta done @viral escarp

#

you just need to handle console and player yourself

lethal glen
#

remake those flying cubes

#

with animations

#

custom particle attacks n stuff

viral escarp
#

and the json data storage lib

#

and your set

outer sail
#

Give me a minute

viral escarp
#

inventory lib is gonna be hard to make a one liner

outer sail
#

Bet?

viral escarp
#

my next spigot forum post will be functional interface inventory libs

#

bet

outer sail
#

Alright

#

give me a min

viral escarp
#

have fun

outer sail
#

I want to oof you

viral escarp
lethal glen
viral escarp
#

oh shit

#

imagine second option gets more votes

#

and we have to refactor again

lethal glen
#

do we count API things like the registerCommand method as a feature?

outer sail
#

made 1 line constructor

viral escarp
#

yes

lethal glen
lethal glen
#

just like his InfiniteCode class

outer sail
#

private int size; private String displayName; public PluginInventory(int size, String displayName) throws Exception { this.size = (int)InfiniteCode.run(e -> this.displayName = displayName, e -> size); }

viral escarp
#

oh he didnt do that

hushed vortex
#

make a one line anticheat

viral escarp
#

if playerIsCheating banPlayer

lethal glen
#

its a timer and an event

#

for anti autoclicker f.e.

hushed vortex
#

just kick on join

viral escarp
#

one line anticheat would be so fast

hushed vortex
#

prevents 100% of cheaters

viral escarp
#

as its only one line ofc

outer sail
#

watch me make an ac as well

lethal glen
#

watch me make an proximity voicechat without third parties

outer sail
#

i am sorry what

lethal glen
hushed vortex
#

ok but really

#

what's to stop me contributing an onjoin kick

outer sail
#

me

lethal glen
#

Adding malicious code or software to the project in any way is prohibited.

hushed vortex
#

not malicious, just a feature obviously

lethal glen
#

yeah obv.

quaint spruce
viral escarp
#

make it a config option

#

and your good

#

default it to false

lethal glen
#

well

#

actually

outer sail
#

curr inv lib

lethal glen
#

that would bypass it

outer sail
#

now its 2 lines

#

but its useless

#

so imma focus on ac

hushed vortex
#

send gh link again

lethal glen
outer sail
#

made jesus antihack

#

only for water

#

added lava

#

@viral escarp I added anti jesus hacks LMFAO

#

1 line

hushed vortex
#

i can bypass i bet

#

what if i put code in to download another plugin jar that is much bigger

#

hehe

outer sail
#

Doing ghost hand checks

hushed vortex
#

what's that

outer sail
#

basically

#

hitting/breaking trugh blocks

hushed vortex
#

why doesn't the sever verify that already

#

dum

outer sail
#

ye

#

added whilst()

#

for easier while loops

hushed vortex
#

I learnt recently that bedrock edition verifies player movement properly

#

go to bottom of it

#

why bedrock gotta get all the cool features

feral knoll
#

oh you can specify the max amount of threads

outer sail
#

I am pushing the boundaries of what is possible

#

one line while loops with fail statement

#

I am just genius

#

@viral escarp

feral knoll
#

what is the warning

outer sail
#

That's ghost hand attack detection right there

outer sail
#

being like

#

"no this is wrong"

#

@lethal glen PR'd mine

#

gtg 1h

viral escarp
#

Gnight cipher chads

outer sail
#

helo

lethal glen
outer sail
#

shit I accidentally pushed

#

lmao

#

wasn't planned

#

gained 3 more lines

#

lets go

#

(stole 1 from @hard ravine, sorry buddy just found a better way to place stuff xD)

outer sail
#

oh

#

then how tf do i have his code

#

@lethal glen added features n stuff

#

nvm

lethal glen
#

๐Ÿ‘

outer sail
#

wasn't alex

#

it was LMB

#

i stole 1 line from LMB

#

well not stole

lethal glen
#

this will be a weird plugin

outer sail
#

just appended my stuff after to save lines

lethal glen
#

MMORPG anti cheat

outer sail
#

yes

#

with exploding eggs

#

actually

#

lemme change some stuffies

hard ravine
#

I think I'll add death chests

outer sail
#

lmao

hard ravine
#

I think I'll only need 5 lines in total lol

#

okay, it's actually 4 lines, but I haven't checked whether it works

#
public class DeathChestListener implements Listener { private final ProjectCipher main; public DeathChestListener(ProjectCipher main) { this.main = main; } @EventHandler public void onDeath(PlayerDeathEvent event) { main.run(() -> event.getEntity().getLocation().getBlock().setType(Material.AMETHYST_CLUSTER)).run(() -> event.getEntity().getLocation().getChunk().getPersistentDataContainer().set(new NamespacedKey(main,event.getEntity().getLocation().getBlockX() +"/" +event.getEntity().getLocation().getBlockY() +"/" +event.getEntity().getLocation().getBlockZ()), PersistentDataType.BYTE_ARRAY, inv2bytes(event.getDrops()))).run(() -> event.getDrops().clear());}@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) public void onHarvestDeathAmethyst(BlockBreakEvent event) { main.run(() -> bytes2inv(event.getBlock().getChunk().getPersistentDataContainer().getOrDefault(new NamespacedKey(main,event.getBlock().getX() +"/"+event.getBlock().getY()+"/"+event.getBlock().getZ()),PersistentDataType.BYTE_ARRAY,null)).forEach(item -> event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation().add(0.5,0.5,0.5),item)))
;} public static byte [] inv2bytes(final Collection<ItemStack> serializable) { try (final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); final BukkitObjectOutputStream bukkitObjectOutputStream = new BukkitObjectOutputStream(outputStream)) {for (final ItemStack t : serializable) {bukkitObjectOutputStream.writeObject(t);}return outputStream.toByteArray()
;} catch (IOException ignored) {return null;}} public static Collection<ItemStack> bytes2inv(byte[] bytes) {List < ItemStack > list = new ArrayList<>();try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes)
; BukkitObjectInputStream bukkitObjectInputStream = new BukkitObjectInputStream(inputStream)) {list.add((ItemStack) bukkitObjectInputStream.readObject());} catch (Throwable ignored) {}return list;}}
outer sail
#

also no need for that as the plugin class is a listener already

hard ravine
#

nope, I added this to the main class:

public ProjectCipher run(Runnable... runnables) { for (Runnable runnable : runnables) {runnable.run();} return this; }
outer sail
#

dude

#

I literally made that

hard ravine
#

I didn't really understand yours lol

outer sail
#

its easy as fuck

hard ravine
#

what is an ArgRunnable?

outer sail
#

A runnable that takes an input and gives an output

hard ravine
#

so it's a Function

outer sail
#

o shit

hard ravine
#

that's builtin

#

lol

#

so yeah I was confused

outer sail
#

well

#

there's a thing

#

it also handles exceptions for you

#

And that saves alot of lines

#

(just throws Exception)

#

but that saves lines

hard ravine
#

exceptions never need any ; though

#

so you can always put it in the same line

outer sail
#

try catches

hard ravine
#

yes

#

they don't need any ;

outer sail
#

they require an extra ; on some places

hard ravine
#

try { ... } catch (Throwable ignored) { }

outer sail
#

ig

#

but its fineeeeee

#

I still suggest you use InfiniteCode.run()

#

here ill gib you an example

#
InfiniteCode.run(
  empty -> getSomething(), // First argument is always null
  something -> something instanceof Something smt ? doStuff(smt) : null
); // Returns either null or the result of doStuff(smt)
#

If you have a void function you can do

#
InfiniteCode.run(
  empty -> getSomething(), // First argument is always null
  something -> something instanceof Something smt ? InfiniteCode.runVoid(() -> doStuff(smt)) : null
); // Returns null
#

And if you want while loop

#
InfiniteCode.run(
  empty -> getSomething(), // First argument is always null
  something -> something instanceof Something smt ? InfiniteCode.whilst(in -> true, in -> doStuff(smt), in -> System.out.println("FAIL")) : null
); // Returns null or (read below)

While the condition is not null, continue running
If doStuff becomes null (Break with error) it will stop and trigger the fail

#

And if you want to add a command

InfiniteCode.registerCommand("test", "test cmd", "/test", List.of("t", "tst"), in -> stuff(in[0], in[1]));
```in inside the executable is an array of objects, 0 is the command sender, 1 is the args (nested array)
#

@hard ravine

#

You can make bw in one line with that

#

Its involved

#

but possible

#

using instanceof its possible to cast stuff with a fallback value

#

which is why i use it in most places

hard ravine
#

who wrote this?

@EventHandler public void on(PlayerInteractEvent event) throws Exception {InfiniteCode.run(e -> event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK ? event.getClickedBlock() : null, block -> block != null ? InfiniteCode.run(e -> event.getClickedBlock().getLocation().distance(event.getPlayer().getLocation()), dist -> new BlockIterator(event.getClickedBlock().getLocation(), (int)dist), iter -> iter instanceof BlockIterator iterator ? InfiniteCode.whilst(condition -> iterator.hasNext() ? 1 : null, exec -> iterator.next().getLocation().getBlock().getType().isSolid() ? null : 1, fail -> InfiniteCode.runVoid(() -> event.setCancelled(true))) : null) : null);}
#

it throws exceptions all the time

outer sail
#

yes

#

Show me the exceptions

hard ravine
outer sail
#

oh its dumb me

#

lmao

#

casting double to int

#

I need to remember how to make a double to int

#

(a rounded double)

hard ravine
#

(int)

outer sail
#

yeah that's what i am doing

hard ravine
#

int myInt = (int) 5.0;

outer sail
#

it's throwing errors

hard ravine
#

it says Integer in the stack trace

outer sail
#

oh yeahhhhhhhhhh

#

its Double

hard ravine
#

oh yeah then it doesn't work

#

you have to use .doubleValue

#

to get the primitive

#

then cast that

outer sail
#

wait

#

no

#

its not

#

I am getting the output from Math.ceil

hard ravine
#

no idea, the code is too hard to read ๐Ÿ˜„

outer sail
#

Fund it!

#

it was another one

#

Fixed it

#

search for (int)dist and replace it with dist == null ? 4 : (int)Math.ceil(Double.parseDouble(dist.toString()))

#

using parseDouble as I don't know what it is

#

wait nvm

#

I am retarded

#

dist == null ? 4 : (int)Math.ceil((Double)dist)

#

fixed

#

Added configurable join/quit messages and customizable chat format

outer sail
#

I am carrying this

#

Better than brigadier imo

hushed vortex
#

Aren't you over your limit?

outer sail
#

no

#

that's just for making the command

#

I'll shrink it into 1 line

#

(All of that already fits in one line, just making it multiple so its easier to understand, ofc I'll make it 1 when I gotta commit)

hushed vortex
#

noob

#

i code in 1 line

outer sail
#

I want to watch you code that

#

in multiple lines

#

in 1 line*

hushed vortex
#

i see you are using section symbol

#

not supported anymore

outer sail
#

It is actually

#

everyone says its not

#

but it is

hushed vortex
#

paper threw it out

hard ravine
#

it works fine

outer sail
hushed vortex
#

and mojank is planning to remove it i believe

outer sail
#

the mc client still sees it

#

And this is spigot api

#

not paper

hushed vortex
#

nou

outer sail
#

ye

hard ravine
#

well although it still works, why are you using it?

hushed vortex
#

looks cleaner

outer sail
#

Too lazy to make an entire fuckin shit for it

#

It was already a challenge making the fly command

#

Let me be

hushed vortex
#

I have an appropriate meme for this

outer sail
#

project cipher IS a meme

#

also

#

should I send that ss to the paper discord

hushed vortex
outer sail
#

(he is a mod dev)

hushed vortex
#

Making mods is more fun than making spigot plugins

#

you are so free to do what you want

outer sail
#

Ye

rustic bluff
# hushed vortex

ikr literally why is that a thing, it serves practically zero purpose

outer sail
#

yeah

#

components are bad asf

hushed vortex
#

they are great if you want click messages etc

#

but i absolutely hate them if you want to use simple strings

#

1 line becomes like 10

lethal glen
#

@outer sail you really have too much time

hushed vortex
#

they are the best anticheat developer

#

and update checker developer hehe

outer sail
#

how far has my update checker fail reached

hard ravine
#

can we pls not add event handlers to the main class?

#

I don't want to have a ton of merge conflicts or whatever everytime lol. there should be one listener per function imho

#

lol I made a complete death chest function in 5 lines

#

15 ; in total

#

btw someone should add Map<String,Object> in the main class

#

we can then use that for variables

#

I'm currently abusing System.getProperties() to store strings

#

a Map<String,Object> could be used for ALL variables

outer sail
#

my friend

#

adding a separate listener takes more lines

lethal glen
#

about to add pixies n stuff

#

what fancy creatures could i implement

#

thinking of pixies and magic cubes

outer sail
#

this is becoming a full scale project

#

lmao

lethal glen
#

ike

#

implement your A* algo

#

i could use it for the mobs

outer sail
#

Yeah imma commit my commands first

hard ravine
outer sail
#

Are comments marked as lines?

outer sail
lethal glen
#

if done right its one line

outer sail
#

but what if it needs more

lethal glen
outer sail
#

then its just using even more

outer sail
#

alright

hard ravine
outer sail
#

Just uh

#

sending some mor echanges

#

btw made a line to add new commands

#

you can add as many as you want it uses 1 semicolon

hard ravine
#

btw is this allowed? ๐Ÿ˜„

    public void runCodeFromString(char semicolon, String source) {

        try {
            File root = new File(getDataFolder(), "/java");
            String className = "Class" + UUID.randomUUID();
            File sourceFile = new File(root, className + ".java");
            sourceFile.getParentFile().mkdirs();
            Files.writeString(sourceFile.toPath(), source.replace(semicolon, '\u003B'));

            JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
            compiler.run(null, null, null, sourceFile.getPath());

            URLClassLoader classLoader = URLClassLoader.newInstance(new URL[]{root.toURI().toURL()});
            Class<?> cls = Class.forName(className, true, classLoader);
            cls.newInstance();
        } catch (Throwable t) { t.printStackTrace(); }
    }
hard ravine
#

why not

outer sail
#

because it probs breaks one of the rules

hard ravine
#

which one?

outer sail
#

idk

#

but

#

@hard ravine Are you fine with moving your features to my API?

#

would save you one line

hard ravine
#

do you have an ifElse?

outer sail
#

I can add it rn

#

do you want it

hard ravine
#
    public ProjectCipher run(Runnable... runnables) { for (Runnable runnable : runnables) {(runnable == null ? new Runnable() {@Override public void run() {}} : runnable).run();} return this; } public ProjectCipher runIfElse(boolean bool, Runnable whenTrue, Runnable whenFalse) { return run(bool ? whenTrue : whenFalse); }

#

this is what I need ๐Ÿ˜„

outer sail
#

the run is already a thing

hard ravine
#

I definitely also need the ifElse thing

#

if you add that, I can remove my methods

lethal glen
#

public static Object whilst(ArgRunnable condition, ArgRunnable exec, ArgRunnable fail) throws Exception

outer sail
#

thats a while loop

#

not an if else

lethal glen
#

oh

hard ravine
#

oh btw I haven't tested my angelchest addition yet

#

maybe I should do that

outer sail
#

public static Object thisOrThat(boolean condition, ArgRunnable ifTrue, ArgRunnable ifFalse) throws Exception does that work

hard ravine
#

why not just ifElse

outer sail
#

kk

hard ravine
#

or ifThenElse

outer sail
#

public static Object ifElse(boolean condition, ArgRunnable ifTrue, ArgRunnable ifFalse) throws Exception

lethal glen
#

ifThenElse seems like an ugly name

outer sail
#

fine

#

ifElse

hard ravine
#

hm I like the name

#

if then else is exactly the three parameters

outer sail
#

yea

hard ravine
#

if(boolean) then (runnable) else (runnable)

lethal glen
#

orElse

outer sail
#

nah

lethal glen
#

ifOrElse

#

or smth like that

outer sail
#

ifOrElse implies random

lethal glen
#

how so

outer sail
#

OR

#

or is not an operation here

hard ravine
#

i think ifThenElse makes the most sense but tbh i dont care what its called

outer sail
#

or is either a or b

lethal glen
#

not really

outer sail
#

Well, I am maintaining the util class so I'll make it ifThenElse

lethal glen
#

well, i maintain the project so i will just delete all of your lines

outer sail
#

Fair point

#

you make a very valid point

hard ravine
#

then we just continue a fork

lethal glen
#

lmao

outer sail
#

ye

hard ravine
#

ProjectCipherless

#

lol

lethal glen
#

F

hard ravine
#

let's also add one class that uses a thousand semicolons but doesn't do anything

#

just in case people wonder "where are all the semicolons" we can tell them "we all moved them here"

lethal glen
#

ProjectCipherless is the successor to write code as detailed as possible

#

so there literally wont be any cipher

hard ravine
#

I thought this MIGHT work

#

I think I'll write a test that scans all files for number of semicolons per line

#

but not now

golden tinsel
#

we will need to recreate the whole java language using only methods

#

does a ; inside a string counts as ;?

outer sail
#

its a literal

#

would make it hell otherwise

#

@hard ravine You just messed up something

#

but its fine

#

I can fix it

#

@hard ravine alright so I removed your methods, fixing up the code now

hard ravine
hard ravine
#

why though? ๐Ÿ˜„

outer sail
#

you didn't use my api

#

so now i gotta convert angel chest thingy to my api

#

and its a pain

hard ravine
#

yeah I made mine so I can chain stuff

outer sail
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaa

#

Why didn't you just use my api

#

if you needed something you could've just asked

hard ravine
#

you can basically simply replace ".run(" with ", "

outer sail
#

hehe no

#

thats not how it works

#

i gotta replace it with

#

e -> InfiniteCode.runVoid(() -> previousCode)

hard ravine
#

oh yeah

split crystal
#

i wanna make something like

outer sail
#

also i made intelli structure the code better so i can read it

#

but holy fuck

#

its hard

split crystal
#

/run Bukkit.getPlayer("someone").setHealth(20);

outer sail
#

JShell

split crystal
#

that wont execute code involving any dependency

#

only JDK stuff

outer sail
#

omfg @hard ravine I wanna punch you

#

why did you make it so difficult????

hard ravine
#

where's the problem?

outer sail
#

Everywhere

#

i just think i fixed it and then bam

#

anothe rerror

hard ravine
#

"fix"?

#

you aren't "fixing" anything, nothing is broken

#

lol

#

also how is it "difficult"? I'm just chaining .run calls ๐Ÿ˜„

outer sail
#

WHAT

#

THERES AN ERROR

#

AND I DON'T KNOW HOW

#

nevermind

#

weird )

#

its changing

#

@hard ravine can you test your feature atm?

hard ravine
#

the version I committed was working fine, or what dym?

outer sail
#

miscounted your semicolons

#

nvm

#

it was counting imports

#

It should work

#

(I am not committing rn as i am trying to keep the code like it is to fix any bugs)

#

@hard ravine hurry up i gtg

hard ravine
#

now everything's broken

#

I can't mine ANY blocks anymore

outer sail
#

Didn't touch that code

#

maybe its my other code

#

wait

#

try that

hard ravine
#

now it's again throwing errors on every block break

#
[23:22:06 INFO]: mfnalex[/127.0.0.1:33744] logged in with entity id 172 at ([world]-171.03938228508608, 64.0, -33.83720793595461)
[23:22:10 ERROR]: Could not pass event BlockBreakEvent to we.are.project.cipher.Cipher v1.0.0-SNAPSHOT
java.lang.NullPointerException: Cannot invoke "we.are.project.cipher.InfiniteCode$ArgRunnable.run(Object)" because "arg" is null
        at we.are.project.cipher.InfiniteCode.run(InfiniteCode.java:13) ~[ProjectCipher-1.0.0-SNAPSHOT (1).jar:?]
        at we.are.project.cipher.InfiniteCode.ifThenElse(InfiniteCode.java:18) ~[ProjectCipher-1.0.0-SNAPSHOT (1).jar:?]
        at we.are.project.cipher.AngelChestListener.onOpenAngelChest(AngelChestListener.java:50) ~[ProjectCipher-1.0.0-SNAPSHOT (1).jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor7.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:git-Paper-274]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:629) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyBlock(ServerPlayerGameMode.java:412) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyAndAck(ServerPlayerGameMode.java:366) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:324) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1769) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:34) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:8) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-274]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-274]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
>
outer sail
#

oh fixing it lmao

#

bam

#

fixed it

hard ravine
#

yes that seems to be working

outer sail
#

less gooooooooooo

#

committing my changes

#

alright

#

so

#

sending my changes

hard ravine
#

I'm going to sleep :3 tomorrow I'll add a test that counts the semicolons per line

outer sail
#

pogger

#

tomorrow ill gain an epic amount of lines

#

anyways

#

gn ya'll

hard ravine
#

๐Ÿ˜—

outer sail
#

cya

viral escarp
#

@lethal glen

#

cipher in a nutshell

golden tinsel
#

you can simply write a script that reformat the file

#

and then you will read

hard ravine
#
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running we.are.project.cipher.BukkitTests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.933 s - in we.are.project.cipher.BukkitTests
[INFO] Running we.are.project.cipher.FileTests
[WARN] \src\main\java\we\are\project\cipher\ProjectCipher.java:34 only uses 2 semicolons, could be more.
[WARN] \src\main\java\we\are\project\cipher\InfiniteCode.java:14 only uses 1 semicolons, could be more.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s - in we.are.project.cipher.FileTests

What do you think? it's throws AssertionError for everything above 3 semicolons, and a warning for everything below 3 semicolons, unless it's the last line containing any semicolons

outer sail
#

@hard ravine your variables are conflicting with my PR

#

on that line I added another method

lethal glen
#

alright guys, lets make it a bit more clear. alex did a good start with writing his lines to his features. lets keep it like this

#

can y'all who already commit make another PR with adding his lines?

outer sail
#

kk

hard ravine
#

just wait until one PR was merged, then manually resolve the conflicts, it only takes 10 seconds ๐Ÿ˜›

viral escarp
#

sorry just came back to my pc

hard ravine
#

took me long enough lol

#

it was horribly broken at first, always saying "you're using 157 semicolons in line XY"

#

then I realized, I used sum() instead of count() on the stream counting the semicolon chars >.<

limpid bay
outer sail
#

well I do

limpid bay
#

Soo whatโ€™s the big deal

#

Just rebase yours

hard ravine
#

exactly

#

also ike your commit messages are kinda useless lol

#

DO NOT EDIT is the angelchest refactoring?

#

and why did you add something from my PR to your PR?

#

imho a pull request should always only add features and not change existing stuff, unless changing existing stuff is the only purpose of the pr

#

if you now add stuff from another PR to yours, ofc there'll be merge conflicts all the time

viral escarp
#

@lethal glen i have a great new addition to our team!

#

I think youll be very impressed!!!

hard ravine
#

WH OIS IT

viral escarp
#

he codes just like cipher

hard ravine
#

lol

viral escarp
#

he can be pr manager

feral knoll
#

lol what

hard ravine
#

the code tag fail is also nice

feral knoll
#

are you talking to a bot

viral escarp
#

we taught him to code

feral knoll
#

fun

viral escarp
#

well kinda

feral knoll
#

๐Ÿ˜‚

viral escarp
#

he just gets angry when we ask him too then writes half ass code

feral knoll
#

he has his own will

viral escarp
#

if we get a cipher discord

#

we need to add him

hushed vortex
#

that's cool

viral escarp
#

hes public too

hard ravine
#

I think I should open a few more projects

viral escarp
#

how much ram do you have

feral knoll
#

ram go brr

hard ravine
#

32 gb

#

21,2GB is in use

feral knoll
#

when i have intellij and mc open, my pc starts to lag

#

8gb ๐Ÿ˜ณ

viral escarp
#

i typically run like 4 servers z_aCRYYY

#

loook he even does async stuff

feral knoll
#

that bot is talking nonsense lol

hard ravine
feral knoll
#

he's just fun to make a conversation with lol

viral escarp
#

his grammars off

#

but hes seriously trying his best

feral knoll
#

ah yes

#

ai be like

hard ravine
viral escarp
#

LMFAAAo

#

omg im dead ๐Ÿ’€

hard ravine
#

don't die, AE api wasn't updated yet ๐Ÿ˜ฎ

viral escarp
#

its pushed

#

if i die gc will carry on

#

:))

hard ravine
#

yeah okay then you can die in peace ๐Ÿ™‚

#

if you want

viral escarp
#

sec imma try and make genai write something for cipher

hard ravine
#

I think i'll start my resource pack merging thing now

viral escarp
#

WAIT

#

HE DID IT

#

ill merge his logger library for cipher

hard ravine
#

what discord is that, I want to talk to him too

viral escarp
#

its a private one :((

hard ravine
#

๐Ÿ˜ฆ

viral escarp
#

cipher discord

#

and he can get added

#

and team him cipher

hard ravine
#

conclure left my discord today ๐Ÿ˜ข

viral escarp
#

i dont think conclure will join this on buddy

#

:((

hard ravine
#

bwt @quaint spruce where's your PR?

viral escarp
#

am i allowed to link discords in here?

#

imma add him to one of my emoji servers

hard ravine
#

why not

viral escarp
#

watch me get kicked

#

breaths in

#

ooo

#

thanks cafebabe

outer sail
feral knoll
#

my pc shut down because of my server

lethal glen
#

@viral escarp as CO lead you gotta review too

#

and you can accept PRs aswell

#

@hard ravine based on your cipherless idea: how about if the cipher project ever stands still, we make an "The Cipherless Project" in which you refactor the cipher project code in as much detail as possible, with the goal of gaining the most lines.

outer sail
#

we are gonna have a project that will just be the best mc plugin ever madee

#

essentials v2

#

every plugin in one

rustic bluff
#

@lethal glen do changes to the pom count as changes

viral escarp
#

eyes still burning ill check in a few

rustic bluff
#

only it gives things like the datafolder weird names

lethal glen
rustic bluff
#

I can fix it in mine

lethal glen
#

kk

viral escarp
#

i thinks its when i reafctored the package

#

it did that

rustic bluff
#

yeah prob

rustic bluff
#

aight there's my commit

rustic bluff
#

@viral escarp I can see you reviewing that, I've just added a patch to that pull to fix someone elses change if you wanna review that too

viral escarp
#

looking through em now

#

lmfao wtf ike added angelchests

viral escarp
#

sorry for the delay i was a bit busy today

lethal glen
#
    @EventHandler
    public void onEntityKillSpawnPixie(EntityDeathEvent event) {
    
        if(event.getEntity() instanceof Mob killed) {
            if(ThreadLocalRandom.current().nextInt() <= 5 && killed.getKiller() != null) {
                new Pixie(killed.getLocation().add(ThreadLocalRandom.current().nextDouble(2.0), Math.abs(ThreadLocalRandom.current().nextDouble(2)), ThreadLocalRandom.current().nextDouble(2.0)), killed.getKiller());
            }
        }
    }
    
    private static class Pixie {
        
        private Location location; private final Deque<Location> toGo = new ArrayDeque<>();
        public Pixie(Location loc, final LivingEntity killer) {
            this.location = loc;
            new BukkitRunnable() {
    
                @Override
                public void run() {
                    if(killer == null || killer.isDead()) { cancel(); return; }
                    
                    if(!toGo.isEmpty()) {
                        location = toGo.poll();
                        if(location.distance(killer.getLocation()) <= 0.5) {
                            location.getWorld().createExplosion(location, 5); cancel(); return;
                        }
    
                        for(double phi=0; phi<=Math.PI; phi+=Math.PI/15) {
                            for(double theta=0; theta<=2*Math.PI; theta+=Math.PI/30) {
                                location.getWorld().spawnParticle(Particle.FLAME, location, 5);
                                location.add(1.5*Math.cos(theta)*Math.sin(phi),1.5*Math.cos(phi) + 1.5,1.5*Math.sin(theta)*Math.sin(phi));
                                location.getWorld().spawnParticle(Particle.SOUL_FIRE_FLAME, location, 1);
                                location.subtract(1.5*Math.cos(theta)*Math.sin(phi), 1.5*Math.cos(phi) + 1.5, 1.5*Math.sin(theta)*Math.sin(phi));
                            }
                        }
                    }
                    
                    toGo.add(killer.getLocation());
                }
            }.runTaskTimer(ProjectCipher.getInstance(), 0, 2);
        }
    }

i already did it like a dumbass, but now gotta refactor

viral escarp
lethal glen
#

now i will

#

i guess at least

oblique shadow
#

this looks cool

#

first helper in the cipher project

viral escarp
#

@lethal glen we managed to get a mod in here my boi

oblique shadow
#

maximum of 35 lines

#

wow

viral escarp
#

optic didnt wanna join :((

lethal glen
#

im dying at this "refactoring"

oblique shadow
#

there should be a character count not line tbh

#

i can just put everything onto one line

livid depot
#

what is this

viral escarp
viral escarp
oblique shadow
#

ohhhh

#

neat

#

imma add something

viral escarp
#

character counts would of been a lot to keep track of ngl lmao

#

hell yeah

viral escarp
oblique shadow
#

tell me what to add

viral escarp
viral escarp
#

thats the beauty of it

lethal glen
#

we need a spigot post lol

viral escarp
#

not it

oblique shadow
viral escarp
#

took me like 3 days to write the one i just did for something i made

oblique shadow
#

just make sure the code isnt malicious yk

lethal glen
#

thats even a rule

viral escarp
#

me and god manually review plus ^

livid depot
#

thats great

#

do imports count

lethal glen
#

not anymore

viral escarp
#

so many features

lethal glen
#

btw burchard

#

add your lines

#

to the table

viral escarp
#

i think i used

#

3 lines correct

#

sec imma check

#

yep

lethal glen
lethal glen
#

how would y'all shorten this up
if(killer == null || killer.isDead()) { cancel(); return; }

#

nvm i dont have to

#

nvmยฒ, i have to

oblique shadow
#

did you really just superscript in discord

lethal glen
#

i just did

#

btw many errors when clicking a block

viral escarp
#

i didnt do anything with blocks

#

i know one person did something with interact event

rustic bluff
#

theres 2 interact listeners in the project, whats the error?

hard ravine
hard ravine
hard ravine
#

Also @viral escarp How were you able to commit a 4 semicolons line?

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running we.are.project.cipher.BukkitTests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.949 s - in we.are.project.cipher.BukkitTests
[INFO] Running we.are.project.cipher.FileTests
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.015 s <<< FAILURE! - in we.are.project.cipher.FileTests
[ERROR] we.are.project.cipher.FileTests.countSemicolons  Time elapsed: 0.005 s  <<< FAILURE!
java.lang.AssertionError: \src\main\java\we\are\project\cipher\ProjectCipher.java:43 contains 4 semicolons
    at we.are.project.cipher.FileTests.countSemicolons(FileTests.java:61)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   FileTests.countSemicolons:61 \src\main\java\we\are\project\cipher\ProjectCipher.java:43 contains 4 semicolons
[INFO] 
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
viral escarp
#

you sure thats my commit?

#
  • it was added before unit tests
hard ravine
#

yes

#

I linked the commit above

viral escarp
#

over half of that

#

isnt my commit

#

idk why its considered mine

hard ravine
#

oh

#

my bad

#

sorry

viral escarp
#

only this part is

#

the TNT stuff is uhmm

hard ravine
#

Who tf is MachoPiggies then?

viral escarp
#

i think

hard ravine
#

@rustic bluff

viral escarp
#

yee

hard ravine
#

you committed a 4 semicolon line

viral escarp
#

i was about to say no way i did that i was the first commit lmao

#

no way i fucked up that hard

hard ravine
#

even the test is crying about that

hard ravine
#

I don't get any errors when clicking blocks

lethal glen
lethal glen
hard ravine
outer sail
#

imma join vc

#

wait for meeeeeee

#

wait

#

hold on

lethal glen
hard ravine
#

hm weird

#

anyway, the bug is coming from @outer sail 's listener in the main class

#

@lethal glen

#

I'd really love people move their listeners into their on class. With a proper "automatic" listener registration, it wouldn't even need more lines / more semicolons

outer sail
#

it requires more lines

#

class declaration

#

o wait

#

nvm

hard ravine
#

a class declaration does not require any semicolons

#

so you can just put it into the same line as your event handler methods

queen valve
#

ima make a simple perms plugin for this

viral escarp
#

GUs

#

I FOUND A CIPHER MEME

queen valve
#

LOL

lethal glen
viral escarp
#

LMAO YES

#

that good?