Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow debug card to insert huge amounts of items, e.g. to fill infinity chest #45

Merged
merged 2 commits into from
Dec 31, 2021

Conversation

repo-alt
Copy link

Also increase JVM memory pool in gradle script

Allow debug card to insert huge amounts of items, e.g. to fill infinity chest
@repo-alt repo-alt requested a review from a team December 28, 2021 08:52
@boubou19
Copy link
Member

that sounds very interesting: how does that work? you just edit the nbt via the card as usual but you can enter a value above 64?

@repo-alt
Copy link
Author

No, I just literally insert the stuff in the chest. Previously it was limited by the stack size.

@boubou19
Copy link
Member

oh ok, so i'll stick to direct nbt edit, i'm more used to it, even if i need to downgrade my lua version. But that looks cool, i'll definitely toy with it when i'll have time

@repo-alt
Copy link
Author

repo-alt commented Dec 28, 2021

like this: component.debug.insertItem("iron_ingot", 2000000000, 0, "", x, y, z, 1)
A bit less dangerous than NBT edit

@boubou19
Copy link
Member

i see, you just made me change my mind, way quicker and safer than the nbt edit lol

@SinTh0r4s
Copy link
Member

Did you try to minimize the additionally required memory a bit? Not that 4GB machines will get into trouble running the dev versions. Also: could you open a PR for this on the ExampleMod? That'd be lovely! Many thanks for figuring the issue out!

@bombcar
Copy link
Member

bombcar commented Dec 28, 2021

Did you try to minimize the additionally required memory a bit? Not that 4GB machines will get into trouble running the dev versions. Also: could you open a PR for this on the ExampleMod? That'd be lovely! Many thanks for figuring the issue out!

Something is strange because aka just completely ignored those values …. Let’s make a ticket on ExampleMod

@bombcar
Copy link
Member

bombcar commented Dec 28, 2021

SinTh0r4s/ExampleMod1.7.10#59 For JVM discussion

@repo-alt
Copy link
Author

Did you try to minimize the additionally required memory a bit? Not that 4GB machines will get into trouble running the dev versions. Also: could you open a PR for this on the ExampleMod? That'd be lovely! Many thanks for figuring the issue out!

Why would that affect actually running the dev versions? As for compiling, 2G is really not that much...
I'm not sure what value Example mod should use because Scala is a known memory hog, but most mods should not require that much memory to compile. Also I have no idea why I had the same error in IDEA, but perhaps it got fixed after clearing build cache. (I set both Scala and Java additional memory parameter there)

@SinTh0r4s
Copy link
Member

SinTh0r4s commented Dec 28, 2021

Did you try to minimize the additionally required memory a bit? Not that 4GB machines will get into trouble running the dev versions. Also: could you open a PR for this on the ExampleMod? That'd be lovely! Many thanks for figuring the issue out!

Why would that affect actually running the dev versions? As for compiling, 2G is really not that much... I'm not sure what value Example mod should use because Scala is a known memory hog, but most mods should not require that much memory to compile. Also I have no idea why I had the same error in IDEA, but perhaps it got fixed after clearing build cache. (I set both Scala and Java additional memory parameter there)

Is that memory required by the compilers only? It might also be applied to the Gradle wrapper. Will it be applied to the java compiler and scala compiler? Some projects use both and that could add up.

2GB for compilation is way too much^^

@repo-alt
Copy link
Author

Those parameters are definitely used to launch gradle wrapper, I have no idea what variables gradle uses to lauch Java and Scala compilers. (I'm neither Java developer, nor a gradle expert, I just found some way to avoid crash on my machine, perhaps correct fix should be different. I found it by rolling back revisions and trying to build. After it started to build I picked apart the revision changes to isolate one affecting the build, it happened to be this variable.)

Copy link
Member

@bombcar bombcar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Xmx Xms changes are fine for now but we will revisit when I have access to a windows box

@Dream-Master Dream-Master merged commit b30c1bf into GTNewHorizons:master Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants