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

GT++ Code Sanitize #3235

Merged
merged 38 commits into from
Sep 23, 2024
Merged

Conversation

BlueHero233
Copy link
Member

Did some code cleanup before i change any textures and their references, this time i tested it on nightly 651

BlueHero233 and others added 17 commits May 23, 2024 15:23
Fix texture path string sorcery
Add qft folder for casings
Remove redundant canCreatureSpawn calls
Remove redundant brackets
Replace global variable that gets called once with return value
Remove always true conditions
Remove repeated texture side variables (block has the same texture for all sides)
handItem instanceof ItemFluidContainer is always false
catch (Throwable ignored)
Math.max call to simplify
Convert field to local variable
quantityDropped and canDropFromExplosion never used
redundant null casting
getBlockTypeMeta, getUnlocalizedBlockName, GetProperName and getRenderColor never used
aTool never used
@Volence Volence added the refactor For PRs rewritting a part of the code to have a nicer code overall. label Sep 20, 2024
@Dream-Master Dream-Master requested a review from a team September 20, 2024 16:18
@Dream-Master
Copy link
Member

@BlueHero233 can you add some ingame screens with the new textures here?
it seems the build crash


cpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
	at cpw.mods.fml.common.LoadController.transition(LoadController.java:[16](https://github.com/GTNewHorizons/GT5-Unofficial/actions/runs/10962510441/job/30441924065?pr=3235#step:15:17)3)
	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739)
	at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97)
	at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:319)
	at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:213)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
Caused by: java.lang.ExceptionInInitializerError
	at gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechLargeTurbinesAndHeatExchanger.run1(GregtechLargeTurbinesAndHeatExchanger.java:52)
	at gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechLargeTurbinesAndHeatExchanger.run(GregtechLargeTurbinesAndHeatExchanger.java:25)
	at gtPlusPlus.core.handler.CompatHandler.registerGregtechMachines(CompatHandler.java:[17](https://github.com/GTNewHorizons/GT5-Unofficial/actions/runs/10962510441/job/30441924065?pr=3235#step:15:18)7)
	at gtPlusPlus.xmod.gregtech.HandlerGT.init(HandlerGT.java:54)
	at gtPlusPlus.core.handler.CompatIntermodStaging.init(CompatIntermodStaging.java:30)
	at gtPlusPlus.core.common.CommonProxy.init(CommonProxy.java:99)
	at gtPlusPlus.GTplusplus.init(GTplusplus.java:171)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:[19](https://github.com/GTNewHorizons/GT5-Unofficial/actions/runs/10962510441/job/30441924065?pr=3235#step:15:20)0)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:3[22](https://github.com/GTNewHorizons/GT5-Unofficial/actions/runs/10962510441/job/30441924065?pr=3235#step:15:23))
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
	... 5 more
Caused by: java.lang.IllegalArgumentException
	at com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock(StructureUtility.java:1[25](https://github.com/GTNewHorizons/GT5-Unofficial/actions/runs/10962510441/job/30441924065?pr=3235#step:15:26)2)
	at com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock(StructureUtility.java:1379)
	at gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.MTEAdvHeatExchanger.<clinit>(MTEAdvHeatExchanger.java:63)
	... 38 more```

Copy link
Contributor

@NotAPenguin0 NotAPenguin0 left a comment

Choose a reason for hiding this comment

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

As a side note, what's up with the changed textures for QFT casings?

@BlueHero233
Copy link
Member Author

As a side note, what's up with the changed textures for QFT casings?

No changes, just moved them all to a "qft" folder

@Dream-Master Dream-Master requested review from NotAPenguin0 and a team September 21, 2024 19:58
@Dream-Master Dream-Master enabled auto-merge (squash) September 23, 2024 19:51
@Dream-Master Dream-Master merged commit 1abc736 into GTNewHorizons:master Sep 23, 2024
5 checks passed
@BlueHero233 BlueHero233 deleted the gtppCodeTweaks branch September 23, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor For PRs rewritting a part of the code to have a nicer code overall.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants