#My attempt to mod contraptions and bogeys

1 messages · Page 1 of 1 (latest)

zinc hawk
#

hopefully we can stop flying through the blocks while in motion now

#

if i find an error text in here ill post a patch below it

charred crow
#

You should explain what this does and upload screenshots

zinc hawk
#

Sounds good I'll do that after I get dont dropping gf off back home

#

Screenshot idk how im gonna show moving behavior

#

But description for sure

zinc hawk
#

What It Does
The mod provides comprehensive performance optimizations through several key areas:

Core Optimizations
Spatial Partitioning: Improves collision detection using grid-based spatial indexing
Level of Detail (LOD): Reduces detail for distant objects to improve rendering performance
Async Physics: Moves physics calculations to background threads
Batched Updates: Groups frequent updates together to reduce processing overhead
Object Pooling: Reduces garbage collection pressure by reusing objects
Mod-Specific Optimizations

Valkyrien Skies: Optimizes physics updates and collision precision for airship physics

Trackwork: Enhances train system performance with optimized update frequencies

Create: Improves contraption and machine performance

Train Collision: Advanced collision detection and player correction systems

How It Works

The mod uses a modular optimization system with these main components:

#

Architecture:
OptimizationManager: Central coordinator managing per-dimension optimization contexts
PerformancePatcher: Applies runtime patches to detected mods (so i can fix crashes from other mods easier)
Integration Layer: Hooks into mod APIs for targeted optimizations
Metrics & Debugging: Performance monitoring and adaptive quality management (still expanding it)

Implementation Strategy:
Detection-based: Automatically detects installed mods and applies appropriate patches
Configurable: All optimizations can be enabled/disabled and tuned via configuration
Non-intrusive: Works without modifying original mod. just applies its own values over the top of whats there.
Adaptive: Includes runtime performance monitoring and quality adjustment

Key Features:
Memory Management: Garbage collection optimization and memory pooling
Runtime Configuration: Settings can be adjusted without restart
Performance Metrics: Detailed performance tracking and debugging tools
Multi-threading: Background processing for physics and updates
Spatial Optimization: Grid-based collision detection and culling

#

---------------------------------------------
I need to make a patch for a friend that DMd me about empty schematics on an engine to change the mode causing a crash

#

does that work?

charred crow
#

How does this part work?
Valkyrien Skies: Optimizes physics updates and collision precision for airship physics
And how does it do that while satisfying this?
Works without modifying original mod. just applies its own values over the top of whats there.

zinc hawk
#

The patcher uses ObfuscationReflectionHelper.findField() to access VS internals at runtime, meaning:

#

No VS source code is changed
VS can be updated independently
Optimizations are applied dynamically

#

Instead of changing VS code, it overrides configuration values:

java
// Original VS: private static final double COLLISION_MARGIN = 0.01;
// After patching: private static final double COLLISION_MARGIN = 0.05;
Event Integration
The optimizer hooks into VS events through reflection:

java
Class<?> vsEventRegistry = Class.forName("org.valkyrienskies.mod.common.VSEventRegistry");
// Registers event listeners without modifying VS event system

#

I hope anything im saying is useful

charred crow
#

Bro, org.valkyrienskies.mod.common.VSEventRegistry does not exist

zinc hawk
#

then what did it actualy call?.. let me look

cosmic onyx
#

@zinc hawk okay yeah ur no longer allowed to post these 😭 you have absolutely no clue what this stuff does

zinc hawk
#

okay np

#

all i care about is it fixed a problem someone was having and im going to continue finding and fixing problems even if it doesnt go here

#

The org.valkyrienskies.mod.common.VSEventRegistry is referenced in the Performance Patcher code at line 51 of ValkyrienSkiesOptimizer.java. This is part of the Valkyrien Skies integration system.

cosmic onyx
#

i don't know how to tell you this

static rune
#

was mf restricted because of posting ai slop? insane 1984

zinc hawk
#

yes i am

#

im trying to post the picture to show it also

swift umbraBOT
#

@zinc hawk was unrestricted

cosmic onyx
#

post it

zinc hawk
#

right there

cosmic onyx
#

it

#

does

#

not

#

exist

#

ur ai is hallucinating

#

wait what the fuck

zinc hawk
#

okay

static rune
# zinc hawk

i see that you want to do something cool, but AI is writing a bunch of nonsense

cosmic onyx
#

core.game.physicsengine 😭

static rune
#

if you don't know programming to actually know if what it writes makes sense, you will not have anything working

zinc hawk
#

i am working on removing and replacing nonsense with something that works but i need the people with the actual functioning knowledge to help me get the stuff correct so i can actually do it

#

so if its the wrong thing its easier for me to just understand hey this doesnt do anything use this instead

#

ranther than blocking me

static rune
#

fixing AI hallucinations is not fun, so I really doubt that you will find anyone

zinc hawk
#

understood

static rune
#

you should learn some actual programming to use AI effectively

zinc hawk
#

This is me learning but i want to do productive stuff while im learning

#

even if this is making junk to fix

cosmic onyx
cosmic onyx
static rune
#

it's not going to work

#

do something simpler first

wheat mural
#

we got actual clanker lover here

#

why do you rely on this thing

#

not just for coding

#

but also for making up answers

zinc hawk
#

wah..

wheat mural
#

like if you want to vibe code something vs related at least study the codebase either by yourself or ask ai for explanation what is what

zinc hawk
#

mate you can give me all the same arguments people have been making for the last 3 years on AI its not going to change that im not the only one thats going to start doing this

wheat mural
#

even the basic structure of anything in the mod tbh

cosmic onyx
#

😭

zinc hawk
#

thats rude

wheat mural
#

It’s a powerful tool but it takes quite some skill to actually use it with an existing codebase

untold coral
wheat mural
#

You don’t have that skill or at least applying 0% of it here

cosmic onyx
#

esp when it comes to undocumented, complex code

wheat mural
wheat mural
zinc hawk
#

The point is to make something that does work and then i want to annotate it to explain the stuff to me like a textbook (IF IT WORKS)

wheat mural
#

The problem is

#

It can’t just make stuff that works here

zinc hawk
#

IT COULD BE HALLUSINATION IK

wheat mural
#

Minecraft modding is one of the less documented fields

#

Like yes AI can code webslop javascript stuff all over the day

cosmic onyx
zinc hawk
#

you dont think im taking this between multiple different places googling this stuff asking mod devs and reading the github notes on how im supposed to do this? im not taking raw outputs and shitting it out in a jar

wheat mural
#

But here a lot of knowledge is hidden in discords or whatever not in ai datasets

zinc hawk
#

i have errors yes

untold coral
zinc hawk
#

i fix them also

wheat mural
#

You’re doing some optimization thing right

#

What do you even want to optimize

static rune
zinc hawk
#

the person i made this for said it fixed his issue

wheat mural
#

Just ask AI why the code is bullshit and it will kindly explain it indeed is

#

(Because you’re absolutely right)

zinc hawk
#

now i need to find the needle in the haystack of shit to figure out what actually made it do this

untold coral
cosmic onyx
zinc hawk
#

well then annotate the source code better so it can understand whats going on

wheat mural
keen pelican
#

Absolutly fucking no

cosmic onyx
#

the source code is just fine, if you know how java works 😭

zinc hawk
#

right

wheat mural
#

We know how to deal with it

#

It’s for devs

keen pelican
#

Why should we embrace ai slop

zinc hawk
#

Its not going away

wheat mural
#

Just wait until it becomes good enough to read the code man

zinc hawk
#

dont embrace it improve it to make less slop

wheat mural
#

Probably half a year

zinc hawk
#

okay

#

can do

wheat mural
#

Until then

untold coral
cosmic onyx
wheat mural
#

Please don’t attempt to do this bullshit

#

Like there’s erroneous vibe code that looks ok but isn’t that sustainable

cosmic onyx
#

but unless you know where the code is, you can't do that

wheat mural
#

And then there’s unsalvageable meaningless bullshit

#

Whatever you posted is the latter

zinc hawk
#

Well anyways im going to keep asking it to explain itself thanks for the feedback

wheat mural
#

Yeah ask the clanker not us

keen pelican
#

Actual developers with real insight on how the code works, and why bugs occur already know how to read vs2's codespace

zinc hawk
#

I need real info to improve so at some point i got to ask someone

cosmic onyx
charred crow
#

If you insist on using ai to code, clone the VS2 repo into a local repository and open it with Cursor or something

cosmic onyx
keen pelican
#

Annotating the code more to help AI is like opening the monkey enclosure in a zoo

cosmic onyx
keen pelican
#

It leads to absolute chaos

zinc hawk
#

Okay i have one more request can we get an AI slop wannabe dev room lol

static rune
#

no

zinc hawk
#

XD

cosmic onyx
wheat mural
#

Optimization specifically is hell of a task even for people already familiar with the mod

zinc hawk
#

mmm. no i have too much to do ranching already

wheat mural
#

Those who aren’t start with very basics

zinc hawk
#

but ill keep going

wheat mural
#

Like maybe implementing compatibility for some very simple mod

charred crow
#

Start with a content mod, optimization requires a lot of experience, especially for a mod like VS

zinc hawk
#

I dont like making content mods

wheat mural
#

Or tracking down the reason of a simple bug

wheat mural
charred crow
#

Ai is actually really good at content mods

zinc hawk
#

I made a stupid firetruck mod and it was dissapointing how little i cared about it

cosmic onyx
#

they're just good experience

zinc hawk
#

Yeah but my only intrest is in the stuff under the hood

charred crow
#

Ok then learn about it properly

zinc hawk
#

ok

wheat mural
cosmic onyx
zinc hawk
#

im still going to use AI though because i dont have days and days to sit at a desk

cosmic onyx
#

its just a necessity of pretty much everything in life

charred crow
#

At least follow some sort of intro to java course or something if you don’t want to make content mods

wheat mural
cosmic onyx
zinc hawk
#

yes my free time i want my world to work how i intend it to

cosmic onyx
wheat mural
#

it isn’t doing anything nor it will any soon 💔

zinc hawk
#

I get 2 hours of freetime a day after i deal with the animals before i go to work so im trying to maximize how much i can do

#

not yet

cosmic onyx
wheat mural
# zinc hawk not yet

Again learn some shit and halfway through the course you’ll see how this product of generation is just not useful, none of it is

#

And maybe you’ll reconsider how and where AI should be applied

zinc hawk
#

probably not, As it turns out it didnt read the source code folder i gave it of VS2 (explains why it tried to use a name it thought would be used..) This is the one im currently working on

wheat mural
#

Probably yes

#

It’s good to fill in some blanks

crisp fractal
#

I garuntee you that you will spend the same amount of time fighting with AI as you will fighting with Java, except that fighting with java will actually improve over time

wheat mural
#

But not whatever this is

#

The results speak for themselves…

charred crow
#

Your time is your own, but our recommendations are the fastest path to success with modding

meager wolf
# zinc hawk probably not, As it turns out it didnt read the source code folder i gave it of ...

You are just approaching it wrong. There's nothing wrong with using AI, but you need to

  1. Tell it what you're trying to accomplish and to come up with a plan to do it. Make sure you understand the plan as much as possible, including specifically what code in VS you need to look for. It will also be useful to use something like Gemini or ChatGPT that you can attach a GitHub repository to.

  2. Begin on step one of the plan, whatever that is. There will be an enormous amount of things that you don't understand, many of them just generally programming related. Make sure to ask questions all the time, whenever there is something you don't understand. Put it on "Study" mode if you have the option. It will probably take you hours, days or even weeks to get anything done, but that's intentional. If this is going too slowly for your liking, return to step 1 and try an easier task.

  3. Once you've accomplished the task with the help of AI, throw it out and try again on your own. You should have learned enough that you understand how to redo your work without the assistance of AI and you will understand where improvements can be made the second time around.

Using AI like you are now, trying to get it to one shot a program without understanding what it's outputting, is a recipe for failure.

#

Take it from a professional software developer who uses plenty of AI

crisp fractal
#

Oh no Ruby coming over with the vibing tips clueless

meager wolf
#

More like "using the AI to learn" tips

crisp fractal
#

Ruby you learned Java way before AI was a thing (atleast I think)

meager wolf
#

But in my very early learning stages, I was taught by my dad

#

I think self teaching is pretty hard, and I can see how AI can help a lot with that

#

The problem is that it's really hard to avoid being lazy and using as a crutch

spiral current
#

oh my god

#

what in the actual fuck is this

#

the vibecoded attempt at an optimisaiton mod, and now this???

fluid arch
#

isn’t this also a vibecoded attempt at an optimisation mod?

spiral current
#

How bad does it have to be for it to have even ruby say that there is something wrong 😭

cosmic onyx
#

i sent sm of it in vscreators

#

but its all hallucinations

spiral current
#

Even the messages bro sent are AI

#

the long ones

#

I cannot fight this

crisp fractal
#

did bro leave the server?

#

or was banned?

spiral current
#

I literally don't have enough energy to be fighting against people who use AI to answer

fluid arch
cosmic onyx
#

at least they'll never read bad tps

fluid arch
#

ultimate optimisation

spiral current
#

no

#

I would not

#

I didn't do anything 😭

fluid arch
#

oh my b

spiral current
#

they are still here as far as I know

fluid arch
spiral current
#

I would not ban them for that

cosmic onyx
#

they left, yeah

spiral current
#

I don't feel hate or something like that, I think I am just desesperate

fluid arch
#

he’s gone

spiral current
#

like actual despair

fluid arch
#

ikr

abstract star
#

9/10 thread

fluid arch
#

yeah, this is one for the VScord history books for sure 😭

untold coral
#

As for java

#

I'm just lazy

#

So I kinda don't

wheat mural
#

It signifies it’s a floating point number

untold coral
#

Ah it's just for floats

wheat mural
#

Because a double would be specified as 20.0

untold coral
#

💀

wheat mural
#

Why on earth would (double)20.0F be necessary…

#

Though we’ll never know nothing of that makes sense

wheat mural
untold coral
#

On an unrelated note

#

I'm brainrotted

abstract star
wheat mural
untold coral
wheat mural
#

No

untold coral
#

huh

wary rover
#

Using ai to code anything is crazy

#

Well, using ai for anything important is crazy