From 783cd126f75b5d9b10ede5ebdf6b997934cf308d Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:05:22 -0800 Subject: [PATCH] Renaming and getters - Rename AllBlockPartials -> AllPartialModels - Make AllPackets.channel private and use getter method instead - Make config fields in AllConfigs private and use getter methods instead - Optimize SyncedBlockEntity#sendData --- ...ockPartials.java => AllPartialModels.java} | 2 +- .../com/simibubi/create/CreateClient.java | 4 +-- .../compat/jei/BlueprintTransferHandler.java | 2 +- .../simibubi/create/compat/jei/CreateJEI.java | 2 +- .../compat/jei/GhostIngredientHandler.java | 2 +- .../category/ProcessingViaFanCategory.java | 4 +-- .../animations/AnimatedBlazeBurner.java | 10 +++---- .../category/animations/AnimatedDeployer.java | 6 ++-- .../category/animations/AnimatedKinetics.java | 4 +-- .../animations/AnimatedMillstone.java | 4 +-- .../category/animations/AnimatedMixer.java | 6 ++-- .../category/animations/AnimatedPress.java | 4 +-- .../jei/category/animations/AnimatedSaw.java | 4 +-- .../category/animations/AnimatedSpout.java | 8 +++--- .../compat/tconstruct/SpoutCasting.java | 2 +- .../content/contraptions/KineticDebugger.java | 2 +- .../contraptions/RotationPropagator.java | 4 +-- .../contraptions/base/HalfShaftInstance.java | 4 +-- .../content/contraptions/base/IRotate.java | 10 +++---- .../contraptions/base/KineticBlockEntity.java | 4 +-- .../components/actors/DrillActorInstance.java | 4 +-- .../components/actors/DrillInstance.java | 4 +-- .../components/actors/DrillRenderer.java | 6 ++-- .../actors/HarvesterActorInstance.java | 4 +-- .../actors/HarvesterMovementBehaviour.java | 8 +++--- .../components/actors/HarvesterRenderer.java | 6 ++-- .../PortableStorageInterfaceBlockEntity.java | 2 +- .../PortableStorageInterfaceRenderer.java | 14 +++++----- .../ContraptionControlsMovingInteraction.java | 4 +-- .../controls/ContraptionControlsRenderer.java | 6 ++-- .../components/clock/CuckooClockRenderer.java | 14 +++++----- .../crafter/MechanicalCrafterRenderer.java | 12 ++++---- .../components/crafter/RecipeGridHandler.java | 4 +-- .../crafter/ShaftlessCogwheelInstance.java | 4 +-- .../components/crank/HandCrankBlock.java | 6 ++-- .../CrushingWheelControllerBlockEntity.java | 2 +- .../deployer/DeployerActorInstance.java | 4 +-- .../deployer/DeployerBlockEntity.java | 10 +++---- .../deployer/DeployerFakePlayer.java | 2 +- .../components/deployer/DeployerInstance.java | 8 +++--- .../components/deployer/DeployerRenderer.java | 8 +++--- .../components/fan/AirCurrent.java | 2 +- .../components/fan/EncasedFanBlockEntity.java | 2 +- .../components/fan/EncasedFanRenderer.java | 6 ++-- .../components/fan/FanInstance.java | 6 ++-- .../components/fan/IAirCurrentSource.java | 2 +- .../components/fan/NozzleBlockEntity.java | 2 +- .../millstone/MillstoneCogInstance.java | 4 +-- .../millstone/MillstoneRenderer.java | 4 +-- .../mixer/MechanicalMixerBlockEntity.java | 4 +-- .../mixer/MechanicalMixerRenderer.java | 8 +++--- .../components/mixer/MixerInstance.java | 8 +++--- .../motor/CreativeMotorBlockEntity.java | 2 +- .../motor/CreativeMotorRenderer.java | 4 +-- .../press/MechanicalPressBlockEntity.java | 4 +-- .../press/MechanicalPressRenderer.java | 4 +-- .../components/press/PressInstance.java | 4 +-- .../components/saw/SawBlockEntity.java | 6 ++-- .../components/saw/SawInstance.java | 4 +-- .../components/saw/SawRenderer.java | 24 ++++++++-------- .../components/steam/SteamEngineInstance.java | 8 +++--- .../components/steam/SteamEngineRenderer.java | 8 +++--- .../steam/whistle/WhistleRenderer.java | 6 ++-- .../AbstractContraptionEntity.java | 12 ++++---- .../structureMovement/AssemblyException.java | 6 ++-- .../structureMovement/Contraption.java | 4 +-- .../ContraptionCollider.java | 8 +++--- .../ContraptionHandlerClient.java | 2 +- .../MountedFluidStorage.java | 2 +- .../structureMovement/MovementBehaviour.java | 2 +- .../NonStationaryLighter.java | 2 +- .../bearing/BearingContraption.java | 2 +- .../bearing/BearingInstance.java | 4 +-- .../bearing/BearingRenderer.java | 6 ++-- .../bearing/StabilizedBearingInstance.java | 6 ++-- .../StabilizedBearingMovementBehaviour.java | 4 +-- .../bearing/WindmillBearingBlockEntity.java | 2 +- .../chassis/ChassisBlockEntity.java | 2 +- .../chassis/StickerInstance.java | 4 +-- .../chassis/StickerRenderer.java | 4 +-- .../elevator/ElevatorContactScreen.java | 2 +- .../elevator/ElevatorContraption.java | 2 +- .../elevator/ElevatorFloorListPacket.java | 2 +- .../elevator/ElevatorPulleyBlockEntity.java | 4 +-- .../elevator/ElevatorPulleyRenderer.java | 10 +++---- .../gantry/GantryCarriageInstance.java | 4 +-- .../gantry/GantryCarriageRenderer.java | 4 +-- .../gantry/GantryContraptionEntity.java | 2 +- .../glue/SuperGlueHandler.java | 4 +-- .../glue/SuperGlueSelectionHandler.java | 4 +-- .../interaction/controls/ControlsHandler.java | 10 +++---- .../controls/ControlsRenderer.java | 6 ++-- .../interaction/controls/HonkPacket.java | 2 +- .../interaction/controls/TrainHUD.java | 8 +++--- .../mounted/MinecartContraptionItem.java | 2 +- .../piston/MechanicalPistonBlock.java | 2 +- .../piston/PistonContraption.java | 2 +- .../pulley/HosePulleyInstance.java | 12 ++++---- .../pulley/PulleyBlockEntity.java | 4 +-- .../pulley/PulleyRenderer.java | 6 ++-- .../pulley/RopePulleyInstance.java | 8 +++--- .../sync/ClientMotionPacket.java | 2 +- .../train/CouplingHandler.java | 2 +- .../train/CouplingHandlerClient.java | 2 +- .../train/CouplingRenderer.java | 8 +++--- .../train/capability/MinecartController.java | 2 +- .../waterwheel/WaterWheelBlock.java | 6 ++-- .../waterwheel/WaterWheelBlockEntity.java | 2 +- .../contraptions/fluids/FluidPropagator.java | 2 +- .../contraptions/fluids/OpenEndedPipe.java | 2 +- .../fluids/PipeAttachmentModel.java | 6 ++-- .../contraptions/fluids/PumpCogInstance.java | 6 ++-- .../contraptions/fluids/PumpRenderer.java | 6 ++-- .../fluids/actors/FluidFillingBehaviour.java | 2 +- .../actors/FluidManipulationBehaviour.java | 8 +++--- .../fluids/actors/HosePulleyRenderer.java | 10 +++---- .../fluids/actors/SpoutRenderer.java | 4 +-- .../fluids/pipes/FluidValveInstance.java | 4 +-- .../fluids/pipes/FluidValveRenderer.java | 4 +-- .../fluids/tank/FluidTankBlockEntity.java | 4 +-- .../fluids/tank/FluidTankRenderer.java | 6 ++-- .../goggles/GoggleConfigScreen.java | 8 +++--- .../goggles/GoggleOverlayRenderer.java | 2 +- .../contraptions/goggles/GogglesModel.java | 4 +-- .../processing/InWorldProcessing.java | 4 +-- .../burner/BlazeBurnerRenderer.java | 28 +++++++++---------- .../advanced/SpeedControllerBlockEntity.java | 2 +- .../advanced/SpeedControllerRenderer.java | 4 +-- .../sequencer/SequencedGearshiftScreen.java | 2 +- .../relays/belt/BeltInstance.java | 4 +-- .../relays/belt/BeltRenderer.java | 22 +++++++-------- .../belt/item/BeltConnectorHandler.java | 2 +- .../relays/belt/item/BeltConnectorItem.java | 2 +- .../BracketedKineticBlockEntityInstance.java | 6 ++-- .../BracketedKineticBlockEntityRenderer.java | 6 ++-- .../relays/encased/EncasedCogInstance.java | 6 ++-- .../relays/encased/EncasedCogRenderer.java | 6 ++-- .../relays/encased/SplitShaftInstance.java | 4 +-- .../relays/encased/SplitShaftRenderer.java | 4 +-- .../relays/gauge/GaugeInstance.java | 8 +++--- .../relays/gauge/GaugeRenderer.java | 6 ++-- .../relays/gauge/SpeedGaugeBlockEntity.java | 6 ++-- .../relays/gauge/StressGaugeBlockEntity.java | 2 +- .../relays/gearbox/GearboxInstance.java | 4 +-- .../relays/gearbox/GearboxRenderer.java | 4 +-- .../curiosities/ChromaticCompoundItem.java | 6 ++-- .../curiosities/armor/BacktankRenderer.java | 10 +++---- .../curiosities/armor/BacktankUtil.java | 6 ++-- .../armor/NetheriteDivingHandler.java | 4 +-- .../bell/HauntedBellBlockEntity.java | 4 +-- .../curiosities/bell/HauntedBellPulser.java | 2 +- .../bell/PeculiarBellBlockEntity.java | 4 +-- .../curiosities/deco/MetalLadderBlock.java | 2 +- .../curiosities/frames/CopycatStepBlock.java | 2 +- .../girder/ConnectedGirderModel.java | 4 +-- .../girder/GirderPlacementHelper.java | 2 +- .../symmetry/SymmetryWandItem.java | 8 +++--- .../symmetry/SymmetryWandScreen.java | 2 +- .../symmetry/mirror/CrossPlaneMirror.java | 4 +-- .../symmetry/mirror/PlaneMirror.java | 4 +-- .../symmetry/mirror/TriplePlaneMirror.java | 4 +-- .../toolbox/RadialToolboxMenu.java | 12 ++++---- .../curiosities/toolbox/ToolBoxInstance.java | 6 ++-- .../curiosities/toolbox/ToolboxHandler.java | 4 +-- .../toolbox/ToolboxHandlerClient.java | 2 +- .../curiosities/toolbox/ToolboxRenderer.java | 6 ++-- .../curiosities/toolbox/ToolboxScreen.java | 8 +++--- .../curiosities/tools/BlueprintRenderer.java | 6 ++-- .../curiosities/tools/BlueprintScreen.java | 6 ++-- .../curiosities/tools/ExtendoGripItem.java | 8 +++--- .../tools/ExtendoGripItemRenderer.java | 4 +-- .../tools/ExtendoGripRenderHandler.java | 8 +++--- .../curiosities/weapons/PotatoCannonItem.java | 2 +- .../weapons/PotatoProjectileTypeManager.java | 4 +-- .../zapper/ShootableGadgetItemMethods.java | 4 +-- .../curiosities/zapper/ZapperScreen.java | 2 +- .../logistics/RedstoneLinkNetworkHandler.java | 2 +- .../belts/tunnel/BeltTunnelBlockEntity.java | 2 +- .../belts/tunnel/BeltTunnelInstance.java | 4 +-- .../belts/tunnel/BeltTunnelRenderer.java | 4 +-- .../block/chute/ChuteBlockEntity.java | 2 +- .../logistics/block/depot/EjectorBlock.java | 2 +- .../block/depot/EjectorBlockEntity.java | 8 +++--- .../block/depot/EjectorInstance.java | 4 +-- .../block/depot/EjectorRenderer.java | 4 +-- .../block/depot/EjectorTargetHandler.java | 4 +-- .../block/diodes/BrassDiodeInstance.java | 4 +-- .../block/diodes/BrassDiodeRenderer.java | 4 +-- .../block/display/DisplayLinkBlockItem.java | 2 +- .../block/display/DisplayLinkRenderer.java | 6 ++-- .../block/display/DisplayLinkScreen.java | 2 +- .../block/funnel/FunnelBlockEntity.java | 4 +-- .../block/funnel/FunnelInstance.java | 6 ++-- .../block/funnel/FunnelMovementBehaviour.java | 2 +- .../block/funnel/FunnelRenderer.java | 6 ++-- .../block/mechanicalArm/ArmBlockEntity.java | 2 +- .../block/mechanicalArm/ArmInstance.java | 16 +++++------ .../ArmInteractionPointHandler.java | 2 +- .../block/mechanicalArm/ArmRenderer.java | 16 +++++------ .../block/redstone/AnalogLeverInstance.java | 6 ++-- .../block/redstone/AnalogLeverRenderer.java | 6 ++-- .../block/redstone/NixieTubeRenderer.java | 14 +++++----- .../block/redstone/StockpileSwitchScreen.java | 2 +- .../block/vault/ItemVaultBlockEntity.java | 2 +- .../item/LinkedControllerClientHandler.java | 12 ++++---- .../item/filter/AbstractFilterScreen.java | 2 +- .../item/filter/AttributeFilterScreen.java | 2 +- .../trains/CameraDistanceModifier.java | 2 +- .../trains/GlobalRailwayManager.java | 8 +++--- .../trains/TrackGraphRollCallPacket.java | 2 +- .../logistics/trains/TrackGraphSync.java | 12 ++++---- .../trains/entity/BogeyInstance.java | 14 +++++----- .../entity/CarriageContraptionEntity.java | 8 +++--- .../entity/CarriageCouplingRenderer.java | 8 +++--- .../logistics/trains/entity/Train.java | 14 +++++----- .../trains/entity/TrainRelocationPacket.java | 4 +-- .../trains/entity/TrainRelocator.java | 2 +- .../display/FlapDisplayRenderer.java | 4 +-- .../edgePoint/TrackTargetingBlockItem.java | 2 +- .../edgePoint/signal/SignalRenderer.java | 6 ++-- .../edgePoint/station/AssemblyScreen.java | 16 +++++------ .../edgePoint/station/StationBlockEntity.java | 6 ++-- .../edgePoint/station/StationRenderer.java | 6 ++-- .../edgePoint/station/StationScreen.java | 14 +++++----- .../edgePoint/station/TrainEditPacket.java | 2 +- .../management/schedule/ScheduleScreen.java | 6 ++-- .../schedule/TrainHatArmorLayer.java | 4 +-- .../track/CurvedTrackDestroyPacket.java | 2 +- .../trains/track/CurvedTrackInteraction.java | 4 +-- .../trains/track/StandardBogeyBlock.java | 14 +++++----- .../logistics/trains/track/TrackBlock.java | 12 ++++---- .../trains/track/TrackBlockEntity.java | 4 +-- .../trains/track/TrackBlockItem.java | 2 +- .../logistics/trains/track/TrackInstance.java | 14 +++++----- .../trains/track/TrackPlacement.java | 2 +- .../logistics/trains/track/TrackRenderer.java | 12 ++++---- .../schematics/ClientSchematicLoader.java | 10 +++---- .../schematics/ServerSchematicLoader.java | 2 +- .../block/SchematicannonBlockEntity.java | 2 +- .../block/SchematicannonInstance.java | 6 ++-- .../block/SchematicannonRenderer.java | 6 ++-- .../block/SchematicannonScreen.java | 2 +- .../client/SchematicAndQuillHandler.java | 2 +- .../schematics/client/SchematicHandler.java | 4 +-- .../packet/SchematicPlacePacket.java | 2 +- .../simibubi/create/events/ClientEvents.java | 4 +-- .../blockEntity/SyncedBlockEntity.java | 10 ++----- .../filtering/FilteringBehaviour.java | 2 +- .../filtering/FilteringRenderer.java | 2 +- .../behaviour/linked/LinkRenderer.java | 2 +- .../scrollvalue/ScrollValueBehaviour.java | 2 +- .../command/CameraAngleCommand.java | 6 ++-- .../command/CameraDistanceCommand.java | 4 +-- .../foundation/command/ConfigCommand.java | 6 ++-- .../command/FabulousWarningCommand.java | 2 +- .../command/FixLightingCommand.java | 2 +- .../foundation/command/HighlightCommand.java | 4 +-- .../command/OverlayConfigCommand.java | 4 +-- .../foundation/command/PonderCommand.java | 2 +- .../command/SConfigureConfigPacket.java | 12 ++++---- .../command/ToggleDebugCommand.java | 2 +- .../create/foundation/config/AllConfigs.java | 26 ++++++++++++----- .../config/ContraptionMovementSetting.java | 10 +++---- .../config/ui/BaseConfigScreen.java | 2 +- .../config/ui/OpenCreateMenuButton.java | 8 +++--- .../config/ui/SubMenuConfigScreen.java | 2 +- .../data/recipe/LogStrippingFakeRecipes.java | 2 +- .../foundation/gui/menu/IClearableMenu.java | 2 +- .../create/foundation/item/ItemHelper.java | 4 +-- .../create/foundation/item/KineticStats.java | 2 +- .../item/render/CustomRenderedItems.java | 3 +- .../foundation/networking/AllPackets.java | 10 +++++-- .../networking/ISyncPersistentData.java | 2 +- .../ponder/content/PonderIndex.java | 2 +- .../create/foundation/ponder/ui/PonderUI.java | 4 +-- .../render/BlockEntityRenderHelper.java | 2 +- .../create/foundation/sound/SoundScape.java | 2 +- .../create/foundation/sound/SoundScapes.java | 4 +-- .../foundation/utility/ContraptionData.java | 2 +- .../utility/ServerSpeedProvider.java | 4 +-- .../utility/placement/PlacementHelpers.java | 6 ++-- .../utility/placement/util/PoleHelper.java | 2 +- .../worldgen/ConfigDrivenPlacement.java | 2 +- 283 files changed, 737 insertions(+), 726 deletions(-) rename src/main/java/com/simibubi/create/{AllBlockPartials.java => AllPartialModels.java} (99%) diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllPartialModels.java similarity index 99% rename from src/main/java/com/simibubi/create/AllBlockPartials.java rename to src/main/java/com/simibubi/create/AllPartialModels.java index 90402767f..0a4ea2121 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllPartialModels.java @@ -14,7 +14,7 @@ import com.simibubi.create.foundation.utility.Lang; import net.minecraft.core.Direction; import net.minecraft.world.item.DyeColor; -public class AllBlockPartials { +public class AllPartialModels { public static final PartialModel diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 6cf74ddcd..83bfe4fbf 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -84,7 +84,7 @@ public class CreateClient { BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20); AllKeys.register(); - AllBlockPartials.init(); + AllPartialModels.init(); AllStitchedTextures.init(); PonderIndex.register(); @@ -121,7 +121,7 @@ public class CreateClient { if (mc.options.graphicsMode != GraphicsStatus.FABULOUS) return; - if (AllConfigs.CLIENT.ignoreFabulousWarning.get()) + if (AllConfigs.client().ignoreFabulousWarning.get()) return; MutableComponent text = ComponentUtils.wrapInSquareBrackets(Components.literal("WARN")) diff --git a/src/main/java/com/simibubi/create/compat/jei/BlueprintTransferHandler.java b/src/main/java/com/simibubi/create/compat/jei/BlueprintTransferHandler.java index 10cbea6c3..421165364 100644 --- a/src/main/java/com/simibubi/create/compat/jei/BlueprintTransferHandler.java +++ b/src/main/java/com/simibubi/create/compat/jei/BlueprintTransferHandler.java @@ -34,7 +34,7 @@ public class BlueprintTransferHandler implements IRecipeTransferHandler build(String name, CreateRecipeCategory.Factory factory) { Supplier> recipesSupplier; - if (predicate.test(AllConfigs.SERVER.recipes)) { + if (predicate.test(AllConfigs.server().recipes)) { recipesSupplier = () -> { List recipes = new ArrayList<>(); for (Consumer> consumer : recipeListConsumers) diff --git a/src/main/java/com/simibubi/create/compat/jei/GhostIngredientHandler.java b/src/main/java/com/simibubi/create/compat/jei/GhostIngredientHandler.java index ccc236f52..798a7fca2 100644 --- a/src/main/java/com/simibubi/create/compat/jei/GhostIngredientHandler.java +++ b/src/main/java/com/simibubi/create/compat/jei/GhostIngredientHandler.java @@ -82,7 +82,7 @@ public class GhostIngredientHandler> return; // sync new filter contents with server - AllPackets.channel.sendToServer(new GhostItemSubmitPacket(stack, slotIndex)); + AllPackets.getChannel().sendToServer(new GhostItemSubmitPacket(stack, slotIndex)); } } } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java index e1328156d..0a72b92fb 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java @@ -7,8 +7,8 @@ import javax.annotation.ParametersAreNonnullByDefault; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; @@ -57,7 +57,7 @@ public abstract class ProcessingViaFanCategory> extends Crea matrixStack.mulPose(Vector3f.XP.rotationDegrees(-12.5f)); matrixStack.mulPose(Vector3f.YP.rotationDegrees(22.5f)); - AnimatedKinetics.defaultBlockElement(AllBlockPartials.ENCASED_FAN_INNER) + AnimatedKinetics.defaultBlockElement(AllPartialModels.ENCASED_FAN_INNER) .rotateBlock(180, 0, AnimatedKinetics.getCurrentAngle() * 16) .scale(SCALE) .render(matrixStack); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java index 3f76002bf..ca8b6b6ca 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java @@ -4,8 +4,8 @@ import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; @@ -42,9 +42,9 @@ public class AnimatedBlazeBurner extends AnimatedKinetics { .render(matrixStack); PartialModel blaze = - heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_SUPER : AllBlockPartials.BLAZE_ACTIVE; - PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS_2 - : AllBlockPartials.BLAZE_BURNER_RODS_2; + heatLevel == HeatLevel.SEETHING ? AllPartialModels.BLAZE_SUPER : AllPartialModels.BLAZE_ACTIVE; + PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllPartialModels.BLAZE_BURNER_SUPER_RODS_2 + : AllPartialModels.BLAZE_BURNER_RODS_2; blockElement(blaze).atLocal(1, 1.8, 1) .rotate(0, 180, 0) @@ -86,7 +86,7 @@ public class AnimatedBlazeBurner extends AnimatedKinetics { MultiBufferSource.BufferSource buffer = mc.renderBuffers() .bufferSource(); VertexConsumer vb = buffer.getBuffer(RenderType.cutoutMipped()); - CachedBufferer.partial(AllBlockPartials.BLAZE_BURNER_FLAME, Blocks.AIR.defaultBlockState()) + CachedBufferer.partial(AllPartialModels.BLAZE_BURNER_FLAME, Blocks.AIR.defaultBlockState()) .shiftUVScrolling(spriteShift, (float) uScroll, (float) vScroll) .light(LightTexture.FULL_BRIGHT) .renderInto(matrixStack, vb); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java index 218aa985c..95e7e7018 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java @@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -37,11 +37,11 @@ public class AnimatedDeployer extends AnimatedKinetics { matrixStack.pushPose(); matrixStack.translate(0, offset * 17, 0); - blockElement(AllBlockPartials.DEPLOYER_POLE) + blockElement(AllPartialModels.DEPLOYER_POLE) .rotateBlock(90, 0, 0) .scale(scale) .render(matrixStack); - blockElement(AllBlockPartials.DEPLOYER_HAND_HOLDING) + blockElement(AllPartialModels.DEPLOYER_HAND_HOLDING) .rotateBlock(90, 0, 0) .scale(scale) .render(matrixStack); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java index b78a6672a..3b7d9ce1d 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java @@ -1,8 +1,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.gui.CustomLightingSettings; import com.simibubi.create.foundation.gui.ILightingSettings; import com.simibubi.create.foundation.gui.element.GuiGameElement; @@ -49,7 +49,7 @@ public abstract class AnimatedKinetics implements IDrawable { } protected PartialModel cogwheel() { - return AllBlockPartials.SHAFTLESS_COGWHEEL; + return AllPartialModels.SHAFTLESS_COGWHEEL; } protected GuiGameElement.GuiRenderBuilder blockElement(BlockState state) { diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java index 85ee7970c..33c1fce6b 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java @@ -1,8 +1,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.gui.AllGuiTextures; public class AnimatedMillstone extends AnimatedKinetics { @@ -15,7 +15,7 @@ public class AnimatedMillstone extends AnimatedKinetics { matrixStack.translate(-2, 18, 0); int scale = 22; - blockElement(AllBlockPartials.MILLSTONE_COG) + blockElement(AllPartialModels.MILLSTONE_COG) .rotateBlock(22.5, getCurrentAngle() * 2, 0) .scale(scale) .render(matrixStack); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java index fa041a418..d18a7cbe1 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java @@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.util.Mth; @@ -31,12 +31,12 @@ public class AnimatedMixer extends AnimatedKinetics { float animation = ((Mth.sin(AnimationTickHolder.getRenderTime() / 32f) + 1) / 5) + .5f; - blockElement(AllBlockPartials.MECHANICAL_MIXER_POLE) + blockElement(AllPartialModels.MECHANICAL_MIXER_POLE) .atLocal(0, animation, 0) .scale(scale) .render(matrixStack); - blockElement(AllBlockPartials.MECHANICAL_MIXER_HEAD) + blockElement(AllPartialModels.MECHANICAL_MIXER_HEAD) .rotateBlock(0, getCurrentAngle() * 4, 0) .atLocal(0, animation, 0) .scale(scale) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java index 26b0c1061..8b3f6adb1 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java @@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.core.Direction.Axis; @@ -33,7 +33,7 @@ public class AnimatedPress extends AnimatedKinetics { .scale(scale) .render(matrixStack); - blockElement(AllBlockPartials.MECHANICAL_PRESS_HEAD) + blockElement(AllPartialModels.MECHANICAL_PRESS_HEAD) .atLocal(0, -getAnimatedHeadOffset(), 0) .scale(scale) .render(matrixStack); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java index 97990ddee..675501061 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java @@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.saw.SawBlock; import net.minecraft.core.Direction; @@ -32,7 +32,7 @@ public class AnimatedSaw extends AnimatedKinetics { .scale(scale) .render(matrixStack); - blockElement(AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE) + blockElement(AllPartialModels.SAW_BLADE_VERTICAL_ACTIVE) .rotateBlock(0, -90, -90) .scale(scale) .render(matrixStack); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java index faac26a70..003a839c9 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java @@ -6,8 +6,8 @@ import com.mojang.blaze3d.platform.Lighting; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -45,15 +45,15 @@ public class AnimatedSpout extends AnimatedKinetics { matrixStack.pushPose(); - blockElement(AllBlockPartials.SPOUT_TOP) + blockElement(AllPartialModels.SPOUT_TOP) .scale(scale) .render(matrixStack); matrixStack.translate(0, -3 * squeeze / 32f, 0); - blockElement(AllBlockPartials.SPOUT_MIDDLE) + blockElement(AllPartialModels.SPOUT_MIDDLE) .scale(scale) .render(matrixStack); matrixStack.translate(0, -3 * squeeze / 32f, 0); - blockElement(AllBlockPartials.SPOUT_BOTTOM) + blockElement(AllPartialModels.SPOUT_BOTTOM) .scale(scale) .render(matrixStack); matrixStack.translate(0, -3 * squeeze / 32f, 0); diff --git a/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java b/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java index ee6aeff32..c2dae5c8f 100644 --- a/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java +++ b/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java @@ -66,7 +66,7 @@ public class SpoutCasting extends BlockSpoutingBehaviour { TICON_PRESENT = Mods.TCONSTRUCT.isLoaded(); if (!TICON_PRESENT) return false; - return AllConfigs.SERVER.recipes.allowCastingBySpout.get(); + return AllConfigs.server().recipes.allowCastingBySpout.get(); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java b/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java index 8c8c70412..566b0876a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java +++ b/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java @@ -61,7 +61,7 @@ public class KineticDebugger { } public static boolean isActive() { - return isF3DebugModeActive() && AllConfigs.CLIENT.rainbowDebug.get(); + return isF3DebugModeActive() && AllConfigs.client().rainbowDebug.get(); } public static boolean isF3DebugModeActive() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java index 995324cbb..51c28737e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java @@ -234,8 +234,8 @@ public class RotationPropagator { boolean incompatible = Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0); - boolean tooFast = Math.abs(newSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get() - || Math.abs(oppositeSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get(); + boolean tooFast = Math.abs(newSpeed) > AllConfigs.server().kinetics.maxRotationSpeed.get() + || Math.abs(oppositeSpeed) > AllConfigs.server().kinetics.maxRotationSpeed.get(); // Check for both the new speed and the opposite speed, just in case boolean speedChangedTooOften = currentTE.getFlickerScore() > MAX_FLICKER_SCORE; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java index 159c77a37..353c9407f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.base; import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import net.minecraft.core.Direction; @@ -16,7 +16,7 @@ public class HalfShaftInstance extends SingleRotat @Override protected Instancer getModel() { Direction dir = getShaftDirection(); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, dir); + return getRotatingMaterial().getModel(AllPartialModels.SHAFT_HALF, blockState, dir); } protected Direction getShaftDirection() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java b/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java index 42830264a..ced263792 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java @@ -46,10 +46,10 @@ public interface IRotate extends IWrenchable { public float getSpeedValue() { switch (this) { case FAST: - return AllConfigs.SERVER.kinetics.fastSpeed.get() + return AllConfigs.server().kinetics.fastSpeed.get() .floatValue(); case MEDIUM: - return AllConfigs.SERVER.kinetics.mediumSpeed.get() + return AllConfigs.server().kinetics.mediumSpeed.get() .floatValue(); case SLOW: return 1; @@ -62,9 +62,9 @@ public interface IRotate extends IWrenchable { public static SpeedLevel of(float speed) { speed = Math.abs(speed); - if (speed >= AllConfigs.SERVER.kinetics.fastSpeed.get()) + if (speed >= AllConfigs.server().kinetics.fastSpeed.get()) return FAST; - if (speed >= AllConfigs.SERVER.kinetics.mediumSpeed.get()) + if (speed >= AllConfigs.server().kinetics.mediumSpeed.get()) return MEDIUM; if (speed >= 1) return SLOW; @@ -128,7 +128,7 @@ public interface IRotate extends IWrenchable { } public static boolean isEnabled() { - return !AllConfigs.SERVER.kinetics.disableStress.get(); + return !AllConfigs.server().kinetics.disableStress.get(); } public static LangBuilder getFormattedStressText(double stressPercent) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlockEntity.java index 996714164..159011d15 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlockEntity.java @@ -102,7 +102,7 @@ public class KineticBlockEntity extends SmartBlockEntity implements IHaveGoggleI } if (validationCountdown-- <= 0) { - validationCountdown = AllConfigs.SERVER.kinetics.kineticValidationFrequency.get(); + validationCountdown = AllConfigs.server().kinetics.kineticValidationFrequency.get(); validateKinetics(); } @@ -392,7 +392,7 @@ public class KineticBlockEntity extends SmartBlockEntity implements IHaveGoggleI public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0; - if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) { + if (overStressed && AllConfigs.client().enableOverstressedTooltip.get()) { Lang.translate("gui.stressometer.overstressed") .style(GOLD) .forGoggles(tooltip); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java index 304fe9cd1..9f62f47cf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.Material; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.math.Quaternion; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.actors.flwdata.ActorData; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; @@ -39,7 +39,7 @@ public class DrillActorInstance extends ActorInstance { else eulerY = facing.toYRot() + ((axis == Direction.Axis.X) ? 180 : 0); - drillHead = material.getModel(AllBlockPartials.DRILL_HEAD, state).createInstance(); + drillHead = material.getModel(AllPartialModels.DRILL_HEAD, state).createInstance(); drillHead.setPosition(context.localPos) .setBlockLight(localBlockLight()) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java index b89593ec0..80ade3ff3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors; import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; @@ -20,6 +20,6 @@ public class DrillInstance extends SingleRotatingInstance { protected Instancer getModel() { BlockState referenceState = blockEntity.getBlockState(); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.DRILL_HEAD, referenceState, facing); + return getRotatingMaterial().getModel(AllPartialModels.DRILL_HEAD, referenceState, facing); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java index ca80ab89b..3aad43ce8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.contraptions.components.actors; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; @@ -26,13 +26,13 @@ public class DrillRenderer extends KineticBlockEntityRenderer @Override protected SuperByteBuffer getRotatedModel(DrillBlockEntity be, BlockState state) { - return CachedBufferer.partialFacing(AllBlockPartials.DRILL_HEAD, state); + return CachedBufferer.partialFacing(AllPartialModels.DRILL_HEAD, state); } public static void renderInContraption(MovementContext context, VirtualRenderWorld renderWorld, ContraptionMatrices matrices, MultiBufferSource buffer) { BlockState state = context.state; - SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.DRILL_HEAD, state); + SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.DRILL_HEAD, state); Direction facing = state.getValue(DrillBlock.FACING); float speed = (float) (context.contraption.stalled diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java index 9b9efbf08..dc7c7506f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; import com.simibubi.create.foundation.utility.AngleHelper; @@ -41,7 +41,7 @@ public class HarvesterActorInstance extends ActorInstance { facing = state.getValue(BlockStateProperties.HORIZONTAL_FACING); - harvester = material.getModel(AllBlockPartials.HARVESTER_BLADE, state).createInstance(); + harvester = material.getModel(AllPartialModels.HARVESTER_BLADE, state).createInstance(); horizontalAngle = facing.toYRot() + ((facing.getAxis() == Direction.Axis.X) ? 180 : 0); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java index 3367abc84..686a2c9ca 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java @@ -97,7 +97,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour { MutableBoolean seedSubtracted = new MutableBoolean(notCropButCuttable); BlockState state = stateVisited; BlockHelper.destroyBlockAs(world, pos, null, item, effectChance, stack -> { - if (AllConfigs.SERVER.kinetics.harvesterReplants.get() && !seedSubtracted.getValue() + if (AllConfigs.server().kinetics.harvesterReplants.get() && !seedSubtracted.getValue() && stack.sameItem(new ItemStack(state.getBlock()))) { stack.shrink(1); seedSubtracted.setTrue(); @@ -110,8 +110,8 @@ public class HarvesterMovementBehaviour implements MovementBehaviour { } public boolean isValidCrop(Level world, BlockPos pos, BlockState state) { - boolean harvestPartial = AllConfigs.SERVER.kinetics.harvestPartiallyGrown.get(); - boolean replant = AllConfigs.SERVER.kinetics.harvesterReplants.get(); + boolean harvestPartial = AllConfigs.server().kinetics.harvestPartiallyGrown.get(); + boolean replant = AllConfigs.server().kinetics.harvesterReplants.get(); if (state.getBlock() instanceof CropBlock) { CropBlock crop = (CropBlock) state.getBlock(); @@ -175,7 +175,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour { } private BlockState cutCrop(Level world, BlockPos pos, BlockState state) { - if (!AllConfigs.SERVER.kinetics.harvesterReplants.get()) { + if (!AllConfigs.server().kinetics.harvesterReplants.get()) { if (state.getFluidState() .isEmpty()) return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java index 39eef7257..43022bf04 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java @@ -4,7 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; @@ -33,7 +33,7 @@ public class HarvesterRenderer extends SafeBlockEntityRenderer contraptionEntity), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> contraptionEntity), new ContraptionDisableActorPacket(contraptionEntity.getId(), filter, !disable)); } @@ -118,7 +118,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav if (efs.currentTargetY == contraption.clientYTarget) return false; - AllPackets.channel.sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY)); + AllPackets.getChannel().sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY)); if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte) cte.pressButton(); return true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/controls/ContraptionControlsRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/controls/ContraptionControlsRenderer.java index f0076a6ed..4667bf690 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/controls/ContraptionControlsRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/controls/ContraptionControlsRenderer.java @@ -6,8 +6,8 @@ import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.actors.controls.ContraptionControlsMovement.ElevatorFloorSelection; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; @@ -55,14 +55,14 @@ public class ContraptionControlsRenderer extends SmartBlockEntityRenderer isRecipeAllowed(r, craftinginventory)) @@ -165,7 +165,7 @@ public class RecipeGridHandler { numItems++; } } - if (numItems > AllConfigs.SERVER.recipes.maxFireworkIngredientsInCrafter.get()) { + if (numItems > AllConfigs.server().recipes.maxFireworkIngredientsInCrafter.get()) { return false; } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ShaftlessCogwheelInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ShaftlessCogwheelInstance.java index 58715c524..f1b532632 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ShaftlessCogwheelInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ShaftlessCogwheelInstance.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; @@ -23,7 +23,7 @@ public class ShaftlessCogwheelInstance extends SingleRotatingInstance getModel() { Direction facing = blockState.getValue(MechanicalCrafterBlock.HORIZONTAL_FACING); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState, facing, rotateToFace(facing)); + return getRotatingMaterial().getModel(AllPartialModels.SHAFTLESS_COGWHEEL, blockState, facing, rotateToFace(facing)); } private Supplier rotateToFace(Direction facing) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java index ab3cf52fc..3044730f6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank; import com.jozufozu.flywheel.core.PartialModel; import com.simibubi.create.AllBlockEntityTypes; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.foundation.advancement.AllAdvancements; @@ -55,7 +55,7 @@ public class HandCrankBlock extends DirectionalKineticBlock @OnlyIn(Dist.CLIENT) public PartialModel getRenderedHandle() { - return AllBlockPartials.HAND_CRANK_HANDLE; + return AllPartialModels.HAND_CRANK_HANDLE; } public int getRotationSpeed() { @@ -74,7 +74,7 @@ public class HandCrankBlock extends DirectionalKineticBlock return InteractionResult.PASS; withBlockEntityDo(worldIn, pos, be -> be.turn(player.isShiftKeyDown())); - player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF()); + player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.server().kinetics.crankHungerMultiplier.getF()); if (player.getFoodData() .getFoodLevel() == 0) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlockEntity.java index ab2ec3fee..517182f08 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlockEntity.java @@ -218,7 +218,7 @@ public class CrushingWheelControllerBlockEntity extends SmartBlockEntity { if (!(processingEntity instanceof ItemEntity)) { Vec3 entityOutPos = outPos.add(facing.getAxis() == Axis.X ? .5f * offset : 0f, facing.getAxis() == Axis.Y ? .5f * offset : 0f, facing.getAxis() == Axis.Z ? .5f * offset : 0f); - int crusherDamage = AllConfigs.SERVER.kinetics.crushingDamage.get(); + int crusherDamage = AllConfigs.server().kinetics.crushingDamage.get(); if (processingEntity instanceof LivingEntity) { if ((((LivingEntity) processingEntity).getHealth() - crusherDamage <= 0) // Takes LivingEntity instances diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java index ce24a1403..75be2b4af 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java @@ -11,7 +11,7 @@ import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; @@ -61,7 +61,7 @@ public class DeployerActorInstance extends ActorInstance { xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0; zRot = rotatePole ? 90 : 0; - pole = mat.getModel(AllBlockPartials.DEPLOYER_POLE, state).createInstance(); + pole = mat.getModel(AllPartialModels.DEPLOYER_POLE, state).createInstance(); hand = mat.getModel(handPose, state).createInstance(); Direction.Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlockEntity.java index f879c371a..f2c9fbbe7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlockEntity.java @@ -9,8 +9,8 @@ import java.util.List; import javax.annotation.Nullable; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.content.contraptions.base.IRotate.StressImpact; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; @@ -425,8 +425,8 @@ public class DeployerBlockEntity extends KineticBlockEntity { @OnlyIn(Dist.CLIENT) public PartialModel getHandPose() { - return mode == Mode.PUNCH ? AllBlockPartials.DEPLOYER_HAND_PUNCHING - : heldItem.isEmpty() ? AllBlockPartials.DEPLOYER_HAND_POINTING : AllBlockPartials.DEPLOYER_HAND_HOLDING; + return mode == Mode.PUNCH ? AllPartialModels.DEPLOYER_HAND_PUNCHING + : heldItem.isEmpty() ? AllPartialModels.DEPLOYER_HAND_POINTING : AllPartialModels.DEPLOYER_HAND_HOLDING; } @Override @@ -519,8 +519,8 @@ public class DeployerBlockEntity extends KineticBlockEntity { } if (state == State.RETRACTING) progress = (timer - partialTicks * timerSpeed) / 1000f; - float handLength = handPose == AllBlockPartials.DEPLOYER_HAND_POINTING ? 0 - : handPose == AllBlockPartials.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f; + float handLength = handPose == AllPartialModels.DEPLOYER_HAND_POINTING ? 0 + : handPose == AllPartialModels.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f; float distance = Math.min(Mth.clamp(progress, 0, 1) * (reach + handLength), 21 / 16f); return distance; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java index 8adeeade7..d904ab5c0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java @@ -141,7 +141,7 @@ public class DeployerFakePlayer extends FakePlayer { return; Mob mob = (Mob) entityLiving; - CKinetics.DeployerAggroSetting setting = AllConfigs.SERVER.kinetics.ignoreDeployerAttacks.get(); + CKinetics.DeployerAggroSetting setting = AllConfigs.server().kinetics.ignoreDeployerAttacks.get(); switch (setting) { case ALL: diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java index d09ee6ada..394a0534f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java @@ -9,7 +9,7 @@ import com.jozufozu.flywheel.api.instance.TickableInstance; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; import com.mojang.math.Quaternion; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -44,7 +44,7 @@ public class DeployerInstance extends ShaftInstance impleme xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0; zRot = rotatePole ? 90 : 0; - pole = getOrientedMaterial().getModel(AllBlockPartials.DEPLOYER_POLE, blockState).createInstance(); + pole = getOrientedMaterial().getModel(AllPartialModels.DEPLOYER_POLE, blockState).createInstance(); currentHand = this.blockEntity.getHandPose(); @@ -104,8 +104,8 @@ public class DeployerInstance extends ShaftInstance impleme } private void updatePosition() { - float handLength = currentHand == AllBlockPartials.DEPLOYER_HAND_POINTING ? 0 - : currentHand == AllBlockPartials.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f; + float handLength = currentHand == AllPartialModels.DEPLOYER_HAND_POINTING ? 0 + : currentHand == AllPartialModels.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f; float distance = Math.min(Mth.clamp(progress, 0, 1) * (blockEntity.reach + handLength), 21 / 16f); Vec3i facingVec = facing.getNormal(); BlockPos blockPos = getInstancePosition(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java index 295b3cea7..9105bb959 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java @@ -10,8 +10,8 @@ import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; @@ -120,7 +120,7 @@ public class DeployerRenderer extends SafeBlockEntityRenderer getModel() { - return getRotatingMaterial().getModel(AllBlockPartials.MILLSTONE_COG, blockEntity.getBlockState()); + return getRotatingMaterial().getModel(AllPartialModels.MILLSTONE_COG, blockEntity.getBlockState()); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneRenderer.java index 3eaac36d5..76fdf0c03 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneRenderer.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.components.millstone; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -16,7 +16,7 @@ public class MillstoneRenderer extends KineticBlockEntityRenderer> getMatchingRecipes() { List> matchingRecipes = super.getMatchingRecipes(); - if (!AllConfigs.SERVER.recipes.allowBrewingInMixer.get()) + if (!AllConfigs.server().recipes.allowBrewingInMixer.get()) return matchingRecipes; Optional basin = getBasin(); @@ -254,7 +254,7 @@ public class MechanicalMixerBlockEntity extends BasinOperatingBlockEntity { @Override protected boolean matchStaticFilters(Recipe r) { return ((r instanceof CraftingRecipe && !(r instanceof IShapedRecipe) - && AllConfigs.SERVER.recipes.allowShapelessInMixer.get() && r.getIngredients() + && AllConfigs.server().recipes.allowShapelessInMixer.get() && r.getIngredients() .size() > 1 && !MechanicalPressBlockEntity.canCompress(r)) && !AllRecipeTypes.shouldIgnoreInAutomation(r) || r.getType() == AllRecipeTypes.MIXING.getType()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java index 86796f54b..682a099ff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.mixer; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -36,7 +36,7 @@ public class MechanicalMixerRenderer extends KineticBlockEntityRenderer getCogModel() { return materialManager.defaultSolid() .material(AllMaterialSpecs.ROTATING) - .getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockEntity.getBlockState()); + .getModel(AllPartialModels.SHAFTLESS_COGWHEEL, blockEntity.getBlockState()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorBlockEntity.java index 2bab97a98..677fe2a15 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorBlockEntity.java @@ -27,7 +27,7 @@ public class CreativeMotorBlockEntity extends GeneratingKineticBlockEntity { @Override public void addBehaviours(List behaviours) { super.addBehaviours(behaviours); - Integer max = AllConfigs.SERVER.kinetics.maxMotorSpeed.get(); + Integer max = AllConfigs.server().kinetics.maxMotorSpeed.get(); CenteredSideValueBoxTransform slot = new CenteredSideValueBoxTransform( (motor, side) -> motor.getValue(CreativeMotorBlock.FACING) == side.getOpposite()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorRenderer.java index 650749aaa..e230eb55d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/motor/CreativeMotorRenderer.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.components.motor; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -16,7 +16,7 @@ public class CreativeMotorRenderer extends KineticBlockEntityRenderer boolean canCompress(Recipe recipe) { - if (!(recipe instanceof CraftingRecipe) || !AllConfigs.SERVER.recipes.allowShapedSquareInPress.get()) + if (!(recipe instanceof CraftingRecipe) || !AllConfigs.server().recipes.allowShapedSquareInPress.get()) return false; NonNullList ingredients = recipe.getIngredients(); return (ingredients.size() == 4 || ingredients.size() == 9) && ItemHelper.matchAllIngredients(ingredients); @@ -212,7 +212,7 @@ public class MechanicalPressBlockEntity extends BasinOperatingBlockEntity implem @Override public boolean canProcessInBulk() { - return AllConfigs.SERVER.recipes.bulkPressing.get(); + return AllConfigs.server().recipes.bulkPressing.get(); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressRenderer.java index 0d3cf424b..57bfad923 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressRenderer.java @@ -4,7 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -38,7 +38,7 @@ public class MechanicalPressRenderer extends KineticBlockEntityRenderer imp pressHead = materialManager.defaultSolid() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState) + .getModel(AllPartialModels.MECHANICAL_PRESS_HEAD, blockState) .createInstance(); Quaternion q = Vector3f.YP diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlockEntity.java index f050b748d..360511584 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlockEntity.java @@ -86,7 +86,7 @@ public class SawBlockEntity extends BlockBreakingKineticBlockEntity { public SawBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); - inventory = new ProcessingInventory(this::start).withSlotLimit(!AllConfigs.SERVER.recipes.bulkCutting.get()); + inventory = new ProcessingInventory(this::start).withSlotLimit(!AllConfigs.server().recipes.bulkCutting.get()); inventory.remainingTime = -1; recipeIndex = 0; invProvider = LazyOptional.of(() -> inventory); @@ -366,8 +366,8 @@ public class SawBlockEntity extends BlockBreakingKineticBlockEntity { return ImmutableList.of(assemblyRecipe.get()); Predicate> types = RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType(), - AllConfigs.SERVER.recipes.allowStonecuttingOnSaw.get() ? RecipeType.STONECUTTING : null, - AllConfigs.SERVER.recipes.allowWoodcuttingOnSaw.get() ? woodcuttingRecipeType.get() : null); + AllConfigs.server().recipes.allowStonecuttingOnSaw.get() ? RecipeType.STONECUTTING : null, + AllConfigs.server().recipes.allowWoodcuttingOnSaw.get() ? woodcuttingRecipeType.get() : null); List> startedSearch = RecipeFinder.get(cuttingRecipesKey, level, types); return startedSearch.stream() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java index 44aa878ee..ec9436296 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.saw; import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; @@ -24,7 +24,7 @@ public class SawInstance extends SingleRotatingInstance { .isHorizontal()) { BlockState referenceState = blockState.rotate(blockEntity.getLevel(), blockEntity.getBlockPos(), Rotation.CLOCKWISE_180); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, referenceState, facing); + return getRotatingMaterial().getModel(AllPartialModels.SHAFT_HALF, referenceState, facing); } else { return getRotatingMaterial().getModel(shaft()); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java index 8e98f80b8..1c309c875 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java @@ -7,7 +7,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; @@ -60,19 +60,19 @@ public class SawRenderer extends SafeBlockEntityRenderer { if (SawBlock.isHorizontal(blockState)) { if (speed > 0) { - partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_ACTIVE; + partial = AllPartialModels.SAW_BLADE_HORIZONTAL_ACTIVE; } else if (speed < 0) { - partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_REVERSED; + partial = AllPartialModels.SAW_BLADE_HORIZONTAL_REVERSED; } else { - partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_INACTIVE; + partial = AllPartialModels.SAW_BLADE_HORIZONTAL_INACTIVE; } } else { if (be.getSpeed() > 0) { - partial = AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE; + partial = AllPartialModels.SAW_BLADE_VERTICAL_ACTIVE; } else if (speed < 0) { - partial = AllBlockPartials.SAW_BLADE_VERTICAL_REVERSED; + partial = AllPartialModels.SAW_BLADE_VERTICAL_REVERSED; } else { - partial = AllBlockPartials.SAW_BLADE_VERTICAL_INACTIVE; + partial = AllPartialModels.SAW_BLADE_VERTICAL_INACTIVE; } if (blockState.getValue(SawBlock.AXIS_ALONG_FIRST_COORDINATE)) @@ -147,7 +147,7 @@ public class SawRenderer extends SafeBlockEntityRenderer { if (state.getValue(FACING) .getAxis() .isHorizontal()) - return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, + return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state.rotate(be.getLevel(), be.getBlockPos(), Rotation.CLOCKWISE_180)); return CachedBufferer.block(KineticBlockEntityRenderer.KINETIC_BLOCK, getRenderedBlockState(be)); @@ -178,14 +178,14 @@ public class SawRenderer extends SafeBlockEntityRenderer { SuperByteBuffer superBuffer; if (SawBlock.isHorizontal(state)) { if (shouldAnimate) - superBuffer = CachedBufferer.partial(AllBlockPartials.SAW_BLADE_HORIZONTAL_ACTIVE, state); + superBuffer = CachedBufferer.partial(AllPartialModels.SAW_BLADE_HORIZONTAL_ACTIVE, state); else - superBuffer = CachedBufferer.partial(AllBlockPartials.SAW_BLADE_HORIZONTAL_INACTIVE, state); + superBuffer = CachedBufferer.partial(AllPartialModels.SAW_BLADE_HORIZONTAL_INACTIVE, state); } else { if (shouldAnimate) - superBuffer = CachedBufferer.partial(AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE, state); + superBuffer = CachedBufferer.partial(AllPartialModels.SAW_BLADE_VERTICAL_ACTIVE, state); else - superBuffer = CachedBufferer.partial(AllBlockPartials.SAW_BLADE_VERTICAL_INACTIVE, state); + superBuffer = CachedBufferer.partial(AllPartialModels.SAW_BLADE_VERTICAL_INACTIVE, state); } superBuffer.transform(matrices.getModel()) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineInstance.java index 0f55ffc9f..fba80524f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineInstance.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; @@ -24,15 +24,15 @@ public class SteamEngineInstance extends BlockEntityInstance Direction direction = blockState.getValue(WhistleBlock.FACING); WhistleSize size = blockState.getValue(WhistleBlock.SIZE); - PartialModel mouth = size == WhistleSize.LARGE ? AllBlockPartials.WHISTLE_MOUTH_LARGE - : size == WhistleSize.MEDIUM ? AllBlockPartials.WHISTLE_MOUTH_MEDIUM : AllBlockPartials.WHISTLE_MOUTH_SMALL; + PartialModel mouth = size == WhistleSize.LARGE ? AllPartialModels.WHISTLE_MOUTH_LARGE + : size == WhistleSize.MEDIUM ? AllPartialModels.WHISTLE_MOUTH_MEDIUM : AllPartialModels.WHISTLE_MOUTH_SMALL; float offset = be.animation.getValue(partialTicks); if (be.animation.getChaseTarget() > 0 && be.animation.getValue() > 0.5f) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java index 3ffaea33e..dcf514392 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java @@ -162,7 +162,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit return; contraption.getSeatMapping() .put(passenger.getUUID(), seatIndex); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionSeatMappingPacket(getId(), contraption.getSeatMapping())); } @@ -179,7 +179,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit .put("ContraptionDismountLocation", VecHelper.writeNBT(transformedVector)); contraption.getSeatMapping() .remove(passenger.getUUID()); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionSeatMappingPacket(getId(), contraption.getSeatMapping(), passenger.getId())); } @@ -269,7 +269,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit public void stopControlling(BlockPos controlsLocalPos) { getControllingPlayer().map(level::getPlayerByUUID) .map(p -> (p instanceof ServerPlayer) ? ((ServerPlayer) p) : null) - .ifPresent(p -> AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> p), + .ifPresent(p -> AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> p), new ControlsStopControllingPacket())); setControllingPlayer(null); } @@ -412,7 +412,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit public void setBlock(BlockPos localPos, StructureBlockInfo newInfo) { contraption.blocks.put(localPos, newInfo); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionBlockChangedPacket(getId(), localPos, newInfo.state)); } @@ -508,7 +508,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit } protected void onContraptionStalled() { - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionStallPacket(getId(), getX(), getY(), getZ(), getStalledAngle())); } @@ -649,7 +649,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit StructureTransform transform = makeStructureTransform(); contraption.stop(level); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionDisassemblyPacket(this.getId(), transform)); contraption.addBlocksToWorld(level, transform); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java index 630d563b1..0938b4e8b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java @@ -62,11 +62,11 @@ public class AssemblyException extends Exception { } public static AssemblyException structureTooLarge() { - return new AssemblyException("structureTooLarge", AllConfigs.SERVER.kinetics.maxBlocksMoved.get()); + return new AssemblyException("structureTooLarge", AllConfigs.server().kinetics.maxBlocksMoved.get()); } public static AssemblyException tooManyPistonPoles() { - return new AssemblyException("tooManyPistonPoles", AllConfigs.SERVER.kinetics.maxPistonPoles.get()); + return new AssemblyException("tooManyPistonPoles", AllConfigs.server().kinetics.maxPistonPoles.get()); } public static AssemblyException noPistonPoles() { @@ -74,7 +74,7 @@ public class AssemblyException extends Exception { } public static AssemblyException notEnoughSails(int sails) { - return new AssemblyException("not_enough_sails", sails, AllConfigs.SERVER.kinetics.minimumWindmillSails.get()); + return new AssemblyException("not_enough_sails", sails, AllConfigs.server().kinetics.minimumWindmillSails.get()); } public boolean hasPosition() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 1b861a9ee..b60c7236f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -420,7 +420,7 @@ public abstract class Contraption { } addBlock(pos, capture(world, pos)); - if (blocks.size() <= AllConfigs.SERVER.kinetics.maxBlocksMoved.get()) + if (blocks.size() <= AllConfigs.server().kinetics.maxBlocksMoved.get()) return true; else throw AssemblyException.structureTooLarge(); @@ -545,7 +545,7 @@ public abstract class Contraption { } private void movePulley(Level world, BlockPos pos, Queue frontier, Set visited) { - int limit = AllConfigs.SERVER.kinetics.maxRopeLength.get(); + int limit = AllConfigs.server().kinetics.maxRopeLength.get(); BlockPos ropePos = pos; while (limit-- >= 0) { ropePos = ropePos.below(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java index 459d04551..7b2110c8a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java @@ -354,7 +354,7 @@ public class ContraptionCollider { entity.fallDistance = 0; for (Entity rider : entity.getIndirectPassengers()) if (getPlayerType(rider) == PlayerType.CLIENT) - AllPackets.channel.sendToServer(new ClientMotionPacket(rider.getDeltaMovement(), true, 0)); + AllPackets.getChannel().sendToServer(new ClientMotionPacket(rider.getDeltaMovement(), true, 0)); boolean canWalk = bounce != 0 || slide == 0; if (canWalk || !rotation.hasVerticalRotation()) { if (canWalk) @@ -378,7 +378,7 @@ public class ContraptionCollider { float limbSwing = Mth.sqrt((float) (d0 * d0 + d1 * d1)) * 4.0F; if (limbSwing > 1.0F) limbSwing = 1.0F; - AllPackets.channel.sendToServer(new ClientMotionPacket(entityMotion, true, limbSwing)); + AllPackets.getChannel().sendToServer(new ClientMotionPacket(entityMotion, true, limbSwing)); if (entity.isOnGround() && contraption instanceof TranslatingContraption) { safetyLock.setLeft(new WeakReference<>(contraptionEntity)); @@ -460,7 +460,7 @@ public class ContraptionCollider { return entityMotion; if (cce.nonDamageTicks != 0) return entityMotion; - if (!AllConfigs.SERVER.trains.trainsCauseDamage.get()) + if (!AllConfigs.server().trains.trainsCauseDamage.get()) return entityMotion; Vec3 diffMotion = contraptionMotion.subtract(entity.getDeltaMovement()); @@ -477,7 +477,7 @@ public class ContraptionCollider { return entityMotion; if (playerType == PlayerType.CLIENT) { - AllPackets.channel.sendToServer(new TrainCollisionPacket((int) (damage * 16), contraptionEntity.getId())); + AllPackets.getChannel().sendToServer(new TrainCollisionPacket((int) (damage * 16), contraptionEntity.getId())); world.playSound((Player) entity, entity.blockPosition(), SoundEvents.PLAYER_ATTACK_CRIT, SoundSource.NEUTRAL, 1, .75f); } else { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandlerClient.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandlerClient.java index 0ebf07fee..6f6f3adfc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandlerClient.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandlerClient.java @@ -109,7 +109,7 @@ public class ContraptionHandlerClient { BlockPos pos = rayTraceResult.getBlockPos(); if (contraptionEntity.handlePlayerInteraction(player, pos, face, hand)) { - AllPackets.channel.sendToServer(new ContraptionInteractionPacket(contraptionEntity, hand, pos, face)); + AllPackets.getChannel().sendToServer(new ContraptionInteractionPacket(contraptionEntity, hand, pos, face)); } else if (handleSpecialInteractions(contraptionEntity, player, pos, face, hand)) { } else continue; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MountedFluidStorage.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MountedFluidStorage.java index 142d82014..7a6497cff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MountedFluidStorage.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MountedFluidStorage.java @@ -63,7 +63,7 @@ public class MountedFluidStorage { packetCooldown--; else if (sendPacket) { sendPacket = false; - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), new ContraptionFluidPacket(entity.getId(), pos, tank.getFluid())); packetCooldown = 8; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java index cba2d315e..dd339ae4d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java @@ -52,7 +52,7 @@ public interface MovementBehaviour { default void dropItem(MovementContext context, ItemStack stack) { ItemStack remainder; - if (AllConfigs.SERVER.kinetics.moveItemsToStorage.get()) + if (AllConfigs.server().kinetics.moveItemsToStorage.get()) remainder = ItemHandlerHelper.insertItem(context.contraption.getSharedInventory(), stack, false); else remainder = stack; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java index 3c66e2c60..c65140e04 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java @@ -13,7 +13,7 @@ public class NonStationaryLighter extends ContraptionLigh @Override public boolean tickLightListener() { - if (getVolume().volume() > AllConfigs.CLIENT.maxContraptionLightVolume.get()) + if (getVolume().volume() > AllConfigs.client().maxContraptionLightVolume.get()) return false; ImmutableBox contraptionBounds = getContraptionBounds(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java index 0d470707d..d69812e73 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java @@ -42,7 +42,7 @@ public class BearingContraption extends Contraption { return false; startMoving(world); expandBoundsAroundAxis(facing.getAxis()); - if (isWindmill && sailBlocks < AllConfigs.SERVER.kinetics.minimumWindmillSails.get()) + if (isWindmill && sailBlocks < AllConfigs.server().kinetics.minimumWindmillSails.get()) throw AssemblyException.notEnoughSails(sailBlocks); if (blocks.isEmpty()) return false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java index afee11ed2..f8088f215 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; import com.mojang.math.Quaternion; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.BackHalfShaftInstance; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.foundation.utility.AngleHelper; @@ -30,7 +30,7 @@ public class BearingInstance blockOrientation = getBlockStateOrientation(facing); PartialModel top = - blockEntity.isWoodenTop() ? AllBlockPartials.BEARING_TOP_WOODEN : AllBlockPartials.BEARING_TOP; + blockEntity.isWoodenTop() ? AllPartialModels.BEARING_TOP_WOODEN : AllPartialModels.BEARING_TOP; topInstance = getOrientedMaterial().getModel(top, blockState).createInstance(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java index 386afeeb2..5f351fdf1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; @@ -34,7 +34,7 @@ public class BearingRenderer final Direction facing = be.getBlockState() .getValue(BlockStateProperties.FACING); PartialModel top = - be.isWoodenTop() ? AllBlockPartials.BEARING_TOP_WOODEN : AllBlockPartials.BEARING_TOP; + be.isWoodenTop() ? AllPartialModels.BEARING_TOP_WOODEN : AllPartialModels.BEARING_TOP; SuperByteBuffer superBuffer = CachedBufferer.partial(top, be.getBlockState()); float interpolatedAngle = be.getInterpolatedAngle(partialTicks - 1); @@ -50,7 +50,7 @@ public class BearingRenderer @Override protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) { - return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, state, state + return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state, state .getValue(BearingBlock.FACING) .getOpposite()); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java index 88d9b7998..23c5c8d88 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.core.materials.oriented.OrientedData; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.math.Quaternion; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; @@ -38,7 +38,7 @@ public class StabilizedBearingInstance extends ActorInstance { topInstance = materialManager.defaultSolid() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.BEARING_TOP, blockState) + .getModel(AllPartialModels.BEARING_TOP, blockState) .createInstance(); int blockLight = localBlockLight(); @@ -48,7 +48,7 @@ public class StabilizedBearingInstance extends ActorInstance { shaft = materialManager.defaultSolid() .material(AllMaterialSpecs.ROTATING) - .getModel(AllBlockPartials.SHAFT_HALF, blockState, blockState.getValue(BlockStateProperties.FACING).getOpposite()) + .getModel(AllPartialModels.SHAFT_HALF, blockState, blockState.getValue(BlockStateProperties.FACING).getOpposite()) .createInstance(); // not rotating so no need to set speed, axis, etc. diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java index 16d5fb7bd..53084c90e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.math.Quaternion; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; @@ -43,7 +43,7 @@ public class StabilizedBearingMovementBehaviour implements MovementBehaviour { return; Direction facing = context.state.getValue(BlockStateProperties.FACING); - PartialModel top = AllBlockPartials.BEARING_TOP; + PartialModel top = AllPartialModels.BEARING_TOP; SuperByteBuffer superBuffer = CachedBufferer.partial(top, context.state); float renderPartialTicks = AnimationTickHolder.getPartialTicks(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlockEntity.java index b3780c548..6c7998850 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlockEntity.java @@ -67,7 +67,7 @@ public class WindmillBearingBlockEntity extends MechanicalBearingBlockEntity { if (movedContraption == null) return lastGeneratedSpeed; int sails = ((BearingContraption) movedContraption.getContraption()).getSailBlocks() - / AllConfigs.SERVER.kinetics.windmillSailsPerRPM.get(); + / AllConfigs.server().kinetics.windmillSailsPerRPM.get(); return Mth.clamp(sails, 1, 16) * getAngleSpeedDirection(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisBlockEntity.java index 3383f28b8..45d20537f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisBlockEntity.java @@ -40,7 +40,7 @@ public class ChassisBlockEntity extends SmartBlockEntity { @Override public void addBehaviours(List behaviours) { - int max = AllConfigs.SERVER.kinetics.maxChassisRange.get(); + int max = AllConfigs.server().kinetics.maxChassisRange.get(); range = new BulkScrollValueBehaviour(Lang.translateDirect("generic.range"), this, new CenteredSideValueBoxTransform(), be -> ((ChassisBlockEntity) be).collectChassisGroup()); range.requiresWrench(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java index 58f258a60..790de505b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -24,7 +24,7 @@ public class StickerInstance extends BlockEntityInstance imp public StickerInstance(MaterialManager materialManager, StickerBlockEntity blockEntity) { super(materialManager, blockEntity); - head = getTransformMaterial().getModel(AllBlockPartials.STICKER_HEAD, blockState).createInstance(); + head = getTransformMaterial().getModel(AllPartialModels.STICKER_HEAD, blockState).createInstance(); fakeWorld = blockEntity.getLevel() != Minecraft.getInstance().level; facing = blockState.getValue(StickerBlock.FACING); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java index 5f15b1f43..4aaeb367c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.ch import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -28,7 +28,7 @@ public class StickerRenderer extends SafeBlockEntityRenderer if (Backend.canUseInstancing(be.getLevel())) return; BlockState state = be.getBlockState(); - SuperByteBuffer head = CachedBufferer.partial(AllBlockPartials.STICKER_HEAD, state); + SuperByteBuffer head = CachedBufferer.partial(AllPartialModels.STICKER_HEAD, state); float offset = be.piston.getValue(AnimationTickHolder.getPartialTicks(be.getLevel())); if (be.getLevel() != Minecraft.getInstance().level && !be.isVirtual()) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContactScreen.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContactScreen.java index a7d2f8466..31e712eb1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContactScreen.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContactScreen.java @@ -164,7 +164,7 @@ public class ElevatorContactScreen extends AbstractSimiScreen { } private void confirm() { - AllPackets.channel.sendToServer(new ElevatorContactEditPacket(pos, shortName, longName)); + AllPackets.getChannel().sendToServer(new ElevatorContactEditPacket(pos, shortName, longName)); onClose(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContraption.java index d4feb1f7d..7ec0811d9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorContraption.java @@ -71,7 +71,7 @@ public class ElevatorContraption extends PulleyContraption { namesList = column.compileNamesList(); namesListVersion = column.namesListVersion; - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), new ElevatorFloorListPacket(entity, namesList)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorFloorListPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorFloorListPacket.java index b314c10fe..972d9bf02 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorFloorListPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorFloorListPacket.java @@ -92,7 +92,7 @@ public class ElevatorFloorListPacket extends SimplePacketBase { return; if (!(ace.getContraption()instanceof ElevatorContraption ec)) return; - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> sender), + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> sender), new ElevatorFloorListPacket(ace, ec.namesList)); }); ctx.setPacketHandled(true); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyBlockEntity.java index 7ca64fbaf..16e5bdf3f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyBlockEntity.java @@ -53,7 +53,7 @@ public class ElevatorPulleyBlockEntity extends PulleyBlockEntity { if (offset >= 0) resetContraptionToOffset(); if (level.isClientSide) { - AllPackets.channel.sendToServer(new ElevatorFloorListPacket.RequestFloorList(contraption)); + AllPackets.getChannel().sendToServer(new ElevatorFloorListPacket.RequestFloorList(contraption)); return; } @@ -233,7 +233,7 @@ public class ElevatorPulleyBlockEntity extends PulleyBlockEntity { if (getSpeed() == 0) return; - int maxLength = AllConfigs.SERVER.kinetics.maxRopeLength.get(); + int maxLength = AllConfigs.server().kinetics.maxRopeLength.get(); int i = 1; while (i <= maxLength) { BlockPos ropePos = worldPosition.below(i); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyRenderer.java index 02844c052..497d082e0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorPulleyRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.el import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; @@ -50,7 +50,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer .75f) { @@ -105,7 +105,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer this), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new GantryContraptionUpdatePacket(getId(), getAxisCoord(), axisMotion)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java index 66ed67c86..19433d747 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java @@ -50,7 +50,7 @@ public class SuperGlueHandler { BlockPos relative = pos.relative(direction); if (SuperGlueEntity.isGlued(world, pos, direction, cached) && BlockMovementChecks.isMovementNecessary(world.getBlockState(relative), entity.level, relative)) - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), new GlueEffectPacket(pos, direction, true)); } @@ -101,7 +101,7 @@ public class SuperGlueHandler { if (SuperGlueEntity.isValidFace(world, gluePos, face)) { if (!world.isClientSide) { world.addFreshEntity(entity); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), new GlueEffectPacket(gluePos, face, true)); } itemstack.hurtAndBreak(1, placer, SuperGlueItem::onBroken); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueSelectionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueSelectionHandler.java index b6ecc76de..41539bf7e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueSelectionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueSelectionHandler.java @@ -193,7 +193,7 @@ public class SuperGlueSelectionHandler { if (attack) { if (selected == null) return false; - AllPackets.channel.sendToServer(new SuperGlueRemovalPacket(selected.getId(), soundSourceForRemoval)); + AllPackets.getChannel().sendToServer(new SuperGlueRemovalPacket(selected.getId(), soundSourceForRemoval)); selected = null; clusterCooldown = 0; return true; @@ -251,7 +251,7 @@ public class SuperGlueSelectionHandler { public void confirm() { LocalPlayer player = Minecraft.getInstance().player; - AllPackets.channel.sendToServer(new SuperGlueSelectionPacket(firstPos, hoveredPos)); + AllPackets.getChannel().sendToServer(new SuperGlueSelectionPacket(firstPos, hoveredPos)); AllSoundEvents.SLIME_ADDED.playAt(player.level, hoveredPos, 0.5F, 0.95F, false); player.level.playSound(player, hoveredPos, SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, 0.75f, 1); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsHandler.java index 3017f10d3..25b8a09a6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsHandler.java @@ -49,7 +49,7 @@ public class ControlsHandler { AbstractContraptionEntity abstractContraptionEntity = entityRef.get(); if (!currentlyPressed.isEmpty() && abstractContraptionEntity != null) - AllPackets.channel.sendToServer(new ControlsInputPacket(currentlyPressed, false, + AllPackets.getChannel().sendToServer(new ControlsInputPacket(currentlyPressed, false, abstractContraptionEntity.getId(), controlsPos, false)); packetCooldown = 0; @@ -73,7 +73,7 @@ public class ControlsHandler { .getWindow(), GLFW.GLFW_KEY_ESCAPE)) { BlockPos pos = controlsPos; stopControlling(); - AllPackets.channel + AllPackets.getChannel() .sendToServer(new ControlsInputPacket(currentlyPressed, false, entity.getId(), pos, true)); return; } @@ -92,14 +92,14 @@ public class ControlsHandler { // Released Keys if (!releasedKeys.isEmpty()) { - AllPackets.channel + AllPackets.getChannel() .sendToServer(new ControlsInputPacket(releasedKeys, false, entity.getId(), controlsPos, false)); // AllSoundEvents.CONTROLLER_CLICK.playAt(player.level, player.blockPosition(), 1f, .5f, true); } // Newly Pressed Keys if (!newKeys.isEmpty()) { - AllPackets.channel.sendToServer(new ControlsInputPacket(newKeys, true, entity.getId(), controlsPos, false)); + AllPackets.getChannel().sendToServer(new ControlsInputPacket(newKeys, true, entity.getId(), controlsPos, false)); packetCooldown = PACKET_RATE; // AllSoundEvents.CONTROLLER_CLICK.playAt(player.level, player.blockPosition(), 1f, .75f, true); } @@ -107,7 +107,7 @@ public class ControlsHandler { // Keepalive Pressed Keys if (packetCooldown == 0) { // if (!pressedKeys.isEmpty()) { - AllPackets.channel + AllPackets.getChannel() .sendToServer(new ControlsInputPacket(pressedKeys, true, entity.getId(), controlsPos, false)); packetCooldown = PACKET_RATE; // } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsRenderer.java index 6bbfe9b0a..6432727bf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.in import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; @@ -25,7 +25,7 @@ public class ControlsRenderer { BlockState state = context.state; Direction facing = state.getValue(ControlsBlock.FACING); - SuperByteBuffer cover = CachedBufferer.partial(AllBlockPartials.TRAIN_CONTROLS_COVER, state); + SuperByteBuffer cover = CachedBufferer.partial(AllPartialModels.TRAIN_CONTROLS_COVER, state); float hAngle = 180 + AngleHelper.horizontalAngle(facing); PoseStack ms = matrices.getModel(); cover.transform(ms) @@ -39,7 +39,7 @@ public class ControlsRenderer { for (boolean first : Iterate.trueAndFalse) { float vAngle = (float) Mth.clamp(first ? firstLever * 70 - 25 : secondLever * 15, -45, 45); - SuperByteBuffer lever = CachedBufferer.partial(AllBlockPartials.TRAIN_CONTROLS_LEVER, state); + SuperByteBuffer lever = CachedBufferer.partial(AllPartialModels.TRAIN_CONTROLS_LEVER, state); ms.pushPose(); TransformStack.cast(ms) .centre() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/HonkPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/HonkPacket.java index 4dac38aa9..152e2582f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/HonkPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/HonkPacket.java @@ -54,7 +54,7 @@ public class HonkPacket extends SimplePacketBase { train.honkTicks = train.honkTicks > 5 ? 6 : 0; } else { AllAdvancements.TRAIN_WHISTLE.awardTo(sender); - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new HonkPacket(train, isHonk)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new HonkPacket(train, isHonk)); } }); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/TrainHUD.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/TrainHUD.java index 3a7b7d211..ca9844ceb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/TrainHUD.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/TrainHUD.java @@ -60,7 +60,7 @@ public class TrainHUD { Train train = carriage.train; double value = - Math.abs(train.speed) / (train.maxSpeed() * AllConfigs.SERVER.trains.manualTrainSpeedModifier.getF()); + Math.abs(train.speed) / (train.maxSpeed() * AllConfigs.server().trains.manualTrainSpeedModifier.getF()); value = Mth.clamp(value + 0.05f, 0, 1); displayedSpeed.chase((int) (value * 18) / 18f, .5f, Chaser.EXP); @@ -73,14 +73,14 @@ public class TrainHUD { if (isSprintKeyPressed && honkPacketCooldown-- <= 0) { train.determineHonk(mc.level); if (train.lowHonk != null) { - AllPackets.channel.sendToServer(new HonkPacket.Serverbound(train, true)); + AllPackets.getChannel().sendToServer(new HonkPacket.Serverbound(train, true)); honkPacketCooldown = 5; usedToHonk = true; } } if (!isSprintKeyPressed && usedToHonk) { - AllPackets.channel.sendToServer(new HonkPacket.Serverbound(train, false)); + AllPackets.getChannel().sendToServer(new HonkPacket.Serverbound(train, false)); honkPacketCooldown = 0; usedToHonk = false; } @@ -94,7 +94,7 @@ public class TrainHUD { } if (hudPacketCooldown-- <= 0) { - AllPackets.channel.sendToServer(new TrainHUDUpdatePacket.Serverbound(train, editedThrottle)); + AllPackets.getChannel().sendToServer(new TrainHUDUpdatePacket.Serverbound(train, editedThrottle)); hudPacketCooldown = 5; } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java index 3dd2ff7c1..fec6b653c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java @@ -204,7 +204,7 @@ public class MinecartContraptionItem extends Item { Player player = event.getPlayer(); if (player == null || entity == null) return; - if (!AllConfigs.SERVER.kinetics.survivalContraptionPickup.get() && !player.isCreative()) + if (!AllConfigs.server().kinetics.survivalContraptionPickup.get() && !player.isCreative()) return; ItemStack wrench = player.getItemInHand(event.getHand()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonBlock.java index b85a021b2..57fa9818c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonBlock.java @@ -189,7 +189,7 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implement } public static int maxAllowedPistonPoles() { - return AllConfigs.SERVER.kinetics.maxPistonPoles.get(); + return AllConfigs.server().kinetics.maxPistonPoles.get(); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java index e26461590..b67e3f5ef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java @@ -160,7 +160,7 @@ public class PistonContraption extends TranslatingContraption { boolean retracting = direction != orientation; if (retracting && !sticky) return true; - for (int offset = 0; offset <= AllConfigs.SERVER.kinetics.maxChassisRange.get(); offset++) { + for (int offset = 0; offset <= AllConfigs.server().kinetics.maxChassisRange.get(); offset++) { if (offset == 1 && retracting) return true; BlockPos currentPos = pos.relative(orientation, offset + initialExtensionProgress); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java index 493942919..9361396be 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyBlockEntity; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -15,27 +15,27 @@ public class HosePulleyInstance extends AbstractPulleyInstance getRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE, blockState); + return getOrientedMaterial().getModel(AllPartialModels.HOSE, blockState); } protected Instancer getMagnetModel() { return materialManager.defaultCutout() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.HOSE_MAGNET, blockState); + .getModel(AllPartialModels.HOSE_MAGNET, blockState); } protected Instancer getHalfMagnetModel() { return materialManager.defaultCutout() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.HOSE_HALF_MAGNET, blockState); + .getModel(AllPartialModels.HOSE_HALF_MAGNET, blockState); } protected Instancer getCoilModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE_COIL, blockState, rotatingAbout); + return getOrientedMaterial().getModel(AllPartialModels.HOSE_COIL, blockState, rotatingAbout); } protected Instancer getHalfRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE_HALF, blockState); + return getOrientedMaterial().getModel(AllPartialModels.HOSE_HALF, blockState); } protected float getOffset() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlockEntity.java index 93ab94e13..f70846943 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlockEntity.java @@ -105,7 +105,7 @@ public class PulleyBlockEntity extends LinearActuatorBlockEntity implements Stoc return; if (speed == 0 && mirrorParent == null) return; - int maxLength = AllConfigs.SERVER.kinetics.maxRopeLength.get(); + int maxLength = AllConfigs.server().kinetics.maxRopeLength.get(); int i = 1; while (i <= maxLength) { BlockPos ropePos = worldPosition.below(i); @@ -341,7 +341,7 @@ public class PulleyBlockEntity extends LinearActuatorBlockEntity implements Stoc @Override protected int getExtensionRange() { - return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), + return Math.max(0, Math.min(AllConfigs.server().kinetics.maxRopeLength.get(), (worldPosition.getY() - 1) - level.getMinBuildHeight())); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java index 1f0a330f5..ecb23dce0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java @@ -1,8 +1,8 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pulley; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -14,7 +14,7 @@ import net.minecraft.util.Mth; public class PulleyRenderer extends AbstractPulleyRenderer { public PulleyRenderer(BlockEntityRendererProvider.Context context) { - super(context, AllBlockPartials.ROPE_HALF, AllBlockPartials.ROPE_HALF_MAGNET); + super(context, AllPartialModels.ROPE_HALF, AllPartialModels.ROPE_HALF_MAGNET); } @Override @@ -25,7 +25,7 @@ public class PulleyRenderer extends AbstractPulleyRenderer { @Override protected PartialModel getCoil() { - return AllBlockPartials.ROPE_COIL; + return AllPartialModels.ROPE_COIL; } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java index 3b17a2d36..9e3a7a303 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java @@ -4,8 +4,8 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pu import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; public class RopePulleyInstance extends AbstractPulleyInstance { @@ -22,15 +22,15 @@ public class RopePulleyInstance extends AbstractPulleyInstance getHalfMagnetModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF_MAGNET, blockState); + return getOrientedMaterial().getModel(AllPartialModels.ROPE_HALF_MAGNET, blockState); } protected Instancer getCoilModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_COIL, blockState, rotatingAbout); + return getOrientedMaterial().getModel(AllPartialModels.ROPE_COIL, blockState, rotatingAbout); } protected Instancer getHalfRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF, blockState); + return getOrientedMaterial().getModel(AllPartialModels.ROPE_HALF, blockState); } protected float getOffset() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/sync/ClientMotionPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/sync/ClientMotionPacket.java index 7f95c9894..aee236122 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/sync/ClientMotionPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/sync/ClientMotionPacket.java @@ -55,7 +55,7 @@ public class ClientMotionPacket extends SimplePacketBase { sender.connection.aboveGroundTickCount = 0; sender.connection.aboveGroundVehicleTickCount = 0; } - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> sender), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> sender), new LimbSwingUpdatePacket(sender.getId(), sender.position(), limbSwing)); }); context.get() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandler.java index d833d5a29..d7886e29a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandler.java @@ -90,7 +90,7 @@ public class CouplingHandler { distanceTo = 2; } - if (distanceTo > AllConfigs.SERVER.kinetics.maxCartCouplingLength.get()) { + if (distanceTo > AllConfigs.server().kinetics.maxCartCouplingLength.get()) { status(player, tooFar); return false; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandlerClient.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandlerClient.java index 954241a47..cfbfd8cc9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandlerClient.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingHandlerClient.java @@ -45,7 +45,7 @@ public class CouplingHandlerClient { return; } spawnSelectionParticles(entity.getBoundingBox(), true); - AllPackets.channel.sendToServer(new CouplingCreationPacket(selectedCart, entity)); + AllPackets.getChannel().sendToServer(new CouplingCreationPacket(selectedCart, entity)); selectedCart = null; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java index 63eead5a9..e93412573 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController; @@ -66,9 +66,9 @@ public class CouplingRenderer { BlockState renderState = Blocks.AIR.defaultBlockState(); VertexConsumer builder = buffer.getBuffer(RenderType.solid()); - SuperByteBuffer attachment = CachedBufferer.partial(AllBlockPartials.COUPLING_ATTACHMENT, renderState); - SuperByteBuffer ring = CachedBufferer.partial(AllBlockPartials.COUPLING_RING, renderState); - SuperByteBuffer connector = CachedBufferer.partial(AllBlockPartials.COUPLING_CONNECTOR, renderState); + SuperByteBuffer attachment = CachedBufferer.partial(AllPartialModels.COUPLING_ATTACHMENT, renderState); + SuperByteBuffer ring = CachedBufferer.partial(AllPartialModels.COUPLING_RING, renderState); + SuperByteBuffer connector = CachedBufferer.partial(AllPartialModels.COUPLING_CONNECTOR, renderState); Vec3 zero = Vec3.ZERO; Vec3 firstEndpoint = transforms.getFirst() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java index df2f10db0..7e73cc880 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java @@ -292,7 +292,7 @@ public class MinecartController implements INBTSerializable { public void sendData() { if (getWorld().isClientSide) return; - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(this::cart), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(this::cart), new MinecartControllerUpdatePacket(this)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java index b5a91095d..6ab21a005 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java @@ -135,7 +135,7 @@ public class WaterWheelBlock extends DirectionalKineticBlock implements IBE getSpeedRange() { - Integer base = AllConfigs.SERVER.kinetics.waterWheelBaseSpeed.get(); - Integer flow = AllConfigs.SERVER.kinetics.waterWheelFlowSpeed.get(); + Integer base = AllConfigs.server().kinetics.waterWheelBaseSpeed.get(); + Integer flow = AllConfigs.server().kinetics.waterWheelFlowSpeed.get(); return Couple.create(base, base + 4 * flow); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlockEntity.java index be0060c27..68fa6cab2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlockEntity.java @@ -72,7 +72,7 @@ public class WaterWheelBlockEntity extends GeneratingKineticBlockEntity { for (Float f : flows.values()) speed += f; if (speed != 0) - speed += AllConfigs.SERVER.kinetics.waterWheelBaseSpeed.get() * Math.signum(speed); + speed += AllConfigs.server().kinetics.waterWheelBaseSpeed.get() * Math.signum(speed); return speed; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java index 97306aacd..f7b8b3ef2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java @@ -195,7 +195,7 @@ public class FluidPropagator { } public static int getPumpRange() { - return AllConfigs.SERVER.fluids.mechanicalPumpRange.get(); + return AllConfigs.server().fluids.mechanicalPumpRange.get(); } public static boolean hasFluidCapability(BlockGetter world, BlockPos pos, Direction side) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/OpenEndedPipe.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/OpenEndedPipe.java index c9a5ebdf9..da5c00300 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/OpenEndedPipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/OpenEndedPipe.java @@ -217,7 +217,7 @@ public class OpenEndedPipe extends FlowSource { return true; } - if (!AllConfigs.SERVER.fluids.placeFluidSourceBlocks.get()) + if (!AllConfigs.server().fluids.placeFluidSourceBlocks.get()) return true; world.setBlock(outputPos, fluid.getFluid() diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeAttachmentModel.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeAttachmentModel.java index 0e2eec35f..27370bf8d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeAttachmentModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeAttachmentModel.java @@ -5,7 +5,7 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes; import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes.ComponentPartials; import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock; @@ -69,14 +69,14 @@ public class PipeAttachmentModel extends BakedModelWrapperWithData { for (Direction d : Iterate.directions) { AttachmentTypes type = pipeData.getAttachment(d); for (ComponentPartials partial : type.partials) { - quads.addAll(AllBlockPartials.PIPE_ATTACHMENTS.get(partial) + quads.addAll(AllPartialModels.PIPE_ATTACHMENTS.get(partial) .get(d) .get() .getQuads(state, side, rand, data)); } } if (pipeData.isEncased()) - quads.addAll(AllBlockPartials.FLUID_PIPE_CASING.get() + quads.addAll(AllPartialModels.FLUID_PIPE_CASING.get() .getQuads(state, side, rand, data)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java index 2cbf9570f..37cf56e9f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.foundation.utility.AngleHelper; @@ -31,7 +31,7 @@ public class PumpCogInstance extends SingleRotatingInstance imp materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.MECHANICAL_PUMP_ARROW, blockState) + .getModel(AllPartialModels.MECHANICAL_PUMP_ARROW, blockState) .createInstances(arrows); } @@ -62,7 +62,7 @@ public class PumpCogInstance extends SingleRotatingInstance imp protected Instancer getModel() { BlockState referenceState = blockEntity.getBlockState(); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_PUMP_COG, referenceState, facing); + return getRotatingMaterial().getModel(AllPartialModels.MECHANICAL_PUMP_COG, referenceState, facing); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java index fcae43027..c9dd5777d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.fluids; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -30,7 +30,7 @@ public class PumpRenderer extends KineticBlockEntityRenderer { Vec3 rotationOffset = new Vec3(.5, 14 / 16f, .5); BlockState blockState = be.getBlockState(); float angle = Mth.lerp(be.arrowDirection.getValue(partialTicks), 0, 90) - 90; - SuperByteBuffer arrow = CachedBufferer.partial(AllBlockPartials.MECHANICAL_PUMP_ARROW, blockState); + SuperByteBuffer arrow = CachedBufferer.partial(AllPartialModels.MECHANICAL_PUMP_ARROW, blockState); for (float yRot : new float[] { 0, 90 }) { Direction direction = blockState.getValue(PumpBlock.FACING); arrow.centre() @@ -48,7 +48,7 @@ public class PumpRenderer extends KineticBlockEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(PumpBlockEntity be, BlockState state) { - return CachedBufferer.partialFacing(AllBlockPartials.MECHANICAL_PUMP_COG, state); + return CachedBufferer.partialFacing(AllPartialModels.MECHANICAL_PUMP_COG, state); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java index e0b9739c5..c704c49af 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidFillingBehaviour.java @@ -137,7 +137,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour { int maxBlocks = maxBlocks(); boolean evaporate = world.dimensionType() .ultraWarm() && FluidHelper.isTag(fluid, FluidTags.WATER); - boolean canPlaceSources = AllConfigs.SERVER.fluids.placeFluidSourceBlocks.get(); + boolean canPlaceSources = AllConfigs.server().fluids.placeFluidSourceBlocks.get(); if ((!fillInfinite() && infinite) || evaporate || !canPlaceSources) { FluidState fluidState = world.getFluidState(rootPos); diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidManipulationBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidManipulationBehaviour.java index 70a6f4356..27f8399d2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidManipulationBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidManipulationBehaviour.java @@ -83,15 +83,15 @@ public abstract class FluidManipulationBehaviour extends BlockEntityBehaviour { } protected int maxRange() { - return AllConfigs.SERVER.fluids.hosePulleyRange.get(); + return AllConfigs.server().fluids.hosePulleyRange.get(); } protected int maxBlocks() { - return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get(); + return AllConfigs.server().fluids.hosePulleyBlockThreshold.get(); } protected boolean fillInfinite() { - return AllConfigs.SERVER.fluids.fillInfinite.get(); + return AllConfigs.server().fluids.fillInfinite.get(); } public void reset() { @@ -218,7 +218,7 @@ public abstract class FluidManipulationBehaviour extends BlockEntityBehaviour { protected boolean canDrainInfinitely(Fluid fluid) { if (fluid == null) return false; - return maxBlocks() != -1 && AllConfigs.SERVER.fluids.bottomlessFluidMode.get() + return maxBlocks() != -1 && AllConfigs.server().fluids.bottomlessFluidMode.get() .test(fluid); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java index 043fd43fd..d70575592 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.contraptions.fluids.actors; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.AbstractPulleyRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -12,7 +12,7 @@ import net.minecraft.core.Direction.Axis; public class HosePulleyRenderer extends AbstractPulleyRenderer { public HosePulleyRenderer(BlockEntityRendererProvider.Context context) { - super(context, AllBlockPartials.HOSE_HALF, AllBlockPartials.HOSE_HALF_MAGNET); + super(context, AllPartialModels.HOSE_HALF, AllPartialModels.HOSE_HALF_MAGNET); } @Override @@ -25,17 +25,17 @@ public class HosePulleyRenderer extends AbstractPulleyRenderer { } static final PartialModel[] BITS = - { AllBlockPartials.SPOUT_TOP, AllBlockPartials.SPOUT_MIDDLE, AllBlockPartials.SPOUT_BOTTOM }; + { AllPartialModels.SPOUT_TOP, AllPartialModels.SPOUT_MIDDLE, AllPartialModels.SPOUT_BOTTOM }; @Override protected void renderSafe(SpoutBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java index 55784315b..0754f09e2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; import com.simibubi.create.foundation.utility.AngleHelper; @@ -37,7 +37,7 @@ public class FluidValveInstance extends ShaftInstance imp pointer = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.FLUID_VALVE_POINTER, blockState).createInstance(); + .getModel(AllPartialModels.FLUID_VALVE_POINTER, blockState).createInstance(); transformPointer(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java index f8bdaeaf4..cfbf55b2b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.fluids.pipes; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -30,7 +30,7 @@ public class FluidValveRenderer extends KineticBlockEntityRenderer { @Override public BakedModel handlePerspective(TransformType cameraTransformType, PoseStack mat) { if (cameraTransformType == TransformType.HEAD) - return AllBlockPartials.GOGGLES.get() + return AllPartialModels.GOGGLES.get() .handlePerspective(cameraTransformType, mat); return super.handlePerspective(cameraTransformType, mat); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java index fb51b43c1..c6dfbb00c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java @@ -125,7 +125,7 @@ public class InWorldProcessing { transported.processedBy = type; int timeModifierForStackSize = ((transported.stack.getCount() - 1) / 16) + 1; int processingTime = - (int) (AllConfigs.SERVER.kinetics.inWorldProcessingTime.get() * timeModifierForStackSize) + 1; + (int) (AllConfigs.server().kinetics.inWorldProcessingTime.get() * timeModifierForStackSize) + 1; transported.processingTime = processingTime; if (!type.canProcess(transported.stack, world)) transported.processingTime = -1; @@ -211,7 +211,7 @@ public class InWorldProcessing { int timeModifierForStackSize = ((entity.getItem() .getCount() - 1) / 16) + 1; int processingTime = - (int) (AllConfigs.SERVER.kinetics.inWorldProcessingTime.get() * timeModifierForStackSize) + 1; + (int) (AllConfigs.server().kinetics.inWorldProcessingTime.get() * timeModifierForStackSize) + 1; processing.putInt("Time", processingTime); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java index 844b0a920..3951f34d2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; @@ -117,7 +117,7 @@ public class BlazeBurnerRenderer extends SafeBlockEntityRenderer behaviours) { super.addBehaviours(behaviours); - Integer max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get(); + Integer max = AllConfigs.server().kinetics.maxRotationSpeed.get(); targetSpeed = new ScrollValueBehaviour(Lang.translateDirect("generic.speed"), this, new ControllerValueBoxTransform()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java index b9152d78d..c30f9598e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.relays.advanced; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; @@ -43,7 +43,7 @@ public class SpeedControllerRenderer extends SmartBlockEntityRenderer { return modelTransform; }; - return getRotatingMaterial().getModel(AllBlockPartials.BELT_PULLEY, blockState, dir, ms); + return getRotatingMaterial().getModel(AllPartialModels.BELT_PULLEY, blockState, dir, ms); } private Direction getOrientation() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java index ee9faedd3..da64d0d9e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java @@ -9,8 +9,8 @@ import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; @@ -140,7 +140,7 @@ public class BeltRenderer extends SafeBlockEntityRenderer { return stack; }; - SuperByteBuffer superBuffer = CachedBufferer.partialDirectional(AllBlockPartials.BELT_PULLEY, blockState, dir, matrixStackSupplier); + SuperByteBuffer superBuffer = CachedBufferer.partialDirectional(AllPartialModels.BELT_PULLEY, blockState, dir, matrixStackSupplier); KineticBlockEntityRenderer.standardKineticRotationTransform(superBuffer, be, light).renderInto(ms, vb); } } @@ -159,17 +159,17 @@ public class BeltRenderer extends SafeBlockEntityRenderer { public static PartialModel getBeltPartial(boolean diagonal, boolean start, boolean end, boolean bottom) { if (diagonal) { - if (start) return AllBlockPartials.BELT_DIAGONAL_START; - if (end) return AllBlockPartials.BELT_DIAGONAL_END; - return AllBlockPartials.BELT_DIAGONAL_MIDDLE; + if (start) return AllPartialModels.BELT_DIAGONAL_START; + if (end) return AllPartialModels.BELT_DIAGONAL_END; + return AllPartialModels.BELT_DIAGONAL_MIDDLE; } else if (bottom) { - if (start) return AllBlockPartials.BELT_START_BOTTOM; - if (end) return AllBlockPartials.BELT_END_BOTTOM; - return AllBlockPartials.BELT_MIDDLE_BOTTOM; + if (start) return AllPartialModels.BELT_START_BOTTOM; + if (end) return AllPartialModels.BELT_END_BOTTOM; + return AllPartialModels.BELT_MIDDLE_BOTTOM; } else { - if (start) return AllBlockPartials.BELT_START; - if (end) return AllBlockPartials.BELT_END; - return AllBlockPartials.BELT_MIDDLE; + if (start) return AllPartialModels.BELT_START; + if (end) return AllPartialModels.BELT_END; + return AllPartialModels.BELT_MIDDLE; } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java index 14dbf2d30..732dc446b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java @@ -75,7 +75,7 @@ public class BeltConnectorHandler { return; if (!ShaftBlock.isShaft(world.getBlockState(selected))) selected = selected.relative(((BlockHitResult) rayTrace).getDirection()); - if (!selected.closerThan(first, AllConfigs.SERVER.kinetics.maxBeltLength.get())) + if (!selected.closerThan(first, AllConfigs.server().kinetics.maxBeltLength.get())) return; boolean canConnect = diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorItem.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorItem.java index 69d9db489..2e3884003 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorItem.java @@ -273,7 +273,7 @@ public class BeltConnectorItem extends BlockItem { } public static Integer maxLength() { - return AllConfigs.SERVER.kinetics.maxBeltLength.get(); + return AllConfigs.server().kinetics.maxBeltLength.get(); } public static boolean validateAxis(Level world, BlockPos pos) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityInstance.java index 9be65a592..af29e64d6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityInstance.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; @@ -37,7 +37,7 @@ public class BracketedKineticBlockEntityInstance extends SingleRotatingInstance< BlockPos pos = blockEntity.getBlockPos(); float offset = BracketedKineticBlockEntityRenderer.getShaftAngleOffset(axis, pos); Direction facing = Direction.fromAxisAndDirection(axis, AxisDirection.POSITIVE); - Instancer half = getRotatingMaterial().getModel(AllBlockPartials.COGWHEEL_SHAFT, blockState, + Instancer half = getRotatingMaterial().getModel(AllPartialModels.COGWHEEL_SHAFT, blockState, facing, () -> this.rotateToAxis(axis)); additionalShaft = setup(half.createInstance(), speed); @@ -51,7 +51,7 @@ public class BracketedKineticBlockEntityInstance extends SingleRotatingInstance< Axis axis = KineticBlockEntityRenderer.getRotationAxisOf(blockEntity); Direction facing = Direction.fromAxisAndDirection(axis, AxisDirection.POSITIVE); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_LARGE_COGWHEEL, blockState, facing, + return getRotatingMaterial().getModel(AllPartialModels.SHAFTLESS_LARGE_COGWHEEL, blockState, facing, () -> this.rotateToAxis(axis)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityRenderer.java index 4d139300f..3962ca079 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticBlockEntityRenderer.java @@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.relays.elementary; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -43,7 +43,7 @@ public class BracketedKineticBlockEntityRenderer extends KineticBlockEntityRende Direction facing = Direction.fromAxisAndDirection(axis, AxisDirection.POSITIVE); renderRotatingBuffer(be, - CachedBufferer.partialFacingVertical(AllBlockPartials.SHAFTLESS_LARGE_COGWHEEL, be.getBlockState(), facing), + CachedBufferer.partialFacingVertical(AllPartialModels.SHAFTLESS_LARGE_COGWHEEL, be.getBlockState(), facing), ms, buffer.getBuffer(RenderType.solid()), light); float offset = getShaftAngleOffset(axis, pos); @@ -51,7 +51,7 @@ public class BracketedKineticBlockEntityRenderer extends KineticBlockEntityRende float angle = ((time * be.getSpeed() * 3f / 10 + offset) % 360) / 180 * (float) Math.PI; SuperByteBuffer shaft = - CachedBufferer.partialFacingVertical(AllBlockPartials.COGWHEEL_SHAFT, be.getBlockState(), facing); + CachedBufferer.partialFacingVertical(AllPartialModels.COGWHEEL_SHAFT, be.getBlockState(), facing); kineticRotationTransform(shaft, be, axis, angle, light); shaft.renderInto(ms, buffer.getBuffer(RenderType.solid())); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java index 970454528..38ab029e7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java @@ -9,7 +9,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance; @@ -58,7 +58,7 @@ public class EncasedCogInstance extends KineticBlockEntityInstance { PoseStack poseStack = new PoseStack(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogRenderer.java index 169857fd5..4814ead48 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.relays.encased; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticBlockEntity; @@ -51,7 +51,7 @@ public class EncasedCogRenderer extends KineticBlockEntityRenderer half = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, dir); + Instancer half = rotatingMaterial.getModel(AllPartialModels.SHAFT_HALF, blockState, dir); float splitSpeed = speed * blockEntity.getRotationSpeedModifier(dir); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java index a1a86181f..4f633560b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.relays.encased; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; @@ -48,7 +48,7 @@ public class SplitShaftRenderer extends KineticBlockEntityRenderer impl GaugeBlock gaugeBlock = (GaugeBlock) blockState.getBlock(); - Instancer dialModel = getTransformMaterial().getModel(AllBlockPartials.GAUGE_DIAL, blockState); + Instancer dialModel = getTransformMaterial().getModel(AllPartialModels.GAUGE_DIAL, blockState); Instancer headModel = getHeadModel(); ms = new PoseStack(); @@ -148,7 +148,7 @@ public abstract class GaugeInstance extends ShaftInstance impl @Override protected Instancer getHeadModel() { - return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_SPEED, blockState); + return getTransformMaterial().getModel(AllPartialModels.GAUGE_HEAD_SPEED, blockState); } } @@ -159,7 +159,7 @@ public abstract class GaugeInstance extends ShaftInstance impl @Override protected Instancer getHeadModel() { - return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_STRESS, blockState); + return getTransformMaterial().getModel(AllPartialModels.GAUGE_HEAD_STRESS, blockState); } } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java index 1a504a459..8ea2d0779 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.relays.encased.ShaftRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock.Type; @@ -46,10 +46,10 @@ public class GaugeRenderer extends ShaftRenderer { BlockState gaugeState = be.getBlockState(); GaugeBlockEntity gaugeBE = (GaugeBlockEntity) be; - PartialModel partialModel = (type == Type.SPEED ? AllBlockPartials.GAUGE_HEAD_SPEED : AllBlockPartials.GAUGE_HEAD_STRESS); + PartialModel partialModel = (type == Type.SPEED ? AllPartialModels.GAUGE_HEAD_SPEED : AllPartialModels.GAUGE_HEAD_STRESS); SuperByteBuffer headBuffer = CachedBufferer.partial(partialModel, gaugeState); - SuperByteBuffer dialBuffer = CachedBufferer.partial(AllBlockPartials.GAUGE_DIAL, gaugeState); + SuperByteBuffer dialBuffer = CachedBufferer.partial(AllPartialModels.GAUGE_DIAL, gaugeState); float dialPivot = 5.75f / 16; float progress = Mth.lerp(partialTicks, gaugeBE.prevDialState, gaugeBE.dialState); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/SpeedGaugeBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/SpeedGaugeBlockEntity.java index 7e38ba1de..2efbd7d16 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/SpeedGaugeBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/SpeedGaugeBlockEntity.java @@ -34,11 +34,11 @@ public class SpeedGaugeBlockEntity extends GaugeBlockEntity { public static float getDialTarget(float speed) { speed = Math.abs(speed); - float medium = AllConfigs.SERVER.kinetics.mediumSpeed.get() + float medium = AllConfigs.server().kinetics.mediumSpeed.get() .floatValue(); - float fast = AllConfigs.SERVER.kinetics.fastSpeed.get() + float fast = AllConfigs.server().kinetics.fastSpeed.get() .floatValue(); - float max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get() + float max = AllConfigs.server().kinetics.maxRotationSpeed.get() .floatValue(); float target = 0; if (speed == 0) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeBlockEntity.java index 22e3e900c..2244fe051 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeBlockEntity.java @@ -115,7 +115,7 @@ public class StressGaugeBlockEntity extends GaugeBlockEntity { } if (!worldPosition.equals(lastSent)) - AllPackets.channel.sendToServer(new GaugeObservedPacket(lastSent = worldPosition)); + AllPackets.getChannel().sendToServer(new GaugeObservedPacket(lastSent = worldPosition)); return true; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java index c2af7a991..a9e9b9f45 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java @@ -7,7 +7,7 @@ import com.jozufozu.flywheel.api.InstanceData; import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.Material; import com.jozufozu.flywheel.api.MaterialManager; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.foundation.utility.Iterate; @@ -40,7 +40,7 @@ public class GearboxInstance extends KineticBlockEntityInstance shaft = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, direction); + Instancer shaft = rotatingMaterial.getModel(AllPartialModels.SHAFT_HALF, blockState, direction); RotatingData key = shaft.createInstance(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java index 6b3fb4cec..85cb02016 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.relays.gearbox; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -37,7 +37,7 @@ public class GearboxRenderer extends KineticBlockEntityRenderer entity), SetFireImmunePacket.create(entity)); + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), SetFireImmunePacket.create(entity)); } @SubscribeEvent @@ -107,7 +107,7 @@ public final class NetheriteDivingHandler { return; } - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> player), SetFireImmunePacket.create(entity)); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> player), SetFireImmunePacket.create(entity)); } public static class SetFireImmunePacket extends SimplePacketBase { diff --git a/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellBlockEntity.java b/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellBlockEntity.java index 83db53090..0e38c1161 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellBlockEntity.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.curiosities.bell; import java.util.Random; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -32,7 +32,7 @@ public class HauntedBellBlockEntity extends AbstractBellBlockEntity { @Override @OnlyIn(Dist.CLIENT) public PartialModel getBellModel() { - return AllBlockPartials.HAUNTED_BELL; + return AllPartialModels.HAUNTED_BELL; } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellPulser.java b/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellPulser.java index d90c066ea..46a24cfc5 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellPulser.java +++ b/src/main/java/com/simibubi/create/content/curiosities/bell/HauntedBellPulser.java @@ -62,7 +62,7 @@ public class HauntedBellPulser { public static void sendPulse(Level world, BlockPos pos, int distance, boolean canOverlap) { LevelChunk chunk = world.getChunkAt(pos); - AllPackets.channel.send(PacketDistributor.TRACKING_CHUNK.with(() -> chunk), + AllPackets.getChannel().send(PacketDistributor.TRACKING_CHUNK.with(() -> chunk), new SoulPulseEffectPacket(pos, distance, canOverlap)); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/bell/PeculiarBellBlockEntity.java b/src/main/java/com/simibubi/create/content/curiosities/bell/PeculiarBellBlockEntity.java index 7fc4bd5f5..567ea7de7 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/bell/PeculiarBellBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/curiosities/bell/PeculiarBellBlockEntity.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.curiosities.bell; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -18,7 +18,7 @@ public class PeculiarBellBlockEntity extends AbstractBellBlockEntity { @Override @OnlyIn(Dist.CLIENT) public PartialModel getBellModel() { - return AllBlockPartials.PECULIAR_BELL; + return AllPartialModels.PECULIAR_BELL; } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/MetalLadderBlock.java b/src/main/java/com/simibubi/create/content/curiosities/deco/MetalLadderBlock.java index a5c44f180..af95ae898 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/deco/MetalLadderBlock.java +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/MetalLadderBlock.java @@ -90,7 +90,7 @@ public class MetalLadderBlock extends LadderBlock implements IWrenchable { BlockHitResult ray) { Direction dir = player.getXRot() < 0 ? Direction.UP : Direction.DOWN; - int range = AllConfigs.SERVER.curiosities.placementAssistRange.get(); + int range = AllConfigs.server().curiosities.placementAssistRange.get(); if (player != null) { AttributeInstance reach = player.getAttribute(ForgeMod.REACH_DISTANCE.get()); if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier)) diff --git a/src/main/java/com/simibubi/create/content/curiosities/frames/CopycatStepBlock.java b/src/main/java/com/simibubi/create/content/curiosities/frames/CopycatStepBlock.java index 34dd69ec7..10ac1be0e 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/frames/CopycatStepBlock.java +++ b/src/main/java/com/simibubi/create/content/curiosities/frames/CopycatStepBlock.java @@ -251,7 +251,7 @@ public class CopycatStepBlock extends WaterloggedCopycatBlock { break; } - int range = AllConfigs.SERVER.curiosities.placementAssistRange.get(); + int range = AllConfigs.server().curiosities.placementAssistRange.get(); if (player != null) { AttributeInstance reach = player.getAttribute(ForgeMod.REACH_DISTANCE.get()); if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier)) diff --git a/src/main/java/com/simibubi/create/content/curiosities/girder/ConnectedGirderModel.java b/src/main/java/com/simibubi/create/content/curiosities/girder/ConnectedGirderModel.java index 093a6b505..b501aae75 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/girder/ConnectedGirderModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/girder/ConnectedGirderModel.java @@ -5,7 +5,7 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.block.connected.CTModel; import com.simibubi.create.foundation.utility.Iterate; @@ -46,7 +46,7 @@ public class ConnectedGirderModel extends CTModel { ConnectionData data = extraData.getData(CONNECTION_PROPERTY); for (Direction d : Iterate.horizontalDirections) if (data.isConnected(d)) - quads.addAll(AllBlockPartials.METAL_GIRDER_BRACKETS.get(d) + quads.addAll(AllPartialModels.METAL_GIRDER_BRACKETS.get(d) .get() .getQuads(state, side, rand, extraData)); return quads; diff --git a/src/main/java/com/simibubi/create/content/curiosities/girder/GirderPlacementHelper.java b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderPlacementHelper.java index 154a476bf..208d4f86f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/girder/GirderPlacementHelper.java +++ b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderPlacementHelper.java @@ -79,7 +79,7 @@ public class GirderPlacementHelper implements IPlacementHelper { List directions = IPlacementHelper.orderedByDistance(pos, ray.getLocation(), dir -> canExtendToward(state, dir)); for (Direction dir : directions) { - int range = AllConfigs.SERVER.curiosities.placementAssistRange.get(); + int range = AllConfigs.server().curiosities.placementAssistRange.get(); if (player != null) { AttributeInstance reach = player.getAttribute(ForgeMod.REACH_DISTANCE.get()); if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier)) diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java index 346e4bd61..a068bb6a2 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java @@ -204,7 +204,7 @@ public class SymmetryWandItem extends Item { .getCompound(SYMMETRY)); Vec3 mirrorPos = symmetry.getPosition(); - if (mirrorPos.distanceTo(Vec3.atLowerCornerOf(pos)) > AllConfigs.SERVER.curiosities.maxSymmetryWandRange.get()) + if (mirrorPos.distanceTo(Vec3.atLowerCornerOf(pos)) > AllConfigs.server().curiosities.maxSymmetryWandRange.get()) return; if (!player.isCreative() && isHoldingBlock(player, block) && BlockHelper.findAndRemoveInInventory(block, player, 1) == 0) @@ -267,7 +267,7 @@ public class SymmetryWandItem extends Item { } } - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), new SymmetryEffectPacket(to, targets)); } @@ -292,7 +292,7 @@ public class SymmetryWandItem extends Item { .getCompound(SYMMETRY)); Vec3 mirrorPos = symmetry.getPosition(); - if (mirrorPos.distanceTo(Vec3.atLowerCornerOf(pos)) > AllConfigs.SERVER.curiosities.maxSymmetryWandRange.get()) + if (mirrorPos.distanceTo(Vec3.atLowerCornerOf(pos)) > AllConfigs.server().curiosities.maxSymmetryWandRange.get()) return; symmetry.process(blockSet); @@ -325,7 +325,7 @@ public class SymmetryWandItem extends Item { } } - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), new SymmetryEffectPacket(to, targets)); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandScreen.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandScreen.java index f3d009546..6a19ce86f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandScreen.java @@ -148,7 +148,7 @@ public class SymmetryWandScreen extends AbstractSimiScreen { @Override public void removed() { SymmetryWandItem.configureSettings(wand, currentElement); - AllPackets.channel.sendToServer(new ConfigureSymmetryWandPacket(hand, currentElement)); + AllPackets.getChannel().sendToServer(new ConfigureSymmetryWandPacket(hand, currentElement)); } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java index e1342bf4b..9af86bebf 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java @@ -8,7 +8,7 @@ import com.google.common.collect.ImmutableList; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.core.BlockPos; @@ -91,7 +91,7 @@ public class CrossPlaneMirror extends SymmetryMirror { @Override @OnlyIn(Dist.CLIENT) public PartialModel getModel() { - return AllBlockPartials.SYMMETRY_CROSSPLANE; + return AllPartialModels.SYMMETRY_CROSSPLANE; } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java index 06b6a0ceb..973891a32 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java @@ -8,7 +8,7 @@ import com.google.common.collect.ImmutableList; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.core.BlockPos; @@ -87,7 +87,7 @@ public class PlaneMirror extends SymmetryMirror { @Override @OnlyIn(Dist.CLIENT) public PartialModel getModel() { - return AllBlockPartials.SYMMETRY_PLANE; + return AllPartialModels.SYMMETRY_PLANE; } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java index a0d9a9a61..6932d7c0f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java @@ -6,7 +6,7 @@ import java.util.Map; import com.google.common.collect.ImmutableList; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.core.BlockPos; @@ -48,7 +48,7 @@ public class TriplePlaneMirror extends SymmetryMirror { @Override @OnlyIn(Dist.CLIENT) public PartialModel getModel() { - return AllBlockPartials.SYMMETRY_TRIPLEPLANE; + return AllPartialModels.SYMMETRY_TRIPLEPLANE; } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/RadialToolboxMenu.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/RadialToolboxMenu.java index f458ce4e6..b1fd3e971 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/RadialToolboxMenu.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/RadialToolboxMenu.java @@ -231,9 +231,9 @@ public class RadialToolboxMenu extends AbstractSimiScreen { if (state == State.DETACH) return; else if (state == State.SELECT_BOX) - toolboxes.forEach(be -> AllPackets.channel.sendToServer(new ToolboxDisposeAllPacket(be.getBlockPos()))); + toolboxes.forEach(be -> AllPackets.getChannel().sendToServer(new ToolboxDisposeAllPacket(be.getBlockPos()))); else - AllPackets.channel.sendToServer(new ToolboxDisposeAllPacket(selectedBox.getBlockPos())); + AllPackets.getChannel().sendToServer(new ToolboxDisposeAllPacket(selectedBox.getBlockPos())); return; } @@ -242,13 +242,13 @@ public class RadialToolboxMenu extends AbstractSimiScreen { if (state == State.DETACH) { if (selected == UNEQUIP) - AllPackets.channel.sendToServer( + AllPackets.getChannel().sendToServer( new ToolboxEquipPacket(null, selected, minecraft.player.getInventory().selected)); return; } if (selected == UNEQUIP) - AllPackets.channel.sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, + AllPackets.getChannel().sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, minecraft.player.getInventory().selected)); if (selected < 0) @@ -261,7 +261,7 @@ public class RadialToolboxMenu extends AbstractSimiScreen { .isEmpty()) return; - AllPackets.channel.sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, + AllPackets.getChannel().sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, minecraft.player.getInventory().selected)); } @@ -334,7 +334,7 @@ public class RadialToolboxMenu extends AbstractSimiScreen { if (state == State.SELECT_ITEM_UNEQUIP && selected == UNEQUIP) { if (toolboxes.size() > 1) { - AllPackets.channel.sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, + AllPackets.getChannel().sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, minecraft.player.getInventory().selected)); state = State.SELECT_BOX; return true; diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java index 295971f77..850c03a39 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Iterate; @@ -32,12 +32,12 @@ public class ToolBoxInstance extends BlockEntityInstance imp Instancer drawerModel = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.TOOLBOX_DRAWER, blockState); + .getModel(AllPartialModels.TOOLBOX_DRAWER, blockState); drawers = new ModelData[]{drawerModel.createInstance(), drawerModel.createInstance()}; lid = materialManager.defaultCutout() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.TOOLBOX_LIDS.get(blockEntity.getColor()), blockState) + .getModel(AllPartialModels.TOOLBOX_LIDS.get(blockEntity.getColor()), blockState) .createInstance(); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandler.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandler.java index b373a8c2e..3ffbe0062 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandler.java @@ -97,7 +97,7 @@ public class ToolboxHandler { } public static void syncData(Player player) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new PersistentDataPacket(player)); } @@ -147,7 +147,7 @@ public class ToolboxHandler { } public static double getMaxRange(Player player) { - return AllConfigs.SERVER.curiosities.toolboxRange.get() + return AllConfigs.server().curiosities.toolboxRange.get() .doubleValue(); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandlerClient.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandlerClient.java index f024209c6..adde1fc0d 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandlerClient.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxHandlerClient.java @@ -91,7 +91,7 @@ public class ToolboxHandlerClient { if (!ItemStack.tagMatches(inSlot, result)) continue; - AllPackets.channel.sendToServer( + AllPackets.getChannel().sendToServer( new ToolboxEquipPacket(toolboxBlockEntity.getBlockPos(), comp, player.getInventory().selected)); return true; } diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxRenderer.java index e409c081d..79ccc607a 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxRenderer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.curiosities.toolbox; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -28,8 +28,8 @@ public class ToolboxRenderer extends SmartBlockEntityRenderer { disposeButton = new IconButton(leftPos + 30 + 81, topPos + 69, AllIcons.I_TOOLBOX); disposeButton.withCallback(() -> { - AllPackets.channel.sendToServer(new ToolboxDisposeAllPacket(menu.contentHolder.getBlockPos())); + AllPackets.getChannel().sendToServer(new ToolboxDisposeAllPacket(menu.contentHolder.getBlockPos())); }); disposeButton.setToolTip(Lang.translateDirect("toolbox.depositBox")); addRenderableWidget(disposeButton); @@ -141,7 +141,7 @@ public class ToolboxScreen extends AbstractSimiContainerScreen { .translate(0, -6 / 16f, 12 / 16f) .rotateX(-105 * menu.contentHolder.lid.getValue(partialTicks)) .translate(0, 6 / 16f, -12 / 16f); - GuiGameElement.of(AllBlockPartials.TOOLBOX_LIDS.get(color)) + GuiGameElement.of(AllPartialModels.TOOLBOX_LIDS.get(color)) .render(ms); ms.popPose(); @@ -149,7 +149,7 @@ public class ToolboxScreen extends AbstractSimiContainerScreen { ms.pushPose(); ms.translate(0, -offset * 1 / 8f, menu.contentHolder.drawers.getValue(partialTicks) * -.175f * (2 - offset)); - GuiGameElement.of(AllBlockPartials.TOOLBOX_DRAWER) + GuiGameElement.of(AllPartialModels.TOOLBOX_DRAWER) .render(ms); ms.popPose(); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintRenderer.java index 4b68a02cc..cd380143b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintRenderer.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Matrix3f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.curiosities.tools.BlueprintEntity.BlueprintSection; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -31,8 +31,8 @@ public class BlueprintRenderer extends EntityRenderer { @Override public void render(BlueprintEntity entity, float yaw, float pt, PoseStack ms, MultiBufferSource buffer, int light) { - PartialModel partialModel = entity.size == 3 ? AllBlockPartials.CRAFTING_BLUEPRINT_3x3 - : entity.size == 2 ? AllBlockPartials.CRAFTING_BLUEPRINT_2x2 : AllBlockPartials.CRAFTING_BLUEPRINT_1x1; + PartialModel partialModel = entity.size == 3 ? AllPartialModels.CRAFTING_BLUEPRINT_3x3 + : entity.size == 2 ? AllPartialModels.CRAFTING_BLUEPRINT_2x2 : AllPartialModels.CRAFTING_BLUEPRINT_1x1; SuperByteBuffer sbb = CachedBufferer.partial(partialModel, Blocks.AIR.defaultBlockState()); sbb.rotateY(-yaw) .rotateX(90.0F + entity.getXRot()) diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintScreen.java b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintScreen.java index c11580cfa..8ec0eb6b0 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintScreen.java @@ -8,7 +8,7 @@ import java.util.List; import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.item.filter.FilterScreenPacket; import com.simibubi.create.content.logistics.item.filter.FilterScreenPacket.Option; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -76,7 +76,7 @@ public class BlueprintScreen extends AbstractSimiContainerScreen background.render(ms, x, y, this); font.draw(ms, title, x + 15, y + 4, 0xFFFFFF); - GuiGameElement.of(AllBlockPartials.CRAFTING_BLUEPRINT_1x1).at(x + background.width + 20, y + background.height - 32, 0) .rotate(45, -45, 22.5f) .scale(40) @@ -166,7 +166,7 @@ public class BlueprintScreen extends AbstractSimiContainerScreen protected void contentsCleared() {} protected void sendOptionUpdate(Option option) { - AllPackets.channel.sendToServer(new FilterScreenPacket(option)); + AllPackets.getChannel().sendToServer(new FilterScreenPacket(option)); } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java index 161275653..3986bc8fd 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java @@ -225,7 +225,7 @@ public class ExtendoGripItem extends Item { } private static int maxUses() { - return AllConfigs.SERVER.curiosities.maxExtendoGripActions.get(); + return AllConfigs.server().curiosities.maxExtendoGripActions.get(); } @SubscribeEvent @@ -274,7 +274,7 @@ public class ExtendoGripItem extends Item { return; Player player = (Player) entity; if (isHoldingExtendoGrip(player)) - AllPackets.channel.sendToServer(new ExtendoGripInteractionPacket(target)); + AllPackets.getChannel().sendToServer(new ExtendoGripInteractionPacket(target)); } @SubscribeEvent @@ -286,7 +286,7 @@ public class ExtendoGripItem extends Item { return; Player player = (Player) entity; if (isHoldingExtendoGrip(player)) - AllPackets.channel.sendToServer(new ExtendoGripInteractionPacket(target, event.getHand())); + AllPackets.getChannel().sendToServer(new ExtendoGripInteractionPacket(target, event.getHand())); } @SubscribeEvent @@ -298,7 +298,7 @@ public class ExtendoGripItem extends Item { return; Player player = (Player) entity; if (isHoldingExtendoGrip(player)) - AllPackets.channel + AllPackets.getChannel() .sendToServer(new ExtendoGripInteractionPacket(target, event.getHand(), event.getLocalPos())); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java index 3ee76d7a7..c67148b4e 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.curiosities.tools; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.Create; import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; import com.simibubi.create.foundation.item.render.CustomRenderedItemModelRenderer; @@ -98,7 +98,7 @@ public class ExtendoGripItemRenderer extends CustomRenderedItemModelRenderer { ms.translate(0, 0, -4 / 16f); ms.scale(1, 1, 1 / (1 + animation)); renderer.renderSolid((leftHand || rightHand) ? ExtendoGripRenderHandler.pose.get() - : AllBlockPartials.DEPLOYER_HAND_POINTING.get(), light); + : AllPartialModels.DEPLOYER_HAND_POINTING.get(), light); ms.popPose(); ms.popPose(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java index fbfd0735b..5634f1d4c 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java @@ -4,8 +4,8 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllItems; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.client.Minecraft; @@ -30,13 +30,13 @@ public class ExtendoGripRenderHandler { public static float mainHandAnimation; public static float lastMainHandAnimation; - public static PartialModel pose = AllBlockPartials.DEPLOYER_HAND_PUNCHING; + public static PartialModel pose = AllPartialModels.DEPLOYER_HAND_PUNCHING; public static void tick() { lastMainHandAnimation = mainHandAnimation; mainHandAnimation *= Mth.clamp(mainHandAnimation, 0.8f, 0.99f); - pose = AllBlockPartials.DEPLOYER_HAND_PUNCHING; + pose = AllPartialModels.DEPLOYER_HAND_PUNCHING; if (!AllItems.EXTENDO_GRIP.isIn(getRenderedOffHandStack())) return; ItemStack main = getRenderedMainHandStack(); @@ -49,7 +49,7 @@ public class ExtendoGripRenderHandler { .getModel(main, null, null, 0) .isGui3d()) return; - pose = AllBlockPartials.DEPLOYER_HAND_HOLDING; + pose = AllPartialModels.DEPLOYER_HAND_HOLDING; } @SubscribeEvent diff --git a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonItem.java b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonItem.java index 72c6561bb..2ece69fb8 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonItem.java @@ -101,7 +101,7 @@ public class PotatoCannonItem extends ProjectileWeaponItem implements CustomArmP } private int maxUses() { - return AllConfigs.SERVER.curiosities.maxPotatoCannonShots.get(); + return AllConfigs.server().curiosities.maxPotatoCannonShots.get(); } public boolean isCannon(ItemStack stack) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoProjectileTypeManager.java b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoProjectileTypeManager.java index c38d057c3..4830d2438 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoProjectileTypeManager.java +++ b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoProjectileTypeManager.java @@ -95,11 +95,11 @@ public class PotatoProjectileTypeManager { } public static void syncTo(ServerPlayer player) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> player), new SyncPacket()); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> player), new SyncPacket()); } public static void syncToAll() { - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new SyncPacket()); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new SyncPacket()); } public static class ReloadListener extends SimpleJsonResourceReloadListener { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ShootableGadgetItemMethods.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ShootableGadgetItemMethods.java index 85cdf59d0..8549c6d53 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ShootableGadgetItemMethods.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ShootableGadgetItemMethods.java @@ -29,8 +29,8 @@ public class ShootableGadgetItemMethods { public static void sendPackets(Player player, Function factory) { if (!(player instanceof ServerPlayer)) return; - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> player), factory.apply(false)); - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), factory.apply(true)); + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> player), factory.apply(false)); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), factory.apply(true)); } public static boolean shouldSwap(Player player, ItemStack item, InteractionHand hand, Predicate predicate) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java index f7168b1c5..2bf16e77c 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java @@ -117,7 +117,7 @@ public abstract class ZapperScreen extends AbstractSimiScreen { public void removed() { ConfigureZapperPacket packet = getConfigurationPacket(); packet.configureZapper(zapper); - AllPackets.channel.sendToServer(packet); + AllPackets.getChannel().sendToServer(packet); } protected void renderZapper(PoseStack ms, int x, int y) { diff --git a/src/main/java/com/simibubi/create/content/logistics/RedstoneLinkNetworkHandler.java b/src/main/java/com/simibubi/create/content/logistics/RedstoneLinkNetworkHandler.java index 1da9fd4a5..63d8f8022 100644 --- a/src/main/java/com/simibubi/create/content/logistics/RedstoneLinkNetworkHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/RedstoneLinkNetworkHandler.java @@ -138,7 +138,7 @@ public class RedstoneLinkNetworkHandler { if (from == to) return true; return from.getLocation() - .closerThan(to.getLocation(), AllConfigs.SERVER.logistics.linkRange.get()); + .closerThan(to.getLocation(), AllConfigs.server().logistics.linkRange.get()); } public Map, Set> networksIn(LevelAccessor world) { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlockEntity.java index c48b289e8..0e1a81f02 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlockEntity.java @@ -181,7 +181,7 @@ public class BeltTunnelBlockEntity extends SmartBlockEntity { } private void sendFlaps() { - AllPackets.channel.send(packetTarget(), new TunnelFlapPacket(this, flapsToSend)); + AllPackets.getChannel().send(packetTarget(), new TunnelFlapPacket(this, flapsToSend)); flapsToSend.clear(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java index 26655a586..1bd4f6844 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java @@ -10,7 +10,7 @@ import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.block.flap.FlapData; import com.simibubi.create.foundation.render.AllMaterialSpecs; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -30,7 +30,7 @@ public class BeltTunnelInstance extends BlockEntityInstance model = materialManager.defaultSolid() .material(AllMaterialSpecs.FLAPS) - .getModel(AllBlockPartials.BELT_TUNNEL_FLAP, blockState); + .getModel(AllPartialModels.BELT_TUNNEL_FLAP, blockState); int blockLight = world.getBrightness(LightLayer.BLOCK, pos); int skyLight = world.getBrightness(LightLayer.SKY, pos); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java index c0fefc610..5916adea2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -34,7 +34,7 @@ public class BeltTunnelRenderer extends SmartBlockEntityRenderer= 25 * 25) - AllPackets.channel.sendToServer(new EjectorAwardPacket(worldPosition)); + AllPackets.getChannel().sendToServer(new EjectorAwardPacket(worldPosition)); if (!(playerEntity.getItemBySlot(EquipmentSlot.CHEST) .getItem() instanceof ElytraItem)) @@ -179,7 +179,7 @@ public class EjectorBlockEntity extends KineticBlockEntity { playerEntity.setDeltaMovement(playerEntity.getDeltaMovement() .scale(.75f)); deployElytra(playerEntity); - AllPackets.channel.sendToServer(new EjectorElytraPacket(worldPosition)); + AllPackets.getChannel().sendToServer(new EjectorElytraPacket(worldPosition)); } if (doLogic) { @@ -264,7 +264,7 @@ public class EjectorBlockEntity extends KineticBlockEntity { protected boolean addToLaunchedItems(ItemStack stack) { if ((!level.isClientSide || isVirtual()) && trackedItem == null && scanCooldown == 0) { - scanCooldown = AllConfigs.SERVER.kinetics.ejectorScanInterval.get(); + scanCooldown = AllConfigs.server().kinetics.ejectorScanInterval.get(); trackedItem = stack; } return launchedItems.add(IntAttached.withZero(stack)); @@ -537,7 +537,7 @@ public class EjectorBlockEntity extends KineticBlockEntity { if (launcher.getHorizontalDistance() != horizontalDistance || launcher.getVerticalDistance() != verticalDistance) { launcher.set(horizontalDistance, verticalDistance); - launcher.clamp(AllConfigs.SERVER.kinetics.maxEjectorDistance.get()); + launcher.clamp(AllConfigs.server().kinetics.maxEjectorDistance.get()); } powered = compound.getBoolean("Powered"); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java index dbe86038f..da3d080ee 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.logistics.block.depot; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -18,7 +18,7 @@ public class EjectorInstance extends ShaftInstance implement public EjectorInstance(MaterialManager dispatcher, EjectorBlockEntity blockEntity) { super(dispatcher, blockEntity); - plate = getTransformMaterial().getModel(AllBlockPartials.EJECTOR_TOP, blockState).createInstance(); + plate = getTransformMaterial().getModel(AllPartialModels.EJECTOR_TOP, blockState).createInstance(); pivotPlate(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java index 4da9dc9bb..b2be8ab6f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java @@ -6,7 +6,7 @@ import com.jozufozu.flywheel.util.transform.TransformStack; import com.jozufozu.flywheel.util.transform.Translate; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntity; import com.simibubi.create.content.contraptions.relays.encased.ShaftRenderer; import com.simibubi.create.foundation.render.CachedBufferer; @@ -46,7 +46,7 @@ public class EjectorRenderer extends ShaftRenderer { float angle = lidProgress * 70; if (!Backend.canUseInstancing(be.getLevel())) { - SuperByteBuffer model = CachedBufferer.partial(AllBlockPartials.EJECTOR_TOP, be.getBlockState()); + SuperByteBuffer model = CachedBufferer.partial(AllPartialModels.EJECTOR_TOP, be.getBlockState()); applyLidAngle(be, angle, model); model.light(light) .renderInto(ms, vertexBuilder); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTargetHandler.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTargetHandler.java index 501756df7..26da00047 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTargetHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTargetHandler.java @@ -120,7 +120,7 @@ public class EjectorTargetHandler { h = Math.abs(diff.getX() + diff.getZ()); v = -diff.getY(); - AllPackets.channel.sendToServer(new EjectorPlacementPacket(h, v, pos, validTargetDirection)); + AllPackets.getChannel().sendToServer(new EjectorPlacementPacket(h, v, pos, validTargetDirection)); currentSelection = null; currentItem = null; @@ -134,7 +134,7 @@ public class EjectorTargetHandler { int xDiff = currentSelection.getX() - pos.getX(); int zDiff = currentSelection.getZ() - pos.getZ(); - int max = AllConfigs.SERVER.kinetics.maxEjectorDistance.get(); + int max = AllConfigs.server().kinetics.maxEjectorDistance.get(); if (Math.abs(xDiff) > max || Math.abs(zDiff) > max) return null; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java index b9715f81d..75be2a479 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.api.instance.TickableInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.Color; public class BrassDiodeInstance extends BlockEntityInstance implements TickableInstance { @@ -19,7 +19,7 @@ public class BrassDiodeInstance extends BlockEntityInstance s.saveValues(sourceData)); } - AllPackets.channel.sendToServer(new DisplayLinkConfigurationPacket(blockEntity.getBlockPos(), sourceData, + AllPackets.getChannel().sendToServer(new DisplayLinkConfigurationPacket(blockEntity.getBlockPos(), sourceData, targetLineSelector == null ? 0 : targetLineSelector.getState())); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlockEntity.java index b13a3c57b..af62681d5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlockEntity.java @@ -219,7 +219,7 @@ public class FunnelBlockEntity extends SmartBlockEntity implements IHaveHovering } private int startCooldown() { - return extractionCooldown = AllConfigs.SERVER.logistics.defaultExtractionTimer.get(); + return extractionCooldown = AllConfigs.server().logistics.defaultExtractionTimer.get(); } @Override @@ -284,7 +284,7 @@ public class FunnelBlockEntity extends SmartBlockEntity implements IHaveHovering public void flap(boolean inward) { if (!level.isClientSide) { - AllPackets.channel.send(packetTarget(), new FunnelFlapPacket(this, inward)); + AllPackets.getChannel().send(packetTarget(), new FunnelFlapPacket(this, inward)); } else { flap.setValue(inward ? 1 : -1); AllSoundEvents.FUNNEL_FLAP.playAt(level, worldPosition, 1, 1, true); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java index 2c44dd6bd..becadec43 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java @@ -8,7 +8,7 @@ import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.PartialModel; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.block.flap.FlapData; import com.simibubi.create.foundation.render.AllMaterialSpecs; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -27,8 +27,8 @@ public class FunnelInstance extends BlockEntityInstance imple if (!blockEntity.hasFlap()) return; - PartialModel flapPartial = (blockState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP - : AllBlockPartials.BELT_FUNNEL_FLAP); + PartialModel flapPartial = (blockState.getBlock() instanceof FunnelBlock ? AllPartialModels.FUNNEL_FLAP + : AllPartialModels.BELT_FUNNEL_FLAP); Instancer model = materialManager.defaultSolid() .material(AllMaterialSpecs.FLAPS) .getModel(flapPartial, blockState); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java index b5310d09d..5c9258fd2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java @@ -75,7 +75,7 @@ public class FunnelMovementBehaviour implements MovementBehaviour { ItemStack filter = getFilter(context); int filterAmount = context.blockEntityData.getInt("FilterAmount"); if (filterAmount <= 0) - filterAmount = hasFilter ? AllConfigs.SERVER.logistics.defaultExtractionLimit.get() : 1; + filterAmount = hasFilter ? AllConfigs.server().logistics.defaultExtractionLimit.get() : 1; ItemStack extract = ItemHelper.extract(context.contraption.getSharedInventory(), s -> FilterItem.test(world, s, filter), ItemHelper.ExtractionCountMode.UPTO, filterAmount, false); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java index 043af7472..c31ca61f0 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java @@ -5,7 +5,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -35,8 +35,8 @@ public class FunnelRenderer extends SmartBlockEntityRenderer BlockState blockState = be.getBlockState(); VertexConsumer vb = buffer.getBuffer(RenderType.solid()); - PartialModel partialModel = (blockState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP - : AllBlockPartials.BELT_FUNNEL_FLAP); + PartialModel partialModel = (blockState.getBlock() instanceof FunnelBlock ? AllPartialModels.FUNNEL_FLAP + : AllPartialModels.BELT_FUNNEL_FLAP); SuperByteBuffer flapBuffer = CachedBufferer.partial(partialModel, blockState); Vec3 pivot = VecHelper.voxelSpace(0, 10, 9.5f); TransformStack msr = TransformStack.cast(ms); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlockEntity.java index 9a74f833e..ca2f76ffc 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlockEntity.java @@ -560,7 +560,7 @@ public class ArmBlockEntity extends KineticBlockEntity implements ITransformable } public static int getRange() { - return AllConfigs.SERVER.logistics.mechanicalArmRange.get(); + return AllConfigs.server().logistics.mechanicalArmRange.get(); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java index 766b30268..7e381a79a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java @@ -11,7 +11,7 @@ import com.jozufozu.flywheel.api.instance.DynamicInstance; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -48,18 +48,18 @@ public class ArmInstance extends SingleRotatingInstance implemen Material mat = getTransformMaterial(); - base = mat.getModel(AllBlockPartials.ARM_BASE, blockState) + base = mat.getModel(AllPartialModels.ARM_BASE, blockState) .createInstance(); - lowerBody = mat.getModel(AllBlockPartials.ARM_LOWER_BODY, blockState) + lowerBody = mat.getModel(AllPartialModels.ARM_LOWER_BODY, blockState) .createInstance(); - upperBody = mat.getModel(AllBlockPartials.ARM_UPPER_BODY, blockState) + upperBody = mat.getModel(AllPartialModels.ARM_UPPER_BODY, blockState) .createInstance(); - head = mat.getModel(AllBlockPartials.ARM_HEAD, blockState) + head = mat.getModel(AllPartialModels.ARM_HEAD, blockState) .createInstance(); - claw = mat.getModel(AllBlockPartials.ARM_CLAW_BASE, blockState) + claw = mat.getModel(AllPartialModels.ARM_CLAW_BASE, blockState) .createInstance(); - Instancer clawHalfModel = mat.getModel(AllBlockPartials.ARM_CLAW_GRIP, blockState); + Instancer clawHalfModel = mat.getModel(AllPartialModels.ARM_CLAW_GRIP, blockState); ModelData clawGrip1 = clawHalfModel.createInstance(); ModelData clawGrip2 = clawHalfModel.createInstance(); @@ -175,7 +175,7 @@ public class ArmInstance extends SingleRotatingInstance implemen @Override protected Instancer getModel() { - return getRotatingMaterial().getModel(AllBlockPartials.ARM_COG, blockEntity.getBlockState()); + return getRotatingMaterial().getModel(AllPartialModels.ARM_COG, blockEntity.getBlockState()); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java index cd2f2ac6a..971acbbda 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java @@ -124,7 +124,7 @@ public class ArmInteractionPointHandler { .sendStatus(player); } - AllPackets.channel.sendToServer(new ArmPlacementPacket(currentSelection, pos)); + AllPackets.getChannel().sendToServer(new ArmPlacementPacket(currentSelection, pos)); currentSelection.clear(); currentItem = null; } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java index 815dab516..ab0492d94 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmBlockEntity.Phase; import com.simibubi.create.foundation.render.CachedBufferer; @@ -110,17 +110,17 @@ public class ArmRenderer extends KineticBlockEntityRenderer { private void renderArm(VertexConsumer builder, PoseStack ms, PoseStack msLocal, TransformStack msr, BlockState blockState, int color, float baseAngle, float lowerArmAngle, float upperArmAngle, float headAngle, boolean hasItem, boolean isBlockItem, int light) { - SuperByteBuffer base = CachedBufferer.partial(AllBlockPartials.ARM_BASE, blockState) + SuperByteBuffer base = CachedBufferer.partial(AllPartialModels.ARM_BASE, blockState) .light(light); - SuperByteBuffer lowerBody = CachedBufferer.partial(AllBlockPartials.ARM_LOWER_BODY, blockState) + SuperByteBuffer lowerBody = CachedBufferer.partial(AllPartialModels.ARM_LOWER_BODY, blockState) .light(light); - SuperByteBuffer upperBody = CachedBufferer.partial(AllBlockPartials.ARM_UPPER_BODY, blockState) + SuperByteBuffer upperBody = CachedBufferer.partial(AllPartialModels.ARM_UPPER_BODY, blockState) .light(light); - SuperByteBuffer head = CachedBufferer.partial(AllBlockPartials.ARM_HEAD, blockState) + SuperByteBuffer head = CachedBufferer.partial(AllPartialModels.ARM_HEAD, blockState) .light(light); - SuperByteBuffer claw = CachedBufferer.partial(AllBlockPartials.ARM_CLAW_BASE, blockState) + SuperByteBuffer claw = CachedBufferer.partial(AllPartialModels.ARM_CLAW_BASE, blockState) .light(light); - SuperByteBuffer clawGrip = CachedBufferer.partial(AllBlockPartials.ARM_CLAW_GRIP, blockState); + SuperByteBuffer clawGrip = CachedBufferer.partial(AllPartialModels.ARM_CLAW_GRIP, blockState); transformBase(msr, baseAngle); base.transform(msLocal) @@ -201,7 +201,7 @@ public class ArmRenderer extends KineticBlockEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(ArmBlockEntity be, BlockState state) { - return CachedBufferer.partial(AllBlockPartials.ARM_COG, state); + return CachedBufferer.partial(AllPartialModels.ARM_COG, state); } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java index 2b5c465d7..122e61f12 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java @@ -7,7 +7,7 @@ import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.transform.Rotate; import com.jozufozu.flywheel.util.transform.Translate; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Color; @@ -28,9 +28,9 @@ public class AnalogLeverInstance extends BlockEntityInstance mat = getTransformMaterial(); - handle = mat.getModel(AllBlockPartials.ANALOG_LEVER_HANDLE, blockState) + handle = mat.getModel(AllPartialModels.ANALOG_LEVER_HANDLE, blockState) .createInstance(); - indicator = mat.getModel(AllBlockPartials.ANALOG_LEVER_INDICATOR, blockState) + indicator = mat.getModel(AllPartialModels.ANALOG_LEVER_INDICATOR, blockState) .createInstance(); transform(indicator); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java index 403ac97ce..ccb0d7395 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.logistics.block.redstone; import com.jozufozu.flywheel.backend.Backend; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -34,7 +34,7 @@ public class AnalogLeverRenderer extends SafeBlockEntityRenderer type, BlockPos pos, BlockState state) { super(type, pos, state); - inventory = new ItemStackHandler(AllConfigs.SERVER.logistics.vaultCapacity.get()) { + inventory = new ItemStackHandler(AllConfigs.server().logistics.vaultCapacity.get()) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java index 08fa7d3b3..d30b27a5f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java @@ -91,11 +91,11 @@ public class LinkedControllerClientHandler { selectedLocation = BlockPos.ZERO; if (inLectern()) - AllPackets.channel.sendToServer(new LinkedControllerStopLecternPacket(lecternPos)); + AllPackets.getChannel().sendToServer(new LinkedControllerStopLecternPacket(lecternPos)); lecternPos = null; if (!currentlyPressed.isEmpty()) - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(currentlyPressed, false)); + AllPackets.getChannel().sendToServer(new LinkedControllerInputPacket(currentlyPressed, false)); currentlyPressed.clear(); LinkedControllerItemRenderer.resetButtons(); @@ -164,13 +164,13 @@ public class LinkedControllerClientHandler { if (MODE == Mode.ACTIVE) { // Released Keys if (!releasedKeys.isEmpty()) { - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(releasedKeys, false, lecternPos)); + AllPackets.getChannel().sendToServer(new LinkedControllerInputPacket(releasedKeys, false, lecternPos)); AllSoundEvents.CONTROLLER_CLICK.playAt(player.level, player.blockPosition(), 1f, .5f, true); } // Newly Pressed Keys if (!newKeys.isEmpty()) { - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(newKeys, true, lecternPos)); + AllPackets.getChannel().sendToServer(new LinkedControllerInputPacket(newKeys, true, lecternPos)); packetCooldown = PACKET_RATE; AllSoundEvents.CONTROLLER_CLICK.playAt(player.level, player.blockPosition(), 1f, .75f, true); } @@ -178,7 +178,7 @@ public class LinkedControllerClientHandler { // Keepalive Pressed Keys if (packetCooldown == 0) { if (!pressedKeys.isEmpty()) { - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(pressedKeys, true, lecternPos)); + AllPackets.getChannel().sendToServer(new LinkedControllerInputPacket(pressedKeys, true, lecternPos)); packetCooldown = PACKET_RATE; } } @@ -196,7 +196,7 @@ public class LinkedControllerClientHandler { for (Integer integer : newKeys) { LinkBehaviour linkBehaviour = BlockEntityBehaviour.get(mc.level, selectedLocation, LinkBehaviour.TYPE); if (linkBehaviour != null) { - AllPackets.channel.sendToServer(new LinkedControllerBindPacket(integer, selectedLocation)); + AllPackets.getChannel().sendToServer(new LinkedControllerBindPacket(integer, selectedLocation)); Lang.translate("linked_controller.key_bound", controls.get(integer) .getTranslatedKeyMessage() .getString()) diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/AbstractFilterScreen.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/AbstractFilterScreen.java index 074fb9090..fcded21f8 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/AbstractFilterScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/AbstractFilterScreen.java @@ -147,7 +147,7 @@ public abstract class AbstractFilterScreen extends protected void contentsCleared() {} protected void sendOptionUpdate(Option option) { - AllPackets.channel.sendToServer(new FilterScreenPacket(option)); + AllPackets.getChannel().sendToServer(new FilterScreenPacket(option)); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterScreen.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterScreen.java index ee90cb1c8..413aa8c26 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterScreen.java @@ -237,7 +237,7 @@ public class AttributeFilterScreen extends AbstractFilterScreen serverPlayer), + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> serverPlayer), new TrainPacket(train, true)); } } @@ -228,7 +228,7 @@ public class GlobalRailwayManager { if (train.invalid) { iterator.remove(); trains.remove(train.id); - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainPacket(train, false)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrainPacket(train, false)); continue; } @@ -244,7 +244,7 @@ public class GlobalRailwayManager { if (train.invalid) { iterator.remove(); trains.remove(train.id); - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainPacket(train, false)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrainPacket(train, false)); continue; } @@ -269,7 +269,7 @@ public class GlobalRailwayManager { } private static boolean isTrackGraphDebugActive() { - return KineticDebugger.isF3DebugModeActive() && AllConfigs.CLIENT.showTrackGraphOnF3.get(); + return KineticDebugger.isF3DebugModeActive() && AllConfigs.client().showTrackGraphOnF3.get(); } public GlobalRailwayManager sided(LevelAccessor level) { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphRollCallPacket.java b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphRollCallPacket.java index fe4f3b0f8..f6b963d68 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphRollCallPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphRollCallPacket.java @@ -71,7 +71,7 @@ public class TrackGraphRollCallPacket extends SimplePacketBase { } for (Integer failed : failedIds) - AllPackets.channel.sendToServer(new TrackGraphRequestPacket(failed)); + AllPackets.getChannel().sendToServer(new TrackGraphRequestPacket(failed)); for (UUID unused : unusedIds) manager.trackNetworks.remove(unused); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java index 2c52fe585..b96ea36dc 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java @@ -33,7 +33,7 @@ public class TrackGraphSync { for (TrackGraphPacket packet : queuedPackets) { if (!packet.packetDeletesGraph && !Create.RAILWAYS.trackNetworks.containsKey(packet.graphId)) continue; - AllPackets.channel.send(PacketDistributor.ALL.noArg(), packet); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), packet); rollCallIn = 3; } @@ -102,16 +102,16 @@ public class TrackGraphSync { // public void sendEdgeGroups(List ids, List colors, ServerPlayer player) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> player), + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> player), new SignalEdgeGroupPacket(ids, colors, true)); } public void edgeGroupCreated(UUID id, EdgeGroupColor color) { - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new SignalEdgeGroupPacket(id, color)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new SignalEdgeGroupPacket(id, color)); } public void edgeGroupRemoved(UUID id) { - AllPackets.channel.send(PacketDistributor.ALL.noArg(), + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new SignalEdgeGroupPacket(ImmutableList.of(id), Collections.emptyList(), false)); } @@ -178,11 +178,11 @@ public class TrackGraphSync { } private void sendRollCall() { - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrackGraphRollCallPacket()); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrackGraphRollCallPacket()); } private TrackGraphSyncPacket flushAndCreateNew(TrackGraph graph, ServerPlayer player, TrackGraphSyncPacket packet) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> player), packet); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> player), packet); packet = new TrackGraphSyncPacket(graph.id, graph.netId); return packet; } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/BogeyInstance.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/BogeyInstance.java index 9a8a6c9c1..4c0b2a000 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/BogeyInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/BogeyInstance.java @@ -6,8 +6,8 @@ import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.AnimationTickHolder; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Iterate; @@ -91,14 +91,14 @@ public sealed class BogeyInstance { frame = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.BOGEY_FRAME) + .getModel(AllPartialModels.BOGEY_FRAME) .createInstance(); wheels = new ModelData[2]; materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.SMALL_BOGEY_WHEELS) + .getModel(AllPartialModels.SMALL_BOGEY_WHEELS) .createInstances(wheels); } @@ -160,13 +160,13 @@ public sealed class BogeyInstance { .setValue(ShaftBlock.AXIS, Direction.Axis.X)) .createInstances(secondShaft); - drive = mat.getModel(AllBlockPartials.BOGEY_DRIVE) + drive = mat.getModel(AllPartialModels.BOGEY_DRIVE) .createInstance(); - piston = mat.getModel(AllBlockPartials.BOGEY_PISTON) + piston = mat.getModel(AllPartialModels.BOGEY_PISTON) .createInstance(); - wheels = mat.getModel(AllBlockPartials.LARGE_BOGEY_WHEELS) + wheels = mat.getModel(AllPartialModels.LARGE_BOGEY_WHEELS) .createInstance(); - pin = mat.getModel(AllBlockPartials.BOGEY_PIN) + pin = mat.getModel(AllPartialModels.BOGEY_PIN) .createInstance(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java index e427b244a..b4894742f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java @@ -199,7 +199,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { carriage.forEachPresentEntity(cce -> { cce.contraption.getBlocks() .put(localPos, newInfo); - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> cce), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> cce), new ContraptionBlockChangedPacket(cce.getId(), localPos, newInfo.state)); }); } @@ -562,7 +562,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { .equals(initialOrientation); if (hudPacketCooldown-- <= 0 && player instanceof ServerPlayer sp) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> sp), new TrainHUDUpdatePacket(carriage.train)); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> sp), new TrainHUDUpdatePacket(carriage.train)); hudPacketCooldown = 5; } @@ -653,7 +653,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { carriage.train.manualSteer = targetSteer < 0 ? SteerDirection.RIGHT : targetSteer > 0 ? SteerDirection.LEFT : SteerDirection.NONE; - double topSpeed = carriage.train.maxSpeed() * AllConfigs.SERVER.trains.manualTrainSpeedModifier.getF(); + double topSpeed = carriage.train.maxSpeed() * AllConfigs.server().trains.manualTrainSpeedModifier.getF(); double cappedTopSpeed = topSpeed * carriage.train.throttle; if (carriage.getLeadingPoint().edge != null && carriage.getLeadingPoint().edge.isTurn() @@ -676,7 +676,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { private void sendPrompt(Player player, MutableComponent component, boolean shadow) { if (player instanceof ServerPlayer sp) - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> sp), new TrainPromptPacket(component, shadow)); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> sp), new TrainPromptPacket(component, shadow)); } boolean stationMessage = false; diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageCouplingRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageCouplingRenderer.java index f67a86798..71ae82532 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageCouplingRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageCouplingRenderer.java @@ -5,7 +5,7 @@ import java.util.List; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.utility.AngleHelper; @@ -74,7 +74,7 @@ public class CarriageCouplingRenderer { ms.pushPose(); ms.pushPose(); ms.translate(anchor.x, anchor.y, anchor.z); - CachedBufferer.partial(AllBlockPartials.TRAIN_COUPLING_HEAD, air) + CachedBufferer.partial(AllPartialModels.TRAIN_COUPLING_HEAD, air) .rotateY(-yRot) .rotateX(xRot) .light(lightCoords) @@ -86,7 +86,7 @@ public class CarriageCouplingRenderer { int couplingSegments = (int) Math.round(couplingDistance * 4); double stretch = ((anchor2.distanceTo(anchor) - 2 * margin) * 4) / couplingSegments; for (int j = 0; j < couplingSegments; j++) { - CachedBufferer.partial(AllBlockPartials.TRAIN_COUPLING_CABLE, air) + CachedBufferer.partial(AllPartialModels.TRAIN_COUPLING_CABLE, air) .rotateY(-yRot + 180) .rotateX(-xRot) .translate(0, 0, margin + 2 / 16f) @@ -102,7 +102,7 @@ public class CarriageCouplingRenderer { ms.translate(-position.x, -position.y, -position.z); ms.translate(position2.x, position2.y, position2.z); ms.translate(anchor2.x, anchor2.y, anchor2.z); - CachedBufferer.partial(AllBlockPartials.TRAIN_COUPLING_HEAD, air) + CachedBufferer.partial(AllPartialModels.TRAIN_COUPLING_HEAD, air) .rotateY(-yRot + 180) .rotateX(-xRot) .light(lightCoords2) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/Train.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/Train.java index 482e970b9..6aba1b49a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/Train.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/Train.java @@ -740,7 +740,7 @@ public class Train { } Create.RAILWAYS.removeTrain(id); - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainPacket(this, false)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrainPacket(this, false)); return true; } @@ -1070,18 +1070,18 @@ public class Train { } public float maxSpeed() { - return (fuelTicks > 0 ? AllConfigs.SERVER.trains.poweredTrainTopSpeed.getF() - : AllConfigs.SERVER.trains.trainTopSpeed.getF()) / 20; + return (fuelTicks > 0 ? AllConfigs.server().trains.poweredTrainTopSpeed.getF() + : AllConfigs.server().trains.trainTopSpeed.getF()) / 20; } public float maxTurnSpeed() { - return (fuelTicks > 0 ? AllConfigs.SERVER.trains.poweredTrainTurningTopSpeed.getF() - : AllConfigs.SERVER.trains.trainTurningTopSpeed.getF()) / 20; + return (fuelTicks > 0 ? AllConfigs.server().trains.poweredTrainTurningTopSpeed.getF() + : AllConfigs.server().trains.trainTurningTopSpeed.getF()) / 20; } public float acceleration() { - return (fuelTicks > 0 ? AllConfigs.SERVER.trains.poweredTrainAcceleration.getF() - : AllConfigs.SERVER.trains.trainAcceleration.getF()) / 400; + return (fuelTicks > 0 ? AllConfigs.server().trains.poweredTrainAcceleration.getF() + : AllConfigs.server().trains.trainAcceleration.getF()) / 400; } public CompoundTag write(DimensionPalette dimensions) { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocationPacket.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocationPacket.java index 9db23eb93..235999f35 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocationPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocationPacket.java @@ -84,7 +84,7 @@ public class TrainRelocationPacket extends SimplePacketBase { if (!train.id.equals(cce.trainId)) return; - int verifyDistance = AllConfigs.SERVER.trains.maxTrackPlacementLength.get() * 2; + int verifyDistance = AllConfigs.server().trains.maxTrackPlacementLength.get() * 2; if (!sender.position() .closerThan(Vec3.atCenterOf(pos), verifyDistance)) { Create.LOGGER.warn(messagePrefix + train.name.getString() + ": player too far from clicked pos"); @@ -102,7 +102,7 @@ public class TrainRelocationPacket extends SimplePacketBase { .withStyle(ChatFormatting.GREEN), true); train.carriages.forEach(c -> c.forEachPresentEntity(e -> { e.nonDamageTicks = 10; - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> e), + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> e), new ContraptionRelocationPacket(e.getId())); })); return; diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocator.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocator.java index 49a0bcbcc..f2b3e9c1e 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocator.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainRelocator.java @@ -151,7 +151,7 @@ public class TrainRelocator { boolean result = relocate(relocating, mc.level, blockPos, hoveredBezier, direction, lookAngle, true); if (!simulate && result) { relocating.carriages.forEach(c -> c.forEachPresentEntity(e -> e.nonDamageTicks = 10)); - AllPackets.channel.sendToServer(new TrainRelocationPacket(relocatingTrain, blockPos, hoveredBezier, + AllPackets.getChannel().sendToServer(new TrainRelocationPacket(relocatingTrain, blockPos, hoveredBezier, direction, lookAngle, relocatingEntityId)); } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/display/FlapDisplayRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/display/FlapDisplayRenderer.java index a796c41f3..e9b08f552 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/display/FlapDisplayRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/display/FlapDisplayRenderer.java @@ -8,7 +8,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack.Pose; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Matrix4f; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.SuperByteBuffer; @@ -228,7 +228,7 @@ public class FlapDisplayRenderer extends KineticBlockEntityRenderer { float renderTime = AnimationTickHolder.getRenderTime(be.getLevel()); if (signalState.isRedLight(renderTime)) - CachedBufferer.partial(AllBlockPartials.SIGNAL_ON, blockState) + CachedBufferer.partial(AllPartialModels.SIGNAL_ON, blockState) .renderInto(ms, buffer.getBuffer(RenderType.solid())); else - CachedBufferer.partial(AllBlockPartials.SIGNAL_OFF, blockState) + CachedBufferer.partial(AllPartialModels.SIGNAL_OFF, blockState) .light(light) .renderInto(ms, buffer.getBuffer(RenderType.solid())); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/AssemblyScreen.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/AssemblyScreen.java index 9eda0573c..81e19290d 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/AssemblyScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/AssemblyScreen.java @@ -5,7 +5,7 @@ import java.util.List; import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.logistics.trains.entity.Carriage; import com.simibubi.create.content.logistics.trains.entity.Train; @@ -65,14 +65,14 @@ public class AssemblyScreen extends AbstractStationScreen { toggleAssemblyButton.active = false; toggleAssemblyButton.setToolTip(Lang.translateDirect("station.assemble_train")); toggleAssemblyButton.withCallback(() -> { - AllPackets.channel.sendToServer(StationEditPacket.tryAssemble(blockEntity.getBlockPos())); + AllPackets.getChannel().sendToServer(StationEditPacket.tryAssemble(blockEntity.getBlockPos())); }); quitAssembly = new IconButton(x + 73, by, AllIcons.I_DISABLE); quitAssembly.active = true; quitAssembly.setToolTip(Lang.translateDirect("station.cancel")); quitAssembly.withCallback(() -> { - AllPackets.channel.sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); + AllPackets.getChannel().sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); minecraft.setScreen(new StationScreen(blockEntity, station)); }); @@ -90,7 +90,7 @@ public class AssemblyScreen extends AbstractStationScreen { toggleAssemblyButton.active = blockEntity.bogeyCount > 0 || train != null; if (train != null) { - AllPackets.channel.sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); + AllPackets.getChannel().sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); minecraft.setScreen(new StationScreen(blockEntity, station)); for (Carriage carriage : train.carriages) carriage.updateConductors(); @@ -105,10 +105,10 @@ public class AssemblyScreen extends AbstractStationScreen { toggleAssemblyButton.setToolTip(Lang.translateDirect("station.assemble_train")); toggleAssemblyButton.setIcon(AllGuiTextures.I_ASSEMBLE_TRAIN); toggleAssemblyButton.withCallback(() -> { - AllPackets.channel.sendToServer(StationEditPacket.tryAssemble(blockEntity.getBlockPos())); + AllPackets.getChannel().sendToServer(StationEditPacket.tryAssemble(blockEntity.getBlockPos())); }); } else { - AllPackets.channel.sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); + AllPackets.getChannel().sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, station.name)); minecraft.setScreen(new StationScreen(blockEntity, station)); } } @@ -158,13 +158,13 @@ public class AssemblyScreen extends AbstractStationScreen { if (train != null) { ResourceLocation iconId = iconTypes.get(iconTypeScroll.getState()); train.icon = TrainIconType.byId(iconId); - AllPackets.channel.sendToServer(new TrainEditPacket(train.id, "", iconId)); + AllPackets.getChannel().sendToServer(new TrainEditPacket(train.id, "", iconId)); } } @Override protected PartialModel getFlag(float partialTicks) { - return AllBlockPartials.STATION_ASSEMBLE; + return AllPartialModels.STATION_ASSEMBLE; } } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationBlockEntity.java index 7d64ffebb..5f48e73f9 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationBlockEntity.java @@ -362,8 +362,8 @@ public class StationBlockEntity extends SmartBlockEntity implements ITransformab BlockPos bogeyOffset = new BlockPos(track.getUpNormal(level, targetPosition, trackState)); - int MAX_LENGTH = AllConfigs.SERVER.trains.maxAssemblyLength.get(); - int MAX_BOGEY_COUNT = AllConfigs.SERVER.trains.maxBogeyCount.get(); + int MAX_LENGTH = AllConfigs.server().trains.maxAssemblyLength.get(); + int MAX_BOGEY_COUNT = AllConfigs.server().trains.maxBogeyCount.get(); int bogeyIndex = 0; int maxBogeyCount = MAX_BOGEY_COUNT; @@ -655,7 +655,7 @@ public class StationBlockEntity extends SmartBlockEntity implements ITransformab train.collectInitiallyOccupiedSignalBlocks(); Create.RAILWAYS.addTrain(train); - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainPacket(train, true)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrainPacket(train, true)); clearException(); award(AllAdvancements.TRAIN); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationRenderer.java index 2aaadece7..380109764 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationRenderer.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.Transform; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.block.depot.DepotRenderer; import com.simibubi.create.content.logistics.trains.ITrackBlock; import com.simibubi.create.content.logistics.trains.management.edgePoint.TrackTargetingBehaviour; @@ -51,7 +51,7 @@ public class StationRenderer extends SafeBlockEntityRenderer if (!isAssembling || (station == null || station.getPresentTrain() != null) && !be.isVirtual()) { renderFlag( - be.flag.getValue(partialTicks) > 0.75f ? AllBlockPartials.STATION_ON : AllBlockPartials.STATION_OFF, be, + be.flag.getValue(partialTicks) > 0.75f ? AllPartialModels.STATION_ON : AllPartialModels.STATION_OFF, be, partialTicks, ms, buffer, light, overlay); ms.pushPose(); ms.translate(-pos.getX(), -pos.getY(), -pos.getZ()); @@ -61,7 +61,7 @@ public class StationRenderer extends SafeBlockEntityRenderer return; } - renderFlag(AllBlockPartials.STATION_ASSEMBLE, be, partialTicks, ms, buffer, light, overlay); + renderFlag(AllPartialModels.STATION_ASSEMBLE, be, partialTicks, ms, buffer, light, overlay); ITrackBlock track = (ITrackBlock) block; Direction direction = be.assemblyDirection; diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java index b5ee9c13a..9b1667644 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java @@ -8,7 +8,7 @@ import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.trains.entity.Carriage; import com.simibubi.create.content.logistics.trains.entity.Train; import com.simibubi.create.content.logistics.trains.entity.TrainIconType; @@ -89,7 +89,7 @@ public class StationScreen extends AbstractStationScreen { dropScheduleButton.active = false; dropScheduleButton.visible = false; dropScheduleButton - .withCallback(() -> AllPackets.channel.sendToServer(StationEditPacket.dropSchedule(blockEntity.getBlockPos()))); + .withCallback(() -> AllPackets.getChannel().sendToServer(StationEditPacket.dropSchedule(blockEntity.getBlockPos()))); addRenderableWidget(dropScheduleButton); onTextChanged = s -> trainNameBox.x = nameBoxX(s, trainNameBox); @@ -333,32 +333,32 @@ public class StationScreen extends AbstractStationScreen { Train train = displayedTrain.get(); if (train != null && !trainNameBox.getValue() .equals(train.name.getString())) - AllPackets.channel.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId())); + AllPackets.getChannel().sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId())); } private void syncStationName() { if (!nameBox.getValue() .equals(station.name)) - AllPackets.channel.sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, nameBox.getValue())); + AllPackets.getChannel().sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), false, nameBox.getValue())); } @Override public void removed() { super.removed(); - AllPackets.channel + AllPackets.getChannel() .sendToServer(StationEditPacket.configure(blockEntity.getBlockPos(), switchingToAssemblyMode, nameBox.getValue())); Train train = displayedTrain.get(); if (train == null) return; if (!switchingToAssemblyMode) - AllPackets.channel.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId())); + AllPackets.getChannel().sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId())); else blockEntity.imminentTrain = null; } @Override protected PartialModel getFlag(float partialTicks) { - return blockEntity.flag.getValue(partialTicks) > 0.75f ? AllBlockPartials.STATION_ON : AllBlockPartials.STATION_OFF; + return blockEntity.flag.getValue(partialTicks) > 0.75f ? AllPartialModels.STATION_ON : AllPartialModels.STATION_OFF; } } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/TrainEditPacket.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/TrainEditPacket.java index f89993b53..251e9e124 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/TrainEditPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/TrainEditPacket.java @@ -55,7 +55,7 @@ public class TrainEditPacket extends SimplePacketBase { train.name = Components.literal(name); train.icon = TrainIconType.byId(iconType); if (sender != null) - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainEditReturnPacket(id, name, iconType)); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new TrainEditReturnPacket(id, name, iconType)); }); ctx.setPacketHandled(true); } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleScreen.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleScreen.java index 580d60c39..c98d21273 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleScreen.java @@ -181,7 +181,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen { for (int i = 0; i < field.slotsTargeted(); i++) { ItemStack item = field.getItem(i); menu.ghostInventory.setStackInSlot(i, item); - AllPackets.channel.sendToServer(new GhostItemSubmitPacket(item, i)); + AllPackets.getChannel().sendToServer(new GhostItemSubmitPacket(item, i)); } if (field instanceof ScheduleInstruction instruction) { @@ -266,7 +266,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen { IScheduleInput editing = editingCondition == null ? editingDestination : editingCondition; for (int i = 0; i < editing.slotsTargeted(); i++) { editing.setItem(i, menu.ghostInventory.getStackInSlot(i)); - AllPackets.channel.sendToServer(new GhostItemSubmitPacket(ItemStack.EMPTY, i)); + AllPackets.getChannel().sendToServer(new GhostItemSubmitPacket(ItemStack.EMPTY, i)); } editorSubWidgets.saveValues(editing.getData()); @@ -1070,7 +1070,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen { @Override public void removed() { super.removed(); - AllPackets.channel.sendToServer(new ScheduleEditPacket(schedule)); + AllPackets.getChannel().sendToServer(new ScheduleEditPacket(schedule)); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/TrainHatArmorLayer.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/TrainHatArmorLayer.java index 29593a164..feaa18a39 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/TrainHatArmorLayer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/TrainHatArmorLayer.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.logistics.trains.management.schedule; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.logistics.trains.entity.CarriageContraption; import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionEntity; @@ -113,7 +113,7 @@ public class TrainHatArmorLayer ms.translate(0, -2.25f / 16f, 0); msr.rotateX(-8.5f); BlockState air = Blocks.AIR.defaultBlockState(); - CachedBufferer.partial(AllBlockPartials.TRAIN_HAT, air) + CachedBufferer.partial(AllPartialModels.TRAIN_HAT, air) .forEntityRender() .light(light) .renderInto(ms, buffer.getBuffer(renderType)); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/CurvedTrackDestroyPacket.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/CurvedTrackDestroyPacket.java index 8986ab51e..6f8ce2356 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/CurvedTrackDestroyPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/CurvedTrackDestroyPacket.java @@ -48,7 +48,7 @@ public class CurvedTrackDestroyPacket extends BlockEntityConfigurationPacket= 1) { - AllPackets.channel.sendToServer(new CurvedTrackDestroyPacket(breakPos, result.loc() + AllPackets.getChannel().sendToServer(new CurvedTrackDestroyPacket(breakPos, result.loc() .curveTarget(), new BlockPos(result.vec()), false)); resetBreakProgress(); } @@ -128,7 +128,7 @@ public class CurvedTrackInteraction { return true; } if (AllItems.WRENCH.isIn(heldItem) && player.isSteppingCarefully()) { - AllPackets.channel.sendToServer(new CurvedTrackDestroyPacket(result.blockEntity() + AllPackets.getChannel().sendToServer(new CurvedTrackDestroyPacket(result.blockEntity() .getBlockPos(), result.loc() .curveTarget(), diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/StandardBogeyBlock.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/StandardBogeyBlock.java index 51482886f..3507a4d84 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/StandardBogeyBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/StandardBogeyBlock.java @@ -7,8 +7,8 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; import com.simibubi.create.AllBlockEntityTypes; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.content.logistics.trains.IBogeyBlock; import com.simibubi.create.content.logistics.trains.entity.BogeyInstance; @@ -149,14 +149,14 @@ public class StandardBogeyBlock extends Block } private void renderBogey(float wheelAngle, PoseStack ms, int light, VertexConsumer vb, BlockState air) { - CachedBufferer.partial(AllBlockPartials.BOGEY_FRAME, air) + CachedBufferer.partial(AllPartialModels.BOGEY_FRAME, air) .scale(1 - 1 / 512f) .light(light) .renderInto(ms, vb); for (int side : Iterate.positiveAndNegative) { ms.pushPose(); - CachedBufferer.partial(AllBlockPartials.SMALL_BOGEY_WHEELS, air) + CachedBufferer.partial(AllPartialModels.SMALL_BOGEY_WHEELS, air) .translate(0, 12 / 16f, side) .rotateX(wheelAngle) .light(light) @@ -176,22 +176,22 @@ public class StandardBogeyBlock extends Block .light(light) .renderInto(ms, vb); - CachedBufferer.partial(AllBlockPartials.BOGEY_DRIVE, air) + CachedBufferer.partial(AllPartialModels.BOGEY_DRIVE, air) .scale(1 - 1 / 512f) .light(light) .renderInto(ms, vb); - CachedBufferer.partial(AllBlockPartials.BOGEY_PISTON, air) + CachedBufferer.partial(AllPartialModels.BOGEY_PISTON, air) .translate(0, 0, 1 / 4f * Math.sin(AngleHelper.rad(wheelAngle))) .light(light) .renderInto(ms, vb); ms.pushPose(); - CachedBufferer.partial(AllBlockPartials.LARGE_BOGEY_WHEELS, air) + CachedBufferer.partial(AllPartialModels.LARGE_BOGEY_WHEELS, air) .translate(0, 1, 0) .rotateX(wheelAngle) .light(light) .renderInto(ms, vb); - CachedBufferer.partial(AllBlockPartials.BOGEY_PIN, air) + CachedBufferer.partial(AllPartialModels.BOGEY_PIN, air) .translate(0, 1, 0) .rotateX(wheelAngle) .translate(0, 1 / 4f, 0) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java index 19d9bc20b..9bd53ab79 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java @@ -26,8 +26,8 @@ import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockEntityTypes; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; import com.simibubi.create.content.contraptions.particle.CubeParticleData; @@ -675,7 +675,7 @@ public class TrackBlock extends Block PoseStack ms) { TransformStack.cast(ms) .rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(direction))); - return AllBlockPartials.TRACK_ASSEMBLING_OVERLAY; + return AllPartialModels.TRACK_ASSEMBLING_OVERLAY; } @Override @@ -735,10 +735,10 @@ public class TrackBlock extends Block } return switch (type) { - case DUAL_SIGNAL -> AllBlockPartials.TRACK_SIGNAL_DUAL_OVERLAY; - case OBSERVER -> AllBlockPartials.TRACK_OBSERVER_OVERLAY; - case SIGNAL -> AllBlockPartials.TRACK_SIGNAL_OVERLAY; - case STATION -> AllBlockPartials.TRACK_STATION_OVERLAY; + case DUAL_SIGNAL -> AllPartialModels.TRACK_SIGNAL_DUAL_OVERLAY; + case OBSERVER -> AllPartialModels.TRACK_OBSERVER_OVERLAY; + case SIGNAL -> AllPartialModels.TRACK_SIGNAL_OVERLAY; + case STATION -> AllPartialModels.TRACK_STATION_OVERLAY; }; } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockEntity.java index 67631abe5..127db38f5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockEntity.java @@ -135,7 +135,7 @@ public class TrackBlockEntity extends SmartBlockEntity implements ITransformable BlockState blockState = level.getBlockState(worldPosition); if (blockState.hasProperty(TrackBlock.HAS_BE)) level.setBlockAndUpdate(worldPosition, blockState.setValue(TrackBlock.HAS_BE, false)); - AllPackets.channel.send(packetTarget(), new RemoveBlockEntityPacket(worldPosition)); + AllPackets.getChannel().send(packetTarget(), new RemoveBlockEntityPacket(worldPosition)); } public void removeInboundConnections() { @@ -150,7 +150,7 @@ public class TrackBlockEntity extends SmartBlockEntity implements ITransformable bezierConnection.spawnItems(level); bezierConnection.spawnDestroyParticles(level); } - AllPackets.channel.send(packetTarget(), new RemoveBlockEntityPacket(worldPosition)); + AllPackets.getChannel().send(packetTarget(), new RemoveBlockEntityPacket(worldPosition)); } public void bind(ResourceKey boundDimension, BlockPos boundLocation) { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockItem.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockItem.java index a8b5929dc..2deea3f23 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlockItem.java @@ -157,7 +157,7 @@ public class TrackBlockItem extends BlockItem { if (!AllBlocks.TRACK.isIn(stack) || !stack.hasTag()) return; if (Minecraft.getInstance().options.keySprint.isDown()) - AllPackets.channel + AllPackets.getChannel() .sendToServer(new PlaceExtendedCurvePacket(event.getHand() == InteractionHand.MAIN_HAND, true)); } diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackInstance.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackInstance.java index 1c2b98311..42bf2fa01 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackInstance.java @@ -16,7 +16,7 @@ import com.jozufozu.flywheel.util.box.ImmutableBox; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack.Pose; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.logistics.trains.BezierConnection; import com.simibubi.create.content.logistics.trains.BezierConnection.GirderAngles; import com.simibubi.create.content.logistics.trains.BezierConnection.SegmentAngles; @@ -112,11 +112,11 @@ public class TrackInstance extends BlockEntityInstance { leftLightPos = new BlockPos[segCount]; rightLightPos = new BlockPos[segCount]; - mat.getModel(AllBlockPartials.TRACK_TIE) + mat.getModel(AllPartialModels.TRACK_TIE) .createInstances(ties); - mat.getModel(AllBlockPartials.TRACK_SEGMENT_LEFT) + mat.getModel(AllPartialModels.TRACK_SEGMENT_LEFT) .createInstances(left); - mat.getModel(AllBlockPartials.TRACK_SEGMENT_RIGHT) + mat.getModel(AllPartialModels.TRACK_SEGMENT_RIGHT) .createInstances(right); SegmentAngles[] segments = bc.getBakedSegments(); @@ -184,9 +184,9 @@ public class TrackInstance extends BlockEntityInstance { beams = Couple.create(() -> new ModelData[segCount]); beamCaps = Couple.create(() -> Couple.create(() -> new ModelData[segCount])); lightPos = new BlockPos[segCount]; - beams.forEach(mat.getModel(AllBlockPartials.GIRDER_SEGMENT_MIDDLE)::createInstances); - beamCaps.forEachWithContext((c, top) -> c.forEach(mat.getModel(top ? AllBlockPartials.GIRDER_SEGMENT_TOP - : AllBlockPartials.GIRDER_SEGMENT_BOTTOM)::createInstances)); + beams.forEach(mat.getModel(AllPartialModels.GIRDER_SEGMENT_MIDDLE)::createInstances); + beamCaps.forEachWithContext((c, top) -> c.forEach(mat.getModel(top ? AllPartialModels.GIRDER_SEGMENT_TOP + : AllPartialModels.GIRDER_SEGMENT_BOTTOM)::createInstances)); GirderAngles[] bakedGirders = bc.getBakedGirders(); for (int i = 1; i < bakedGirders.length; i++) { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java index bd7505c63..48de2f3f0 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java @@ -102,7 +102,7 @@ public class TrackPlacement { ItemStack stack, boolean girder, boolean maximiseTurn) { Vec3 lookVec = player.getLookAngle(); int lookAngle = (int) (22.5 + AngleHelper.deg(Mth.atan2(lookVec.z, lookVec.x)) % 360) / 8; - int maxLength = AllConfigs.SERVER.trains.maxTrackPlacementLength.get(); + int maxLength = AllConfigs.server().trains.maxTrackPlacementLength.get(); if (level.isClientSide && cached != null && pos2.equals(hoveringPos) && stack.equals(lastItem) && hoveringMaxed == maximiseTurn && lookAngle == hoveringAngle) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java index 3a3be7340..e53f7b716 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.logistics.trains.track; -import static com.simibubi.create.AllBlockPartials.GIRDER_SEGMENT_BOTTOM; -import static com.simibubi.create.AllBlockPartials.GIRDER_SEGMENT_MIDDLE; -import static com.simibubi.create.AllBlockPartials.GIRDER_SEGMENT_TOP; -import static com.simibubi.create.AllBlockPartials.TRACK_SEGMENT_LEFT; -import static com.simibubi.create.AllBlockPartials.TRACK_SEGMENT_RIGHT; -import static com.simibubi.create.AllBlockPartials.TRACK_TIE; +import static com.simibubi.create.AllPartialModels.GIRDER_SEGMENT_BOTTOM; +import static com.simibubi.create.AllPartialModels.GIRDER_SEGMENT_MIDDLE; +import static com.simibubi.create.AllPartialModels.GIRDER_SEGMENT_TOP; +import static com.simibubi.create.AllPartialModels.TRACK_SEGMENT_LEFT; +import static com.simibubi.create.AllPartialModels.TRACK_SEGMENT_RIGHT; +import static com.simibubi.create.AllPartialModels.TRACK_TIE; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.util.transform.TransformStack; diff --git a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java index 9d3c838b6..f46fca1a2 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java +++ b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java @@ -73,7 +73,7 @@ public class ClientSchematicLoader { in = Files.newInputStream(path, StandardOpenOption.READ); activeUploads.put(schematic, in); - AllPackets.channel.sendToServer(SchematicUploadPacket.begin(schematic, size)); + AllPackets.getChannel().sendToServer(SchematicUploadPacket.begin(schematic, size)); } catch (IOException e) { e.printStackTrace(); } @@ -82,7 +82,7 @@ public class ClientSchematicLoader { public static boolean validateSizeLimitation(long size) { if (Minecraft.getInstance().hasSingleplayerServer()) return true; - Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get(); + Integer maxSize = AllConfigs.server().schematics.maxTotalSchematicSize.get(); if (size > maxSize * 1000) { LocalPlayer player = Minecraft.getInstance().player; if (player != null) { @@ -96,7 +96,7 @@ public class ClientSchematicLoader { private void continueUpload(String schematic) { if (activeUploads.containsKey(schematic)) { - Integer maxPacketSize = AllConfigs.SERVER.schematics.maxSchematicPacketSize.get(); + Integer maxPacketSize = AllConfigs.server().schematics.maxSchematicPacketSize.get(); byte[] data = new byte[maxPacketSize]; try { int status = activeUploads.get(schematic).read(data); @@ -105,7 +105,7 @@ public class ClientSchematicLoader { if (status < maxPacketSize) data = Arrays.copyOf(data, status); if (Minecraft.getInstance().level != null) - AllPackets.channel.sendToServer(SchematicUploadPacket.write(schematic, data)); + AllPackets.getChannel().sendToServer(SchematicUploadPacket.write(schematic, data)); else { activeUploads.remove(schematic); return; @@ -122,7 +122,7 @@ public class ClientSchematicLoader { private void finishUpload(String schematic) { if (activeUploads.containsKey(schematic)) { - AllPackets.channel.sendToServer(SchematicUploadPacket.finish(schematic)); + AllPackets.getChannel().sendToServer(SchematicUploadPacket.finish(schematic)); activeUploads.remove(schematic); } } diff --git a/src/main/java/com/simibubi/create/content/schematics/ServerSchematicLoader.java b/src/main/java/com/simibubi/create/content/schematics/ServerSchematicLoader.java index 575d1844c..bd42779aa 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ServerSchematicLoader.java +++ b/src/main/java/com/simibubi/create/content/schematics/ServerSchematicLoader.java @@ -175,7 +175,7 @@ public class ServerSchematicLoader { } public CSchematics getConfig() { - return AllConfigs.SERVER.schematics; + return AllConfigs.server().schematics; } public void handleWriteRequest(ServerPlayer player, String schematic, byte[] data) { diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonBlockEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonBlockEntity.java index cfcfb1307..adbe759a5 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonBlockEntity.java @@ -297,7 +297,7 @@ public class SchematicannonBlockEntity extends SmartBlockEntity implements MenuP } public CSchematics config() { - return AllConfigs.SERVER.schematics; + return AllConfigs.server().schematics; } protected void tickPrinter() { diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java index 198cc6e6c..81ee43e05 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java @@ -7,7 +7,7 @@ import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.core.Direction; @@ -22,8 +22,8 @@ public class SchematicannonInstance extends BlockEntityInstance mat = getTransformMaterial(); - connector = mat.getModel(AllBlockPartials.SCHEMATICANNON_CONNECTOR, blockState).createInstance(); - pipe = mat.getModel(AllBlockPartials.SCHEMATICANNON_PIPE, blockState).createInstance(); + connector = mat.getModel(AllPartialModels.SCHEMATICANNON_CONNECTOR, blockState).createInstance(); + pipe = mat.getModel(AllPartialModels.SCHEMATICANNON_PIPE, blockState).createInstance(); } @Override diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java index 7d87a8d30..421ab1766 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java @@ -7,8 +7,8 @@ import com.jozufozu.flywheel.core.virtual.VirtualEmptyModelData; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.schematics.block.LaunchedItem.ForBelt; import com.simibubi.create.content.schematics.block.LaunchedItem.ForBlockState; import com.simibubi.create.content.schematics.block.LaunchedItem.ForEntity; @@ -57,14 +57,14 @@ public class SchematicannonRenderer extends SafeBlockEntityRenderer (max * max)) { return; } diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/linked/LinkRenderer.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/linked/LinkRenderer.java index d796ac25d..e475a62f1 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/linked/LinkRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/linked/LinkRenderer.java @@ -68,7 +68,7 @@ public class LinkRenderer { return; Entity cameraEntity = Minecraft.getInstance().cameraEntity; - float max = AllConfigs.CLIENT.filterItemRenderDistance.getF(); + float max = AllConfigs.client().filterItemRenderDistance.getF(); if (!be.isVirtual() && cameraEntity != null && cameraEntity.position() .distanceToSqr(VecHelper.getCenterOf(be.getBlockPos())) > (max * max)) return; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollvalue/ScrollValueBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollvalue/ScrollValueBehaviour.java index 3c482bf83..a3d889487 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollvalue/ScrollValueBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollvalue/ScrollValueBehaviour.java @@ -90,7 +90,7 @@ public class ScrollValueBehaviour extends BlockEntityBehaviour { return; } - AllPackets.channel.sendToServer(new ScrollValueUpdatePacket(getPos(), scrollableValue)); + AllPackets.getChannel().sendToServer(new ScrollValueUpdatePacket(getPos(), scrollableValue)); ticksUntilScrollPacket = -1; } diff --git a/src/main/java/com/simibubi/create/foundation/command/CameraAngleCommand.java b/src/main/java/com/simibubi/create/foundation/command/CameraAngleCommand.java index c712c9825..bb4709c5c 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CameraAngleCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CameraAngleCommand.java @@ -53,7 +53,7 @@ public class CameraAngleCommand { String optionName = (yaw ? SConfigureConfigPacket.Actions.camAngleYawTarget : SConfigureConfigPacket.Actions.camAnglePitchTarget).name(); getPlayersFromContext(ctx).forEach(player -> { - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(optionName, String.valueOf(angleTarget)) ); @@ -67,7 +67,7 @@ public class CameraAngleCommand { AtomicInteger targets = new AtomicInteger(0); getPlayersFromContext(ctx).forEach(player -> { - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.camAngleFunction.name(), value) ); @@ -81,7 +81,7 @@ public class CameraAngleCommand { AtomicInteger targets = new AtomicInteger(0); getPlayersFromContext(ctx).forEach(player -> { - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.camAngleFunction.name(), value + ":" + speed) ); diff --git a/src/main/java/com/simibubi/create/foundation/command/CameraDistanceCommand.java b/src/main/java/com/simibubi/create/foundation/command/CameraDistanceCommand.java index 770a1f2ef..ebcc3a419 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CameraDistanceCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CameraDistanceCommand.java @@ -17,7 +17,7 @@ public class CameraDistanceCommand { .then(Commands.literal("reset") .executes(ctx -> { ServerPlayer player = ctx.getSource().getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.zoomMultiplier.name(), "1") ); @@ -28,7 +28,7 @@ public class CameraDistanceCommand { .executes(ctx -> { float multiplier = FloatArgumentType.getFloat(ctx, "multiplier"); ServerPlayer player = ctx.getSource().getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.zoomMultiplier.name(), String.valueOf(multiplier)) ); diff --git a/src/main/java/com/simibubi/create/foundation/command/ConfigCommand.java b/src/main/java/com/simibubi/create/foundation/command/ConfigCommand.java index bdbc0cfcd..4f25004ac 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ConfigCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ConfigCommand.java @@ -26,7 +26,7 @@ public class ConfigCommand { return Commands.literal("config") .executes(ctx -> { ServerPlayer player = ctx.getSource().getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.configScreen.name(), "") ); @@ -36,7 +36,7 @@ public class ConfigCommand { .then(Commands.argument("path", StringArgumentType.string()) .executes(ctx -> { ServerPlayer player = ctx.getSource().getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.configScreen.name(), StringArgumentType.getString(ctx, "path")) ); @@ -61,7 +61,7 @@ public class ConfigCommand { if (configPath.getType() == ModConfig.Type.CLIENT) { ServerPlayer player = ctx.getSource().getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket("SET" + path, value) ); diff --git a/src/main/java/com/simibubi/create/foundation/command/FabulousWarningCommand.java b/src/main/java/com/simibubi/create/foundation/command/FabulousWarningCommand.java index e2029155f..c5156e7f0 100644 --- a/src/main/java/com/simibubi/create/foundation/command/FabulousWarningCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/FabulousWarningCommand.java @@ -18,7 +18,7 @@ public class FabulousWarningCommand { ServerPlayer player = ctx.getSource() .getPlayerOrException(); - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.fabulousWarning.name(), "") ); diff --git a/src/main/java/com/simibubi/create/foundation/command/FixLightingCommand.java b/src/main/java/com/simibubi/create/foundation/command/FixLightingCommand.java index 326fe3a71..017e612de 100644 --- a/src/main/java/com/simibubi/create/foundation/command/FixLightingCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/FixLightingCommand.java @@ -15,7 +15,7 @@ public class FixLightingCommand { return Commands.literal("fixLighting") .requires(cs -> cs.hasPermission(0)) .executes(ctx -> { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource() + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource() .getEntity()), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.fixLighting.name(), String.valueOf(true))); diff --git a/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java b/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java index a2ec64ead..739bef09c 100644 --- a/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java @@ -35,7 +35,7 @@ public class HighlightCommand { BlockPos pos = BlockPosArgument.getLoadedBlockPos(ctx, "pos"); for (ServerPlayer p : players) { - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> p), new HighlightPacket(pos)); + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> p), new HighlightPacket(pos)); } return players.size(); @@ -44,7 +44,7 @@ public class HighlightCommand { .executes(ctx -> { BlockPos pos = BlockPosArgument.getLoadedBlockPos(ctx, "pos"); - AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource() + AllPackets.getChannel().send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource() .getEntity()), new HighlightPacket(pos)); return Command.SINGLE_SUCCESS; diff --git a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java index e17be1cf2..18a53bf81 100644 --- a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java @@ -21,7 +21,7 @@ public class OverlayConfigCommand { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> SConfigureConfigPacket.Actions.overlayReset.performAction("")); DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource().getEntity()), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.overlayReset.name(), ""))); @@ -35,7 +35,7 @@ public class OverlayConfigCommand { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> SConfigureConfigPacket.Actions.overlayScreen.performAction("")); DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> (ServerPlayer) ctx.getSource().getEntity()), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.overlayScreen.name(), ""))); diff --git a/src/main/java/com/simibubi/create/foundation/command/PonderCommand.java b/src/main/java/com/simibubi/create/foundation/command/PonderCommand.java index 94ae2bc4c..8863a08e6 100644 --- a/src/main/java/com/simibubi/create/foundation/command/PonderCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/PonderCommand.java @@ -47,7 +47,7 @@ public class PonderCommand { if (player instanceof FakePlayer) continue; - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.openPonder.name(), sceneId)); } diff --git a/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java b/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java index 338013898..92791c035 100644 --- a/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java +++ b/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java @@ -166,21 +166,21 @@ public class SConfigureConfigPacket extends SimplePacketBase { if (value.equals("info")) { Component text = Components.literal("Rainbow Debug Utility is currently: ") - .append(boolToText(AllConfigs.CLIENT.rainbowDebug.get())); + .append(boolToText(AllConfigs.client().rainbowDebug.get())); player.displayClientMessage(text, false); return; } - AllConfigs.CLIENT.rainbowDebug.set(Boolean.parseBoolean(value)); - Component text = boolToText(AllConfigs.CLIENT.rainbowDebug.get()) + AllConfigs.client().rainbowDebug.set(Boolean.parseBoolean(value)); + Component text = boolToText(AllConfigs.client().rainbowDebug.get()) .append(Components.literal(" Rainbow Debug Utility").withStyle(ChatFormatting.WHITE)); player.displayClientMessage(text, false); } @OnlyIn(Dist.CLIENT) private static void overlayReset(String value) { - AllConfigs.CLIENT.overlayOffsetX.set(0); - AllConfigs.CLIENT.overlayOffsetY.set(0); + AllConfigs.client().overlayOffsetX.set(0); + AllConfigs.client().overlayOffsetY.set(0); } @OnlyIn(Dist.CLIENT) @@ -213,7 +213,7 @@ public class SConfigureConfigPacket extends SimplePacketBase { @OnlyIn(Dist.CLIENT) private static void fabulousWarning(String value) { - AllConfigs.CLIENT.ignoreFabulousWarning.set(true); + AllConfigs.client().ignoreFabulousWarning.set(true); LocalPlayer player = Minecraft.getInstance().player; if (player != null) { player.displayClientMessage( diff --git a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java index fbd7b3ffa..ea30262f9 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java @@ -13,7 +13,7 @@ public class ToggleDebugCommand extends ConfigureConfigCommand { @Override protected void sendPacket(ServerPlayer player, String option) { - AllPackets.channel.send( + AllPackets.getChannel().send( PacketDistributor.PLAYER.with(() -> player), new SConfigureConfigPacket(SConfigureConfigPacket.Actions.rainbowDebug.name(), option) ); diff --git a/src/main/java/com/simibubi/create/foundation/config/AllConfigs.java b/src/main/java/com/simibubi/create/foundation/config/AllConfigs.java index 756383840..414d9b7ac 100644 --- a/src/main/java/com/simibubi/create/foundation/config/AllConfigs.java +++ b/src/main/java/com/simibubi/create/foundation/config/AllConfigs.java @@ -21,9 +21,21 @@ public class AllConfigs { private static final Map CONFIGS = new EnumMap<>(ModConfig.Type.class); - public static CClient CLIENT; - public static CCommon COMMON; - public static CServer SERVER; + private static CClient client; + private static CCommon common; + private static CServer server; + + public static CClient client() { + return client; + } + + public static CCommon common() { + return common; + } + + public static CServer server() { + return server; + } public static ConfigBase byType(ModConfig.Type type) { return CONFIGS.get(type); @@ -43,14 +55,14 @@ public class AllConfigs { } public static void register(ModLoadingContext context) { - CLIENT = register(CClient::new, ModConfig.Type.CLIENT); - COMMON = register(CCommon::new, ModConfig.Type.COMMON); - SERVER = register(CServer::new, ModConfig.Type.SERVER); + client = register(CClient::new, ModConfig.Type.CLIENT); + common = register(CCommon::new, ModConfig.Type.COMMON); + server = register(CServer::new, ModConfig.Type.SERVER); for (Entry pair : CONFIGS.entrySet()) context.registerConfig(pair.getKey(), pair.getValue().specification); - BlockStressValues.registerProvider(context.getActiveNamespace(), SERVER.kinetics.stressValues); + BlockStressValues.registerProvider(context.getActiveNamespace(), server().kinetics.stressValues); } @SubscribeEvent diff --git a/src/main/java/com/simibubi/create/foundation/config/ContraptionMovementSetting.java b/src/main/java/com/simibubi/create/foundation/config/ContraptionMovementSetting.java index 017df144f..f0a6ec1d8 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ContraptionMovementSetting.java +++ b/src/main/java/com/simibubi/create/foundation/config/ContraptionMovementSetting.java @@ -46,11 +46,11 @@ public enum ContraptionMovementSetting { } public static void registerDefaults() { - register(Blocks.SPAWNER, () -> AllConfigs.SERVER.kinetics.spawnerMovement.get()); - register(Blocks.BUDDING_AMETHYST, () -> AllConfigs.SERVER.kinetics.amethystMovement.get()); - register(Blocks.OBSIDIAN, () -> AllConfigs.SERVER.kinetics.obsidianMovement.get()); - register(Blocks.CRYING_OBSIDIAN, () -> AllConfigs.SERVER.kinetics.obsidianMovement.get()); - register(Blocks.RESPAWN_ANCHOR, () -> AllConfigs.SERVER.kinetics.obsidianMovement.get()); + register(Blocks.SPAWNER, () -> AllConfigs.server().kinetics.spawnerMovement.get()); + register(Blocks.BUDDING_AMETHYST, () -> AllConfigs.server().kinetics.amethystMovement.get()); + register(Blocks.OBSIDIAN, () -> AllConfigs.server().kinetics.obsidianMovement.get()); + register(Blocks.CRYING_OBSIDIAN, () -> AllConfigs.server().kinetics.obsidianMovement.get()); + register(Blocks.RESPAWN_ANCHOR, () -> AllConfigs.server().kinetics.obsidianMovement.get()); } public interface IMovementSettingProvider extends IForgeBlock { diff --git a/src/main/java/com/simibubi/create/foundation/config/ui/BaseConfigScreen.java b/src/main/java/com/simibubi/create/foundation/config/ui/BaseConfigScreen.java index c4ca833bc..4237e4d63 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ui/BaseConfigScreen.java +++ b/src/main/java/com/simibubi/create/foundation/config/ui/BaseConfigScreen.java @@ -36,7 +36,7 @@ public class BaseConfigScreen extends ConfigScreen { static { DEFAULTS.put(Create.ID, (base) -> base .withTitles("Client Settings", "World Generation Settings", "Gameplay Settings") - .withSpecs(AllConfigs.CLIENT.specification, AllConfigs.COMMON.specification, AllConfigs.SERVER.specification) + .withSpecs(AllConfigs.client().specification, AllConfigs.common().specification, AllConfigs.server().specification) ); } diff --git a/src/main/java/com/simibubi/create/foundation/config/ui/OpenCreateMenuButton.java b/src/main/java/com/simibubi/create/foundation/config/ui/OpenCreateMenuButton.java index 16b242fd7..5aadd2a26 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ui/OpenCreateMenuButton.java +++ b/src/main/java/com/simibubi/create/foundation/config/ui/OpenCreateMenuButton.java @@ -90,12 +90,12 @@ public class OpenCreateMenuButton extends Button { int rowIdx = 0, offsetX = 0; if (gui instanceof TitleScreen) { menu = MenuRows.MAIN_MENU; - rowIdx = AllConfigs.CLIENT.mainMenuConfigButtonRow.get(); - offsetX = AllConfigs.CLIENT.mainMenuConfigButtonOffsetX.get(); + rowIdx = AllConfigs.client().mainMenuConfigButtonRow.get(); + offsetX = AllConfigs.client().mainMenuConfigButtonOffsetX.get(); } else if (gui instanceof PauseScreen) { menu = MenuRows.INGAME_MENU; - rowIdx = AllConfigs.CLIENT.ingameMenuConfigButtonRow.get(); - offsetX = AllConfigs.CLIENT.ingameMenuConfigButtonOffsetX.get(); + rowIdx = AllConfigs.client().ingameMenuConfigButtonRow.get(); + offsetX = AllConfigs.client().ingameMenuConfigButtonOffsetX.get(); } if (rowIdx != 0 && menu != null) { diff --git a/src/main/java/com/simibubi/create/foundation/config/ui/SubMenuConfigScreen.java b/src/main/java/com/simibubi/create/foundation/config/ui/SubMenuConfigScreen.java index 854ce8eef..93256181d 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ui/SubMenuConfigScreen.java +++ b/src/main/java/com/simibubi/create/foundation/config/ui/SubMenuConfigScreen.java @@ -132,7 +132,7 @@ public class SubMenuConfigScreen extends ConfigScreen { configValue.set(change.value); if (type == ModConfig.Type.SERVER) { - AllPackets.channel.sendToServer(new CConfigureConfigPacket<>(ConfigScreen.modID, path, change.value)); + AllPackets.getChannel().sendToServer(new CConfigureConfigPacket<>(ConfigScreen.modID, path, change.value)); } String command = change.annotations.get("Execute"); diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/LogStrippingFakeRecipes.java b/src/main/java/com/simibubi/create/foundation/data/recipe/LogStrippingFakeRecipes.java index 4dbb1fdc0..73ec671ce 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/LogStrippingFakeRecipes.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/LogStrippingFakeRecipes.java @@ -29,7 +29,7 @@ public class LogStrippingFakeRecipes { public static List createRecipes() { List recipes = new ArrayList<>(); - if (!AllConfigs.SERVER.recipes.displayLogStrippingRecipes.get()) + if (!AllConfigs.server().recipes.displayLogStrippingRecipes.get()) return recipes; ItemStack axe = new ItemStack(Items.IRON_AXE); diff --git a/src/main/java/com/simibubi/create/foundation/gui/menu/IClearableMenu.java b/src/main/java/com/simibubi/create/foundation/gui/menu/IClearableMenu.java index 0ad1b6991..2c49e915c 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/menu/IClearableMenu.java +++ b/src/main/java/com/simibubi/create/foundation/gui/menu/IClearableMenu.java @@ -5,7 +5,7 @@ import com.simibubi.create.foundation.networking.AllPackets; public interface IClearableMenu { default void sendClearPacket() { - AllPackets.channel.sendToServer(new ClearMenuPacket()); + AllPackets.getChannel().sendToServer(new ClearMenuPacket()); } public void clearContents(); diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java index b2a454fb8..d7627bcd5 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java @@ -148,7 +148,7 @@ public class ItemHelper { } public static ItemStack extract(IItemHandler inv, Predicate test, boolean simulate) { - return extract(inv, test, ExtractionCountMode.UPTO, AllConfigs.SERVER.logistics.defaultExtractionLimit.get(), + return extract(inv, test, ExtractionCountMode.UPTO, AllConfigs.server().logistics.defaultExtractionLimit.get(), simulate); } @@ -224,7 +224,7 @@ public class ItemHelper { public static ItemStack extract(IItemHandler inv, Predicate test, Function amountFunction, boolean simulate) { ItemStack extracting = ItemStack.EMPTY; - int maxExtractionCount = AllConfigs.SERVER.logistics.defaultExtractionLimit.get(); + int maxExtractionCount = AllConfigs.server().logistics.defaultExtractionLimit.get(); for (int slot = 0; slot < inv.getSlots(); slot++) { if (extracting.isEmpty()) { diff --git a/src/main/java/com/simibubi/create/foundation/item/KineticStats.java b/src/main/java/com/simibubi/create/foundation/item/KineticStats.java index 7c1862215..a0a3bd2b2 100644 --- a/src/main/java/com/simibubi/create/foundation/item/KineticStats.java +++ b/src/main/java/com/simibubi/create/foundation/item/KineticStats.java @@ -58,7 +58,7 @@ public class KineticStats implements TooltipModifier { public static List getKineticStats(Block block, Player player) { List list = new ArrayList<>(); - CKinetics config = AllConfigs.SERVER.kinetics; + CKinetics config = AllConfigs.server().kinetics; LangBuilder rpmUnit = Lang.translate("generic.unit.rpm"); LangBuilder suUnit = Lang.translate("generic.unit.stress"); diff --git a/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItems.java b/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItems.java index 0c7052ec8..6e27a8e58 100644 --- a/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItems.java +++ b/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItems.java @@ -16,8 +16,7 @@ public class CustomRenderedItems { /** * Track an item that uses a subclass of {@link CustomRenderedItemModelRenderer} as its custom renderer - * to automatically register {@link #createModel} to {@link CustomRenderedItems} on client setup so that - * its model can be swapped. + * to automatically wrap its model with {@link CustomRenderedItemModel}. * @param item The item that should have its model swapped. */ public static void register(Item item) { diff --git a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java index 14aee148a..fc83111b0 100644 --- a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java +++ b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java @@ -202,7 +202,7 @@ public enum AllPackets { public static final ResourceLocation CHANNEL_NAME = Create.asResource("main"); public static final int NETWORK_VERSION = 2; public static final String NETWORK_VERSION_STR = String.valueOf(NETWORK_VERSION); - public static SimpleChannel channel; + private static SimpleChannel channel; private LoadedPacket packet; @@ -221,8 +221,12 @@ public enum AllPackets { packet.packet.register(); } + public static SimpleChannel getChannel() { + return channel; + } + public static void sendToNear(Level world, BlockPos pos, int range, Object message) { - channel.send( + getChannel().send( PacketDistributor.NEAR.with(TargetPoint.p(pos.getX(), pos.getY(), pos.getZ(), range, world.dimension())), message); } @@ -245,7 +249,7 @@ public enum AllPackets { } private void register() { - channel.messageBuilder(type, index++, direction) + getChannel().messageBuilder(type, index++, direction) .encoder(encoder) .decoder(decoder) .consumer(handler) diff --git a/src/main/java/com/simibubi/create/foundation/networking/ISyncPersistentData.java b/src/main/java/com/simibubi/create/foundation/networking/ISyncPersistentData.java index 797e88028..d822b0a2d 100644 --- a/src/main/java/com/simibubi/create/foundation/networking/ISyncPersistentData.java +++ b/src/main/java/com/simibubi/create/foundation/networking/ISyncPersistentData.java @@ -15,7 +15,7 @@ public interface ISyncPersistentData { void onPersistentDataUpdated(); default void syncPersistentDataWithTracking(Entity self) { - AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> self), new PersistentDataPacket(self)); + AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> self), new PersistentDataPacket(self)); } public static class PersistentDataPacket extends SimplePacketBase { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java index fec11c123..b7a59c32c 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java @@ -345,7 +345,7 @@ public class PonderIndex { } public static boolean editingModeActive() { - return AllConfigs.CLIENT.editingMode.get(); + return AllConfigs.client().editingMode.get(); } public static void registerTags() { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java index 4285a8965..1b4b34e75 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java @@ -1024,11 +1024,11 @@ public class PonderUI extends NavigatableSimiScreen { } public boolean isComfyReadingEnabled() { - return AllConfigs.CLIENT.comfyReading.get(); + return AllConfigs.client().comfyReading.get(); } public void setComfyReadingEnabled(boolean slowTextMode) { - AllConfigs.CLIENT.comfyReading.set(slowTextMode); + AllConfigs.client().comfyReading.set(slowTextMode); } } diff --git a/src/main/java/com/simibubi/create/foundation/render/BlockEntityRenderHelper.java b/src/main/java/com/simibubi/create/foundation/render/BlockEntityRenderHelper.java index e3765289e..c69446b11 100644 --- a/src/main/java/com/simibubi/create/foundation/render/BlockEntityRenderHelper.java +++ b/src/main/java/com/simibubi/create/foundation/render/BlockEntityRenderHelper.java @@ -81,7 +81,7 @@ public class BlockEntityRenderHelper { String message = "BlockEntity " + RegisteredObjects.getKeyOrThrow(blockEntity.getType()) .toString() + " could not be rendered virtually."; - if (AllConfigs.CLIENT.explainRenderErrors.get()) + if (AllConfigs.client().explainRenderErrors.get()) Create.LOGGER.error(message, e); else Create.LOGGER.error(message); diff --git a/src/main/java/com/simibubi/create/foundation/sound/SoundScape.java b/src/main/java/com/simibubi/create/foundation/sound/SoundScape.java index 2c7b8efb2..a67c323d7 100644 --- a/src/main/java/com/simibubi/create/foundation/sound/SoundScape.java +++ b/src/main/java/com/simibubi/create/foundation/sound/SoundScape.java @@ -90,7 +90,7 @@ class SoundScape { distanceMultiplier = (float) Mth.lerp(distanceTo / SoundScapes.MAX_AMBIENT_SOURCE_DISTANCE, 2, 0); } int soundCount = SoundScapes.getSoundCount(group, pitchGroup); - float max = AllConfigs.CLIENT.ambientVolumeCap.getF(); + float max = AllConfigs.client().ambientVolumeCap.getF(); float argMax = (float) SoundScapes.SOUND_VOLUME_ARG_MAX; return Mth.clamp(soundCount / (argMax * 10f), 0.025f, max) * distanceMultiplier; } diff --git a/src/main/java/com/simibubi/create/foundation/sound/SoundScapes.java b/src/main/java/com/simibubi/create/foundation/sound/SoundScapes.java index d3025d397..1e9a75221 100644 --- a/src/main/java/com/simibubi/create/foundation/sound/SoundScapes.java +++ b/src/main/java/com/simibubi/create/foundation/sound/SoundScapes.java @@ -74,7 +74,7 @@ public class SoundScapes { private static Map, SoundScape> activeSounds = new HashMap<>(); public static void play(AmbienceGroup group, BlockPos pos, float pitch) { - if (!AllConfigs.CLIENT.enableAmbientSounds.get()) + if (!AllConfigs.client().enableAmbientSounds.get()) return; if (!outOfRange(pos)) addSound(group, pos, pitch); @@ -87,7 +87,7 @@ public class SoundScapes { if (AnimationTickHolder.getTicks() % UPDATE_INTERVAL != 0) return; - boolean disable = !AllConfigs.CLIENT.enableAmbientSounds.get(); + boolean disable = !AllConfigs.client().enableAmbientSounds.get(); for (Iterator, SoundScape>> iterator = activeSounds.entrySet() .iterator(); iterator.hasNext();) { diff --git a/src/main/java/com/simibubi/create/foundation/utility/ContraptionData.java b/src/main/java/com/simibubi/create/foundation/utility/ContraptionData.java index 083cb4eae..dd63e44de 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ContraptionData.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ContraptionData.java @@ -30,7 +30,7 @@ public class ContraptionData { * @return true if the given NBT is too large for a contraption to be synced to clients. */ public static boolean isTooLargeForSync(CompoundTag data) { - int max = AllConfigs.SERVER.kinetics.maxDataSize.get(); + int max = AllConfigs.server().kinetics.maxDataSize.get(); return max != 0 && packetSize(data) > max; } diff --git a/src/main/java/com/simibubi/create/foundation/utility/ServerSpeedProvider.java b/src/main/java/com/simibubi/create/foundation/utility/ServerSpeedProvider.java index 3ec6c4619..e5f9c88a9 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ServerSpeedProvider.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ServerSpeedProvider.java @@ -25,7 +25,7 @@ public class ServerSpeedProvider { public static void serverTick() { serverTimer++; if (serverTimer > getSyncInterval()) { - AllPackets.channel.send(PacketDistributor.ALL.noArg(), new Packet()); + AllPackets.getChannel().send(PacketDistributor.ALL.noArg(), new Packet()); serverTimer = 0; } } @@ -42,7 +42,7 @@ public class ServerSpeedProvider { } public static Integer getSyncInterval() { - return AllConfigs.SERVER.tickrateSyncTimer.get(); + return AllConfigs.server().tickrateSyncTimer.get(); } public static float get() { diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java index e3427f52c..093f274ca 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java @@ -207,7 +207,7 @@ public class PlacementHelpers { float length = 10; - CClient.PlacementIndicatorSetting mode = AllConfigs.CLIENT.placementIndicator.get(); + CClient.PlacementIndicatorSetting mode = AllConfigs.client().placementIndicator.get(); if (mode == CClient.PlacementIndicatorSetting.TRIANGLE) fadedArrow(ms, centerX, centerY, r, g, b, a, length, snappedAngle); else if (mode == CClient.PlacementIndicatorSetting.TEXTURE) @@ -225,7 +225,7 @@ public class PlacementHelpers { ms.translate(centerX, centerY, 5); ms.mulPose(Vector3f.ZP.rotationDegrees(angle.getValue(0))); // RenderSystem.rotatef(snappedAngle, 0, 0, 1); - double scale = AllConfigs.CLIENT.indicatorScale.get(); + double scale = AllConfigs.client().indicatorScale.get(); ms.scale((float) scale, (float) scale, 1); Tesselator tessellator = Tesselator.getInstance(); @@ -278,7 +278,7 @@ public class PlacementHelpers { ms.pushPose(); ms.translate(centerX, centerY, 50); - float scale = AllConfigs.CLIENT.indicatorScale.get() + float scale = AllConfigs.client().indicatorScale.get() .floatValue() * .75f; ms.scale(scale, scale, 1); ms.scale(12, 12, 1); diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java b/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java index dade69a27..458eb7952 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java @@ -61,7 +61,7 @@ public abstract class PoleHelper> implements IPlacementH public PlacementOffset getOffset(Player player, Level world, BlockState state, BlockPos pos, BlockHitResult ray) { List directions = IPlacementHelper.orderedByDistance(pos, ray.getLocation(), dir -> dir.getAxis() == axisFunction.apply(state)); for (Direction dir : directions) { - int range = AllConfigs.SERVER.curiosities.placementAssistRange.get(); + int range = AllConfigs.server().curiosities.placementAssistRange.get(); if (player != null) { AttributeInstance reach = player.getAttribute(ForgeMod.REACH_DISTANCE.get()); if (reach != null && reach.hasModifier(ExtendoGripItem.singleRangeAttributeModifier)) diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenPlacement.java b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenPlacement.java index 858f53930..2f5d3e300 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenPlacement.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenPlacement.java @@ -64,7 +64,7 @@ public class ConfigDrivenPlacement extends PlacementModifier { } public float getFrequency() { - if (AllConfigs.COMMON.worldGen.disable.get()) + if (AllConfigs.common().worldGen.disable.get()) return 0; return entry.frequency.getF(); }