From 1fdf1ff7e91d39152a24a00fe6427dcd3ad77a7f Mon Sep 17 00:00:00 2001 From: PepperBell <44146161+PepperCode1@users.noreply.github.com> Date: Sat, 27 Nov 2021 14:49:43 -0800 Subject: [PATCH] Destroyed and deprecated - Fix rotation indicator particles - Fix sail dyeing - Turn BreakProgressHook into DestroyProgressRenderingHandler interface - Refactor overlay rendering to properly use API - Change SpriteShiftEntry to use StitchedSprites - Use OnDatapackSyncEvent instead of mixin - Organize foundation.ponder package - Remove usage of deprecated: - Durability bar methods - Constants class --- build.gradle | 2 +- gradle.properties | 2 +- .../com/simibubi/create/AllSoundEvents.java | 21 +-- .../simibubi/create/AllStitchedTextures.java | 5 +- .../com/simibubi/create/CreateClient.java | 21 ++- .../base/ShaftlessCogInstance.java | 1 - .../actors/HarvesterActorInstance.java | 2 - .../crafter/ConnectedInputHandler.java | 4 +- .../crafter/MechanicalCrafterInstance.java | 1 - .../components/crafter/RecipeGridHandler.java | 4 +- .../deployer/DeployerMovementBehaviour.java | 4 +- .../deployer/DeployerMovingInteraction.java | 4 +- .../deployer/DeployerTileEntity.java | 6 +- .../flywheel/engine/EngineInstance.java | 2 - .../press/MechanicalPressTileEntity.java | 4 +- .../components/saw/SawRenderer.java | 1 - .../structureMovement/Contraption.java | 75 ++++---- .../structureMovement/ContraptionHandler.java | 4 +- .../structureMovement/MovementContext.java | 8 +- .../structureMovement/bearing/SailBlock.java | 2 +- .../chassis/StickerInstance.java | 2 - .../gantry/GantryCarriageInstance.java | 2 - .../train/capability/MinecartController.java | 6 +- .../contraptions/fluids/PipeConnection.java | 4 +- .../contraptions/fluids/PumpRenderer.java | 1 - .../fluids/actors/ItemDrainRenderer.java | 1 - .../fluids/pipes/FluidValveInstance.java | 2 - .../fluids/pipes/FluidValveRenderer.java | 1 - .../goggles/GoggleOverlayRenderer.java | 23 ++- .../itemAssembly/SequencedAssemblyItem.java | 33 ++-- .../particle/RotationIndicatorParticle.java | 6 +- .../RotationIndicatorParticleData.java | 2 +- .../processing/BasinTileEntity.java | 12 +- .../ConfigureSequencedGearshiftPacket.java | 4 +- .../SequencedGearshiftTileEntity.java | 4 +- .../contraptions/relays/belt/BeltBlock.java | 18 +- .../relays/belt/BeltInstance.java | 1 - .../contraptions/relays/belt/BeltSlicer.java | 7 +- .../relays/belt/transport/BeltInventory.java | 4 +- .../relays/gauge/GaugeInstance.java | 1 - .../curiosities/ChromaticCompoundItem.java | 28 ++- .../curiosities/armor/BackTankUtil.java | 60 +++--- .../armor/CopperBacktankArmorLayer.java | 21 +-- .../curiosities/armor/CopperBacktankItem.java | 21 +-- .../armor/CopperBacktankTileEntity.java | 4 +- .../symmetry/SymmetryWandItem.java | 3 +- .../toolbox/RadialToolboxMenu.java | 40 ++-- .../toolbox/ToolboxHandlerClient.java | 21 +-- .../curiosities/toolbox/ToolboxInventory.java | 4 +- .../tools/BlueprintOverlayRenderer.java | 31 ++-- .../curiosities/tools/ExtendoGripItem.java | 12 +- .../tools/ExtendoGripItemRenderer.java | 1 - .../curiosities/weapons/PotatoCannonItem.java | 12 +- .../curiosities/zapper/ZapperItem.java | 4 +- .../terrainzapper/WorldshaperScreen.java | 4 +- .../belts/tunnel/BeltTunnelRenderer.java | 1 - .../belts/tunnel/BeltTunnelTileEntity.java | 5 +- .../belts/tunnel/BrassTunnelTileEntity.java | 4 +- .../logistics/block/chute/ChuteRenderer.java | 1 - .../logistics/block/depot/DepotBehaviour.java | 4 +- .../block/depot/EjectorInstance.java | 2 - .../block/depot/EjectorTileEntity.java | 6 +- .../block/diodes/BrassDiodeInstance.java | 2 - .../block/funnel/FunnelRenderer.java | 1 - .../mechanicalArm/ArmPlacementPacket.java | 4 +- .../block/mechanicalArm/ArmRenderer.java | 1 - .../block/mechanicalArm/ArmTileEntity.java | 3 +- .../block/redstone/AnalogLeverInstance.java | 2 - .../block/redstone/NixieTubeTileEntity.java | 6 +- .../item/LecternControllerRenderer.java | 1 - .../item/LinkedControllerClientHandler.java | 20 +- .../item/LinkedControllerItemRenderer.java | 1 - .../item/filter/AttributeFilterContainer.java | 4 +- .../logistics/item/filter/FilterItem.java | 5 +- .../schematics/block/LaunchedItem.java | 4 +- .../schematics/client/SchematicHandler.java | 19 +- .../client/tools/ISchematicTool.java | 4 +- .../client/tools/PlacementToolBase.java | 6 +- .../client/tools/SchematicToolBase.java | 4 +- .../simibubi/create/events/ClientEvents.java | 32 ---- .../simibubi/create/events/CommonEvents.java | 15 +- .../foundation/block/BreakProgressHook.java | 22 --- .../DestroyProgressRenderingHandler.java | 16 ++ .../block/render/SpriteShiftEntry.java | 28 ++- .../block/render/SpriteShifter.java | 37 ---- .../command/SConfigureConfigPacket.java | 4 +- .../foundation/fluid/FluidRenderer.java | 1 - .../foundation/gui/CreateMainMenuScreen.java | 2 +- .../gui/CustomLightingSettings.java | 3 +- .../create/foundation/gui/ScreenOpener.java | 2 +- .../gui/element/GuiGameElement.java | 5 +- .../foundation/mixin/BreakProgressMixin.java | 27 --- .../mixin/DestroyProgressMixin.java | 36 ++++ .../mixin/HeavyBootsOnPlayerMixin.java | 4 +- .../foundation/mixin/PlayerListMixin.java | 25 --- .../foundation/networking/AllPackets.java | 10 +- .../create/foundation/ponder/ElementLink.java | 2 + .../ponder/{content => }/PonderChapter.java | 4 +- .../{content => }/PonderChapterRegistry.java | 3 +- .../foundation/ponder/PonderLocalization.java | 6 +- .../ponder/{content => }/PonderPalette.java | 2 +- .../ponder/PonderRegistrationHelper.java | 2 - .../foundation/ponder/PonderRegistry.java | 3 - .../create/foundation/ponder/PonderScene.java | 173 +++++++++++------- .../ponder/PonderStoryBoardEntry.java | 3 - .../ponder/{content => }/PonderTag.java | 4 +- .../{content => }/PonderTagRegistry.java | 2 +- .../ponder/PonderTooltipHandler.java | 2 + .../create/foundation/ponder/PonderWorld.java | 2 +- .../foundation/ponder/SceneBuilder.java | 88 ++++----- .../foundation/ponder/content/ArmScenes.java | 5 +- .../ponder/content/BearingScenes.java | 5 +- .../foundation/ponder/content/BeltScenes.java | 13 +- .../ponder/content/CartAssemblerScenes.java | 11 +- .../ponder/content/ChainDriveScenes.java | 7 +- .../ponder/content/ChassisScenes.java | 7 +- .../ponder/content/ChuteScenes.java | 7 +- .../ponder/content/CrafterScenes.java | 5 +- .../ponder/content/DebugScenes.java | 13 +- .../ponder/content/DeployerScenes.java | 11 +- .../ponder/content/EjectorScenes.java | 7 +- .../foundation/ponder/content/FanScenes.java | 15 +- .../ponder/content/FunnelScenes.java | 7 +- .../ponder/content/GantryScenes.java | 3 +- .../ponder/content/KineticsScenes.java | 7 +- .../ponder/content/MechanicalDrillScenes.java | 6 +- .../ponder/content/MechanicalSawScenes.java | 7 +- .../ponder/content/MovementActorScenes.java | 11 +- .../ponder/content/PistonScenes.java | 9 +- .../ponder/content/PonderIndex.java | 1 + .../ponder/content/ProcessingScenes.java | 11 +- .../ponder/content/PulleyScenes.java | 5 +- .../ponder/content/RedstoneScenes.java | 7 +- .../ponder/content/TunnelScenes.java | 5 +- .../ponder/content/fluid/DrainScenes.java | 4 +- .../fluid/FluidMovementActorScenes.java | 6 +- .../ponder/content/fluid/FluidTankScenes.java | 8 +- .../content/fluid/HosePulleyScenes.java | 4 +- .../ponder/content/fluid/PipeScenes.java | 6 +- .../ponder/content/fluid/PumpScenes.java | 6 +- .../ponder/content/fluid/SpoutScenes.java | 10 +- .../AnimatedOverlayElement.java | 4 +- .../AnimatedSceneElement.java | 2 +- .../BeltItemElement.java | 2 +- .../{elements => element}/EntityElement.java | 2 +- .../InputWindowElement.java | 6 +- .../MinecartElement.java | 2 +- .../OutlinerElement.java | 2 +- .../{elements => element}/ParrotElement.java | 4 +- .../ponder/{ => element}/PonderElement.java | 4 +- .../PonderOverlayElement.java | 5 +- .../PonderSceneElement.java | 3 +- .../TextWindowElement.java | 6 +- .../{elements => element}/TrackedElement.java | 2 +- .../WorldSectionElement.java | 2 +- .../AnimateElementInstruction.java | 4 +- .../AnimateMinecartInstruction.java | 4 +- .../AnimateParrotInstruction.java | 4 +- .../AnimateTileEntityInstruction.java | 2 +- .../AnimateWorldSectionInstruction.java | 4 +- .../ChaseAABBInstruction.java | 4 +- .../CreateMinecartInstruction.java | 4 +- .../CreateParrotInstruction.java | 4 +- .../DelayInstruction.java | 2 +- .../DisplayWorldSectionInstruction.java | 4 +- .../EmitParticlesInstruction.java | 2 +- .../FadeInOutInstruction.java | 2 +- .../FadeIntoSceneInstruction.java | 4 +- .../FadeOutOfSceneInstruction.java | 4 +- .../HideAllInstruction.java | 6 +- .../HighlightValueBoxInstruction.java | 4 +- .../KeyframeInstruction.java | 3 +- .../LineInstruction.java | 4 +- .../MarkAsFinishedInstruction.java | 3 +- .../MovePoiInstruction.java | 3 +- .../OutlineSelectionInstruction.java | 4 +- .../{ => instruction}/PonderInstruction.java | 4 +- .../ReplaceBlocksInstruction.java | 2 +- .../RotateSceneInstruction.java | 3 +- .../ShowInputInstruction.java | 4 +- .../TextInstruction.java | 6 +- .../TickingInstruction.java | 3 +- .../TileEntityDataInstruction.java | 2 +- .../WorldModifyInstruction.java | 5 +- .../foundation/ponder/ui/ChapterLabel.java | 2 +- .../{ => ui}/NavigatableSimiScreen.java | 4 +- .../foundation/ponder/ui/PonderButton.java | 2 +- .../{content => ui}/PonderIndexScreen.java | 8 +- .../ponder/{ => ui}/PonderProgressBar.java | 38 ++-- .../{content => ui}/PonderTagIndexScreen.java | 7 +- .../{content => ui}/PonderTagScreen.java | 9 +- .../foundation/ponder/{ => ui}/PonderUI.java | 40 ++-- .../foundation/render/SuperByteBuffer.java | 1 - .../filtering/SidedFilteringBehaviour.java | 4 +- .../fluid/SmartFluidTankBehaviour.java | 4 +- .../utility/AnimationTickHolder.java | 2 +- .../create/foundation/utility/NBTHelper.java | 3 +- .../foundation/utility/NBTProcessors.java | 9 +- .../create/foundation/utility/VecHelper.java | 1 - src/main/resources/META-INF/mods.toml | 2 +- src/main/resources/create.mixins.json | 5 +- 201 files changed, 849 insertions(+), 919 deletions(-) delete mode 100644 src/main/java/com/simibubi/create/foundation/block/BreakProgressHook.java create mode 100644 src/main/java/com/simibubi/create/foundation/block/render/DestroyProgressRenderingHandler.java delete mode 100644 src/main/java/com/simibubi/create/foundation/mixin/BreakProgressMixin.java create mode 100644 src/main/java/com/simibubi/create/foundation/mixin/DestroyProgressMixin.java delete mode 100644 src/main/java/com/simibubi/create/foundation/mixin/PlayerListMixin.java rename src/main/java/com/simibubi/create/foundation/ponder/{content => }/PonderChapter.java (88%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => }/PonderChapterRegistry.java (92%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => }/PonderPalette.java (90%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => }/PonderTag.java (96%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => }/PonderTagRegistry.java (98%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/AnimatedOverlayElement.java (87%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/AnimatedSceneElement.java (97%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/BeltItemElement.java (81%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/EntityElement.java (82%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/InputWindowElement.java (95%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/MinecartElement.java (98%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/OutlinerElement.java (94%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/ParrotElement.java (98%) rename src/main/java/com/simibubi/create/foundation/ponder/{ => element}/PonderElement.java (73%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/PonderOverlayElement.java (64%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/PonderSceneElement.java (84%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/TextWindowElement.java (95%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/TrackedElement.java (95%) rename src/main/java/com/simibubi/create/foundation/ponder/{elements => element}/WorldSectionElement.java (99%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/AnimateElementInstruction.java (91%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/AnimateMinecartInstruction.java (88%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/AnimateParrotInstruction.java (88%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/AnimateTileEntityInstruction.java (98%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/AnimateWorldSectionInstruction.java (89%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/ChaseAABBInstruction.java (81%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/CreateMinecartInstruction.java (74%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/CreateParrotInstruction.java (74%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/DelayInstruction.java (67%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/DisplayWorldSectionInstruction.java (92%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/EmitParticlesInstruction.java (96%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/FadeInOutInstruction.java (94%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/FadeIntoSceneInstruction.java (91%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/FadeOutOfSceneInstruction.java (89%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/HideAllInstruction.java (87%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/HighlightValueBoxInstruction.java (85%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/KeyframeInstruction.java (84%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/LineInstruction.java (81%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/MarkAsFinishedInstruction.java (74%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/MovePoiInstruction.java (75%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/OutlineSelectionInstruction.java (83%) rename src/main/java/com/simibubi/create/foundation/ponder/{ => instruction}/PonderInstruction.java (86%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/ReplaceBlocksInstruction.java (95%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/RotateSceneInstruction.java (88%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/ShowInputInstruction.java (81%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/TextInstruction.java (85%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/TickingInstruction.java (88%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/TileEntityDataInstruction.java (95%) rename src/main/java/com/simibubi/create/foundation/ponder/{instructions => instruction}/WorldModifyInstruction.java (77%) rename src/main/java/com/simibubi/create/foundation/ponder/{ => ui}/NavigatableSimiScreen.java (98%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => ui}/PonderIndexScreen.java (94%) rename src/main/java/com/simibubi/create/foundation/ponder/{ => ui}/PonderProgressBar.java (80%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => ui}/PonderTagIndexScreen.java (96%) rename src/main/java/com/simibubi/create/foundation/ponder/{content => ui}/PonderTagScreen.java (96%) rename src/main/java/com/simibubi/create/foundation/ponder/{ => ui}/PonderUI.java (95%) diff --git a/build.gradle b/build.gradle index 6df71f6b1..f85727944 100644 --- a/build.gradle +++ b/build.gradle @@ -166,7 +166,7 @@ jar { 'Specification-Vendor': 'simibubi', 'Specification-Version': '1', 'Implementation-Title': project.name, - 'Implementation-Version': '${version}', + 'Implementation-Version': "${version}", 'Implementation-Vendor': 'simibubi', 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), 'MixinConfigs': 'create.mixins.json' diff --git a/gradle.properties b/gradle.properties index 383fe0145..8d48f1e3f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon = false # mod version info mod_version = 0.4 minecraft_version = 1.17.1 -forge_version = 37.0.110 +forge_version = 37.0.126 # build dependency versions forgegradle_version = 5.1.+ diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index 354d3f5f8..2e598e113 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -326,8 +326,6 @@ public class AllSoundEvents { wrappedEvents = new ArrayList<>(); variants = new ArrayList<>(); this.id = id; - - variants.add(id); } public SoundEntryBuilder subtitle(String subtitle) { @@ -365,7 +363,7 @@ public class AllSoundEvents { public SoundEntry build() { SoundEntry entry = wrappedEvents.isEmpty() ? new CustomSoundEntry(id, variants, subtitle, category) - : new WrappedSoundEntry(id, variants, subtitle, wrappedEvents, category); + : new WrappedSoundEntry(id, subtitle, wrappedEvents, category); entries.put(entry.getId(), entry); return entry; } @@ -375,13 +373,11 @@ public class AllSoundEvents { public static abstract class SoundEntry { protected ResourceLocation id; - protected List variants; protected String subtitle; protected SoundSource category; - public SoundEntry(ResourceLocation id, List variants, String subtitle, SoundSource category) { + public SoundEntry(ResourceLocation id, String subtitle, SoundSource category) { this.id = id; - this.variants = variants; this.subtitle = subtitle; this.category = category; } @@ -402,10 +398,6 @@ public class AllSoundEvents { return id; } - public List getVariants() { - return variants; - } - public boolean hasSubtitle() { return subtitle != null; } @@ -462,9 +454,9 @@ public class AllSoundEvents { private List>> wrappedEvents; private List>> compiledEvents; - public WrappedSoundEntry(ResourceLocation id, List variants, String subtitle, List>> wrappedEvents, + public WrappedSoundEntry(ResourceLocation id, String subtitle, List>> wrappedEvents, SoundSource category) { - super(id, variants, subtitle, category); + super(id, subtitle, category); this.wrappedEvents = wrappedEvents; compiledEvents = Lists.newArrayList(); } @@ -535,10 +527,12 @@ public class AllSoundEvents { private static class CustomSoundEntry extends SoundEntry { + protected List variants; protected SoundEvent event; public CustomSoundEntry(ResourceLocation id, List variants, String subtitle, SoundSource category) { - super(id, variants, subtitle, category); + super(id, subtitle, category); + this.variants = variants; } @Override @@ -561,6 +555,7 @@ public class AllSoundEvents { JsonObject entry = new JsonObject(); JsonArray list = new JsonArray(); + list.add(id.toString()); for (ResourceLocation variant : variants) { list.add(variant.toString()); } diff --git a/src/main/java/com/simibubi/create/AllStitchedTextures.java b/src/main/java/com/simibubi/create/AllStitchedTextures.java index 5a1038dd4..5e8909404 100644 --- a/src/main/java/com/simibubi/create/AllStitchedTextures.java +++ b/src/main/java/com/simibubi/create/AllStitchedTextures.java @@ -2,13 +2,10 @@ package com.simibubi.create; import com.jozufozu.flywheel.core.StitchedSprite; -import net.minecraft.resources.ResourceLocation; - public class AllStitchedTextures { - public static final StitchedSprite SUPER_GLUE = new StitchedSprite(new ResourceLocation(Create.ID, "entity/super_glue/slime")); + public static final StitchedSprite SUPER_GLUE = new StitchedSprite(Create.asResource("entity/super_glue/slime")); public static void init() { - } } diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 199c0a44c..e0e0c7983 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -3,10 +3,15 @@ package com.simibubi.create; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.SBBContraptionManager; +import com.simibubi.create.content.contraptions.goggles.GoggleOverlayRenderer; import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity; +import com.simibubi.create.content.curiosities.armor.CopperBacktankArmorLayer; import com.simibubi.create.content.curiosities.bell.SoulPulseEffectHandler; +import com.simibubi.create.content.curiosities.toolbox.ToolboxHandlerClient; +import com.simibubi.create.content.curiosities.tools.BlueprintOverlayRenderer; import com.simibubi.create.content.curiosities.weapons.PotatoCannonRenderHandler; import com.simibubi.create.content.curiosities.zapper.ZapperRenderHandler; +import com.simibubi.create.content.logistics.item.LinkedControllerClientHandler; import com.simibubi.create.content.schematics.ClientSchematicLoader; import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler; import com.simibubi.create.content.schematics.client.SchematicHandler; @@ -14,7 +19,7 @@ import com.simibubi.create.foundation.ClientResourceReloadListener; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.ponder.content.PonderIndex; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.render.AllMaterialSpecs; import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CreateContexts; @@ -32,6 +37,8 @@ import net.minecraft.network.chat.ComponentUtils; import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.TextComponent; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.OverlayRegistry; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; @@ -82,9 +89,21 @@ public class CreateClient { PonderIndex.register(); PonderIndex.registerTags(); + registerOverlays(); + UIRenderHelper.init(); } + private static void registerOverlays() { + // Register overlays in reverse order + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.AIR_LEVEL_ELEMENT, "Create's Remaining Air", CopperBacktankArmorLayer.REMAINING_AIR_OVERLAY); + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.HOTBAR_ELEMENT, "Create's Toolboxes", ToolboxHandlerClient.OVERLAY); + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.HOTBAR_ELEMENT, "Create's Goggle Information", GoggleOverlayRenderer.OVERLAY); + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.HOTBAR_ELEMENT, "Create's Blueprints", BlueprintOverlayRenderer.OVERLAY); + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.HOTBAR_ELEMENT, "Create's Linked Controller", LinkedControllerClientHandler.OVERLAY); + OverlayRegistry.registerOverlayAbove(ForgeIngameGui.HOTBAR_ELEMENT, "Create's Schematics", SCHEMATIC_HANDLER.getOverlayRenderer()); + } + public static void invalidateRenderers() { BUFFER_CACHE.invalidate(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java index 0ab34da71..be7b4f7b9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java @@ -3,7 +3,6 @@ package com.simibubi.create.content.contraptions.base; import com.jozufozu.flywheel.backend.instancing.Instancer; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.PartialModel; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; 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 def0bf6e0..0ca0679cb 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 @@ -4,8 +4,6 @@ import com.jozufozu.flywheel.backend.material.Material; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ConnectedInputHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ConnectedInputHandler.java index b69e05b46..36a6c2d7c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ConnectedInputHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/ConnectedInputHandler.java @@ -24,10 +24,10 @@ import net.minecraft.core.Direction.AxisDirection; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemStackHandler; @@ -219,7 +219,7 @@ public class ConnectedInputHandler { public void read(CompoundTag nbt) { isController = nbt.getBoolean("Controller"); data.clear(); - nbt.getList("Data", NBT.TAG_COMPOUND) + nbt.getList("Data", Tag.TAG_COMPOUND) .forEach(inbt -> data.add(NbtUtils.readBlockPos((CompoundTag) inbt))); // nbt got wiped -> reset diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java index b2445d522..9a52923b1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java @@ -4,7 +4,6 @@ import java.util.function.Supplier; import com.jozufozu.flywheel.backend.instancing.Instancer; import com.jozufozu.flywheel.backend.material.MaterialManager; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java index 7a5f422ea..de7039299 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java @@ -24,6 +24,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; @@ -31,7 +32,6 @@ import net.minecraft.world.item.crafting.FireworkRocketRecipe; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.util.Constants.NBT; public class RecipeGridHandler { @@ -204,7 +204,7 @@ public class RecipeGridHandler { public static GroupedItems read(CompoundTag nbt) { GroupedItems items = new GroupedItems(); - ListTag gridNBT = nbt.getList("Grid", NBT.TAG_COMPOUND); + ListTag gridNBT = nbt.getList("Grid", Tag.TAG_COMPOUND); gridNBT.forEach(inbt -> { CompoundTag entry = (CompoundTag) inbt; int x = entry.getInt("x"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovementBehaviour.java index 65773a7f1..27321855d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovementBehaviour.java @@ -34,6 +34,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Inventory; @@ -43,7 +44,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.util.BlockSnapshot; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.items.IItemHandler; @@ -237,7 +237,7 @@ public class DeployerMovementBehaviour extends MovementBehaviour { private DeployerFakePlayer getPlayer(MovementContext context) { if (!(context.temporaryData instanceof DeployerFakePlayer) && context.world instanceof ServerLevel) { DeployerFakePlayer deployerFakePlayer = new DeployerFakePlayer((ServerLevel) context.world); - deployerFakePlayer.getInventory().load(context.tileData.getList("Inventory", NBT.TAG_COMPOUND)); + deployerFakePlayer.getInventory().load(context.tileData.getList("Inventory", Tag.TAG_COMPOUND)); if (context.data.contains("HeldItem")) deployerFakePlayer.setItemInHand(InteractionHand.MAIN_HAND, ItemStack.of(context.data.getCompound("HeldItem"))); context.tileData.remove("Inventory"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovingInteraction.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovingInteraction.java index fbe9d765a..401d77731 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovingInteraction.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerMovingInteraction.java @@ -9,12 +9,12 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Mov import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.core.BlockPos; +import net.minecraft.nbt.Tag; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo; -import net.minecraftforge.common.util.Constants; public class DeployerMovingInteraction extends MovingInteractionBehaviour { @@ -56,7 +56,7 @@ public class DeployerMovingInteraction extends MovingInteractionBehaviour { if (!(ctx.temporaryData instanceof DeployerFakePlayer) && ctx.world instanceof ServerLevel) { DeployerFakePlayer deployerFakePlayer = new DeployerFakePlayer((ServerLevel) ctx.world); deployerFakePlayer.getInventory() - .load(ctx.tileData.getList("Inventory", Constants.NBT.TAG_COMPOUND)); + .load(ctx.tileData.getList("Inventory", Tag.TAG_COMPOUND)); ctx.temporaryData = fake = deployerFakePlayer; ctx.tileData.remove("Inventory"); } else diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java index 18dafef07..a82e8188c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java @@ -29,6 +29,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -49,7 +50,6 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemStackHandler; @@ -315,8 +315,8 @@ public class DeployerTileEntity extends KineticTileEntity { timer = compound.getInt("Timer"); redstoneLocked = compound.getBoolean("Powered"); - deferredInventoryList = compound.getList("Inventory", NBT.TAG_COMPOUND); - overflowItems = NBTHelper.readItemList(compound.getList("Overflow", NBT.TAG_COMPOUND)); + deferredInventoryList = compound.getList("Inventory", Tag.TAG_COMPOUND); + overflowItems = NBTHelper.readItemList(compound.getList("Overflow", Tag.TAG_COMPOUND)); if (compound.contains("HeldItem")) heldItem = ItemStack.of(compound.getCompound("HeldItem")); super.fromTag(compound, clientPacket); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java index b35955579..c2ba83529 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java @@ -4,8 +4,6 @@ import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressTileEntity.java index 5bf7a0fcc..b17c56f8e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/MechanicalPressTileEntity.java @@ -30,6 +30,7 @@ import net.minecraft.core.NonNullList; import net.minecraft.core.particles.ItemParticleOption; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.Container; @@ -45,7 +46,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.wrapper.RecipeWrapper; @@ -90,7 +90,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity { super.fromTag(compound, clientPacket); if (clientPacket) { - NBTHelper.iterateCompoundList(compound.getList("ParticleItems", NBT.TAG_COMPOUND), + NBTHelper.iterateCompoundList(compound.getList("ParticleItems", Tag.TAG_COMPOUND), c -> pressedItems.add(ItemStack.of(c))); spawnParticles(); } 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 71c7cf6dc..b911936c7 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 @@ -4,7 +4,6 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert import com.jozufozu.flywheel.backend.Backend; 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; 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 4e9d9eb9d..7a683be19 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 @@ -25,7 +25,6 @@ import javax.annotation.Nullable; import org.apache.commons.lang3.tuple.MutablePair; import org.apache.commons.lang3.tuple.Pair; -import com.jozufozu.flywheel.backend.IFlywheelWorld; import com.jozufozu.flywheel.light.GridAlignedBB; import com.jozufozu.flywheel.light.ImmutableBox; import com.simibubi.create.AllBlocks; @@ -69,7 +68,6 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTProcessors; import com.simibubi.create.foundation.utility.UniqueLinkedList; -import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -109,8 +107,6 @@ import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants.BlockFlags; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -705,30 +701,30 @@ public abstract class Contraption { }); superglue.clear(); - NBTHelper.iterateCompoundList(nbt.getList("Superglue", NBT.TAG_COMPOUND), c -> superglue.add( + NBTHelper.iterateCompoundList(nbt.getList("Superglue", Tag.TAG_COMPOUND), c -> superglue.add( Pair.of(NbtUtils.readBlockPos(c.getCompound("Pos")), Direction.from3DDataValue(c.getByte("Direction"))))); seats.clear(); - NBTHelper.iterateCompoundList(nbt.getList("Seats", NBT.TAG_COMPOUND), c -> seats.add(NbtUtils.readBlockPos(c))); + NBTHelper.iterateCompoundList(nbt.getList("Seats", Tag.TAG_COMPOUND), c -> seats.add(NbtUtils.readBlockPos(c))); seatMapping.clear(); - NBTHelper.iterateCompoundList(nbt.getList("Passengers", NBT.TAG_COMPOUND), + NBTHelper.iterateCompoundList(nbt.getList("Passengers", Tag.TAG_COMPOUND), c -> seatMapping.put(NbtUtils.loadUUID(NBTHelper.getINBT(c, "Id")), c.getInt("Seat"))); stabilizedSubContraptions.clear(); - NBTHelper.iterateCompoundList(nbt.getList("SubContraptions", NBT.TAG_COMPOUND), + NBTHelper.iterateCompoundList(nbt.getList("SubContraptions", Tag.TAG_COMPOUND), c -> stabilizedSubContraptions.put(c.getUUID("Id"), BlockFace.fromNBT(c.getCompound("Location")))); storage.clear(); - NBTHelper.iterateCompoundList(nbt.getList("Storage", NBT.TAG_COMPOUND), c -> storage + NBTHelper.iterateCompoundList(nbt.getList("Storage", Tag.TAG_COMPOUND), c -> storage .put(NbtUtils.readBlockPos(c.getCompound("Pos")), MountedStorage.deserialize(c.getCompound("Data")))); fluidStorage.clear(); - NBTHelper.iterateCompoundList(nbt.getList("FluidStorage", NBT.TAG_COMPOUND), c -> fluidStorage + NBTHelper.iterateCompoundList(nbt.getList("FluidStorage", Tag.TAG_COMPOUND), c -> fluidStorage .put(NbtUtils.readBlockPos(c.getCompound("Pos")), MountedFluidStorage.deserialize(c.getCompound("Data")))); interactors.clear(); - NBTHelper.iterateCompoundList(nbt.getList("Interactors", NBT.TAG_COMPOUND), c -> { + NBTHelper.iterateCompoundList(nbt.getList("Interactors", Tag.TAG_COMPOUND), c -> { BlockPos pos = NbtUtils.readBlockPos(c.getCompound("Pos")); MovingInteractionBehaviour behaviour = AllInteractionBehaviours.of(getBlocks().get(pos).state.getBlock()); if (behaviour != null) @@ -977,8 +973,8 @@ public abstract class Contraption { if (block.state.getBlock() != blockIn) iterator.remove(); world.removeBlockEntity(add); - int flags = BlockFlags.IS_MOVING | BlockFlags.NO_NEIGHBOR_DROPS | BlockFlags.UPDATE_NEIGHBORS - | BlockFlags.BLOCK_UPDATE | BlockFlags.RERENDER_MAIN_THREAD; + int flags = Block.UPDATE_MOVE_BY_PISTON | Block.UPDATE_SUPPRESS_DROPS | Block.UPDATE_KNOWN_SHAPE + | Block.UPDATE_CLIENTS | Block.UPDATE_IMMEDIATE; if (blockIn instanceof SimpleWaterloggedBlock && oldState.hasProperty(BlockStateProperties.WATERLOGGED) && oldState.getValue(BlockStateProperties.WATERLOGGED)) { world.setBlock(add, Blocks.WATER.defaultBlockState(), flags); @@ -993,7 +989,7 @@ public abstract class Contraption { // if (!shouldUpdateAfterMovement(block)) // continue; - int flags = BlockFlags.IS_MOVING | BlockFlags.DEFAULT; + int flags = Block.UPDATE_MOVE_BY_PISTON | Block.UPDATE_ALL; world.sendBlockUpdated(add, block.state, Blocks.AIR.defaultBlockState(), flags); // when the blockstate is set to air, the block's POI data is removed, but @@ -1053,7 +1049,7 @@ public abstract class Contraption { } world.destroyBlock(targetPos, true); - world.setBlock(targetPos, state, 3 | BlockFlags.IS_MOVING); + world.setBlock(targetPos, state, Block.UPDATE_MOVE_BY_PISTON | Block.UPDATE_ALL); boolean verticalRotation = transform.rotationAxis == null || transform.rotationAxis.isHorizontal(); verticalRotation = verticalRotation && transform.rotation != Rotation.NONE; @@ -1102,7 +1098,7 @@ public abstract class Contraption { continue; BlockPos targetPos = transform.apply(block.pos); world.markAndNotifyBlock(targetPos, world.getChunkAt(targetPos), block.state, block.state, - BlockFlags.IS_MOVING | BlockFlags.DEFAULT, 512); + Block.UPDATE_MOVE_BY_PISTON | Block.UPDATE_ALL, 512); } for (int i = 0; i < inventory.getSlots(); i++) { @@ -1301,29 +1297,30 @@ public abstract class Contraption { return maxDistSq; } - private static class ContraptionTileWorld extends WrappedWorld implements IFlywheelWorld { - - private final BlockEntity te; - private final StructureBlockInfo info; - - public ContraptionTileWorld(Level world, BlockEntity te, StructureBlockInfo info) { - super(world); - this.te = te; - this.info = info; - } - - @Override - public BlockState getBlockState(BlockPos pos) { - if (!pos.equals(te.getBlockPos())) - return Blocks.AIR.defaultBlockState(); - return info.state; - } - - @Override - public boolean isLoaded(BlockPos pos) { - return pos.equals(te.getBlockPos()); - } - } + // TODO: unused? +// private static class ContraptionTileWorld extends WrappedWorld implements IFlywheelWorld { +// +// private final BlockEntity te; +// private final StructureBlockInfo info; +// +// public ContraptionTileWorld(Level world, BlockEntity te, StructureBlockInfo info) { +// super(world); +// this.te = te; +// this.info = info; +// } +// +// @Override +// public BlockState getBlockState(BlockPos pos) { +// if (!pos.equals(te.getBlockPos())) +// return Blocks.AIR.defaultBlockState(); +// return info.state; +// } +// +// @Override +// public boolean isLoaded(BlockPos pos) { +// return pos.equals(te.getBlockPos()); +// } +// } public static class ContraptionInvWrapper extends CombinedInvWrapper { protected final boolean isExternal; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java index 8c27827dd..337d8ca34 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java @@ -13,11 +13,11 @@ import com.simibubi.create.foundation.utility.WorldAttached; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import it.unimi.dsi.fastutil.objects.ObjectLists; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; public class ContraptionHandler { @@ -63,7 +63,7 @@ public class ContraptionHandler { CompoundTag data = entityLiving.getPersistentData(); if (!data.contains("ContraptionDismountLocation")) return; - Vec3 position = VecHelper.readNBT(data.getList("ContraptionDismountLocation", NBT.TAG_DOUBLE)); + Vec3 position = VecHelper.readNBT(data.getList("ContraptionDismountLocation", Tag.TAG_DOUBLE)); if (entityLiving.getVehicle() == null) entityLiving.teleportTo(position.x, position.y, position.z); data.remove("ContraptionDismountLocation"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementContext.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementContext.java index a44c214c6..751044b5b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementContext.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementContext.java @@ -6,11 +6,11 @@ import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; public class MovementContext { @@ -58,10 +58,10 @@ public class MovementContext { public static MovementContext readNBT(Level world, StructureBlockInfo info, CompoundTag nbt, Contraption contraption) { MovementContext context = new MovementContext(world, info, contraption); - context.motion = VecHelper.readNBT(nbt.getList("Motion", NBT.TAG_DOUBLE)); - context.relativeMotion = VecHelper.readNBT(nbt.getList("RelativeMotion", NBT.TAG_DOUBLE)); + context.motion = VecHelper.readNBT(nbt.getList("Motion", Tag.TAG_DOUBLE)); + context.relativeMotion = VecHelper.readNBT(nbt.getList("RelativeMotion", Tag.TAG_DOUBLE)); if (nbt.contains("Position")) - context.position = VecHelper.readNBT(nbt.getList("Position", NBT.TAG_DOUBLE)); + context.position = VecHelper.readNBT(nbt.getList("Position", Tag.TAG_DOUBLE)); context.stall = nbt.getBoolean("Stall"); context.firstMovement = nbt.getBoolean("FirstMovement"); context.data = nbt.getCompound("Data"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java index 5e4313d8a..cbedf838e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java @@ -89,7 +89,7 @@ public class SailBlock extends WrenchableDirectionalBlock { return InteractionResult.PASS; DyeColor color = DyeColor.getColor(heldItem); - if (color != null && color != this.color) { + if (color != null) { if (!world.isClientSide) applyDye(state, world, pos, color); return InteractionResult.SUCCESS; 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 f6b6c2ecc..7f8cd4500 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,8 +4,6 @@ import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java index 866f7c3a6..d44f3a41a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java @@ -3,8 +3,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.ga import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; 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 3eb944707..1eb5503ee 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 @@ -23,6 +23,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.tags.BlockTags; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; @@ -32,7 +33,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.PoweredRailBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.fmllegacy.network.PacketDistributor; @@ -425,8 +425,8 @@ public class MinecartController implements INBTSerializable { static StallData read(CompoundTag nbt) { StallData stallData = new StallData(); - stallData.position = VecHelper.readNBT(nbt.getList("Pos", NBT.TAG_DOUBLE)); - stallData.motion = VecHelper.readNBT(nbt.getList("Motion", NBT.TAG_DOUBLE)); + stallData.position = VecHelper.readNBT(nbt.getList("Pos", Tag.TAG_DOUBLE)); + stallData.motion = VecHelper.readNBT(nbt.getList("Motion", Tag.TAG_DOUBLE)); stallData.yaw = nbt.getFloat("Yaw"); stallData.pitch = nbt.getFloat("Pitch"); return stallData; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java index 7f968c3f6..ecaebe13a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java @@ -20,6 +20,7 @@ import net.minecraft.core.particles.ParticleOptions; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.FloatTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Level; @@ -27,7 +28,6 @@ import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.DistExecutor; @@ -246,7 +246,7 @@ public class PipeConnection { CompoundTag connectionData = tag.getCompound(side.getName()); if (connectionData.contains("Pressure")) { - ListTag pressureData = connectionData.getList("Pressure", NBT.TAG_FLOAT); + ListTag pressureData = connectionData.getList("Pressure", Tag.TAG_FLOAT); pressure = Couple.create(pressureData.getFloat(0), pressureData.getFloat(1)); } else pressure.replace(f -> 0f); 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 aec578a74..fc5f40133 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 @@ -1,6 +1,5 @@ package com.simibubi.create.content.contraptions.fluids; -import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/ItemDrainRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/ItemDrainRenderer.java index 104f8146b..0b6c9e33f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/ItemDrainRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/ItemDrainRenderer.java @@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.fluids.actors; import java.util.Random; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Vector3f; 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 16531a84d..cc109c396 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,8 +4,6 @@ import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; 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 93cbd82c0..a83f0f4ef 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 @@ -1,7 +1,6 @@ package com.simibubi.create.content.contraptions.fluids.pipes; import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java index 7568eebf1..40a8ad53b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java @@ -27,7 +27,6 @@ import com.simibubi.create.foundation.utility.outliner.Outliner.OutlineEntry; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; @@ -40,18 +39,21 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; import net.minecraftforge.fmlclient.gui.GuiUtils; public class GoggleOverlayRenderer { + public static final IIngameOverlay OVERLAY = GoggleOverlayRenderer::renderOverlay; + private static final List> customGogglePredicates = new LinkedList<>(); private static final Map outlines = CreateClient.OUTLINER.getOutlines(); public static int hoverTicks = 0; public static BlockPos lastHovered = null; - public static void renderOverlay(PoseStack ms, MultiBufferSource buffer, int light, int overlay, - float partialTicks) { + public static void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) { HitResult objectMouseOver = Minecraft.getInstance().hitResult; if (!(objectMouseOver instanceof BlockHitResult)) { @@ -148,12 +150,9 @@ public class GoggleOverlayRenderer { if (tooltip.isEmpty()) return; - ms.pushPose(); + poseStack.pushPose(); Screen tooltipScreen = new TooltipScreen(new TextComponent("")); - tooltipScreen.init(mc, mc.getWindow() - .getGuiScaledWidth(), - mc.getWindow() - .getGuiScaledHeight()); + tooltipScreen.init(mc, width, height); int titleLinesCount = 1; int tooltipTextWidth = 0; @@ -190,20 +189,20 @@ public class GoggleOverlayRenderer { Theme.c(Theme.Key.VANILLA_TOOLTIP_BORDER, false).copy(); if (fade < 1) { - ms.translate((1 - fade) * Math.signum(cfg.overlayOffsetX.get() + .5f) * 4, 0, 0); + poseStack.translate((1 - fade) * Math.signum(cfg.overlayOffsetX.get() + .5f) * 4, 0, 0); colorBackground.scaleAlpha(fade); colorBorderTop.scaleAlpha(fade); colorBorderBot.scaleAlpha(fade); } - GuiUtils.drawHoveringText(ms, tooltip, posX, posY, tooltipScreen.width, tooltipScreen.height, -1, + GuiUtils.drawHoveringText(poseStack, tooltip, posX, posY, tooltipScreen.width, tooltipScreen.height, -1, colorBackground.getRGB(), colorBorderTop.getRGB(), colorBorderBot.getRGB(), mc.font); ItemStack item = AllItems.GOGGLES.asStack(); GuiGameElement.of(item) .at(posX + 10, posY - 16, 450) - .render(ms); - ms.popPose(); + .render(poseStack); + poseStack.popPose(); } /** diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java index c3cf65db6..4240b612c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java @@ -4,7 +4,6 @@ import com.simibubi.create.foundation.utility.Color; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; -import net.minecraft.util.Mth; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -15,28 +14,32 @@ public class SequencedAssemblyItem extends Item { super(p_i48487_1_.stacksTo(1)); } + public float getProgress(ItemStack stack) { + if (!stack.hasTag()) + return 0; + CompoundTag tag = stack.getTag(); + if (!tag.contains("SequencedAssembly")) + return 0; + return tag.getCompound("SequencedAssembly") + .getFloat("Progress"); + } + @Override public void fillItemCategory(CreativeModeTab p_150895_1_, NonNullList p_150895_2_) {} @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (!stack.hasTag()) - return 1; - CompoundTag tag = stack.getTag(); - if (!tag.contains("SequencedAssembly")) - return 1; - return Mth.lerp(tag.getCompound("SequencedAssembly") - .getFloat("Progress"), 1, 0); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { + public boolean isBarVisible(ItemStack stack) { return true; } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { - return Color.mixColors(0xFF_46FFE0, 0xFF_FFC074, (float) getDurabilityForDisplay(stack)); + public int getBarWidth(ItemStack stack) { + return Math.round(getProgress(stack) * 13); + } + + @Override + public int getBarColor(ItemStack stack) { + return Color.mixColors(0xFF_FFC074, 0xFF_46FFE0, getProgress(stack)); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java index 168050800..d4af3be6d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java +++ b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java @@ -72,9 +72,9 @@ public class RotationIndicatorParticle extends SimpleAnimatedParticle { if (speed < 0 && axis.isVertical()) angle += 180; Vec3 position = VecHelper.rotate(this.offset.scale(radius), angle, axis).add(origin); - x = position.x; - y = position.y; - z = position.z; + this.x = position.x; + this.y = position.y; + this.z = position.z; } public static class Factory implements ParticleProvider { diff --git a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticleData.java b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticleData.java index 636d67a0f..02502d5cd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticleData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticleData.java @@ -37,7 +37,7 @@ public class RotationIndicatorParticleData @Override public String toString() { - return "Bool"; + return "Char"; } }; diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java index 15e7bd7f8..0f39bcda5 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java @@ -43,6 +43,7 @@ import net.minecraft.core.particles.ParticleOptions; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.StringTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; import net.minecraft.world.item.ItemStack; @@ -52,7 +53,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; @@ -149,18 +149,18 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor if (compound.contains("PreferredSpoutput")) preferredSpoutput = NBTHelper.readEnum(compound, "PreferredSpoutput", Direction.class); disabledSpoutputs.clear(); - ListTag disabledList = compound.getList("DisabledSpoutput", NBT.TAG_STRING); + ListTag disabledList = compound.getList("DisabledSpoutput", Tag.TAG_STRING); disabledList.forEach(d -> disabledSpoutputs.add(Direction.valueOf(((StringTag) d).getAsString()))); - spoutputBuffer = NBTHelper.readItemList(compound.getList("Overflow", NBT.TAG_COMPOUND)); - spoutputFluidBuffer = NBTHelper.readCompoundList(compound.getList("FluidOverflow", NBT.TAG_COMPOUND), + spoutputBuffer = NBTHelper.readItemList(compound.getList("Overflow", Tag.TAG_COMPOUND)); + spoutputFluidBuffer = NBTHelper.readCompoundList(compound.getList("FluidOverflow", Tag.TAG_COMPOUND), FluidStack::loadFluidStackFromNBT); if (!clientPacket) return; - NBTHelper.iterateCompoundList(compound.getList("VisualizedItems", NBT.TAG_COMPOUND), + NBTHelper.iterateCompoundList(compound.getList("VisualizedItems", Tag.TAG_COMPOUND), c -> visualizedOutputItems.add(IntAttached.with(OUTPUT_ANIMATION_TIME, ItemStack.of(c)))); - NBTHelper.iterateCompoundList(compound.getList("VisualizedFluids", NBT.TAG_COMPOUND), + NBTHelper.iterateCompoundList(compound.getList("VisualizedFluids", Tag.TAG_COMPOUND), c -> visualizedOutputFluids .add(IntAttached.with(OUTPUT_ANIMATION_TIME, FluidStack.loadFluidStackFromNBT(c)))); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/ConfigureSequencedGearshiftPacket.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/ConfigureSequencedGearshiftPacket.java index 58f1d0201..75fb4ca84 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/ConfigureSequencedGearshiftPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/ConfigureSequencedGearshiftPacket.java @@ -5,8 +5,8 @@ import com.simibubi.create.foundation.networking.TileEntityConfigurationPacket; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.common.util.Constants.NBT; public class ConfigureSequencedGearshiftPacket extends TileEntityConfigurationPacket { @@ -23,7 +23,7 @@ public class ConfigureSequencedGearshiftPacket extends TileEntityConfigurationPa @Override protected void readSettings(FriendlyByteBuf buffer) { - instructions = buffer.readNbt().getList("data", NBT.TAG_COMPOUND); + instructions = buffer.readNbt().getList("data", Tag.TAG_COMPOUND); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftTileEntity.java index a55e9b882..9d2580d82 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftTileEntity.java @@ -7,9 +7,9 @@ import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEnt import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.util.Constants.NBT; public class SequencedGearshiftTileEntity extends SplitShaftTileEntity { @@ -152,7 +152,7 @@ public class SequencedGearshiftTileEntity extends SplitShaftTileEntity { currentInstructionProgress = compound.getFloat("InstructionProgress"); poweredPreviously = compound.getBoolean("PrevPowered"); timer = compound.getInt("Timer"); - instructions = Instruction.deserializeAll(compound.getList("Instructions", NBT.TAG_COMPOUND)); + instructions = Instruction.deserializeAll(compound.getList("Instructions", Tag.TAG_COMPOUND)); super.fromTag(compound, clientPacket); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java index 6cee39607..c7f5a5f4b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java @@ -24,10 +24,13 @@ import com.simibubi.create.content.schematics.ItemRequirement; import com.simibubi.create.content.schematics.ItemRequirement.ItemUseType; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.block.ITE; +import com.simibubi.create.foundation.block.render.DestroyProgressRenderingHandler; import com.simibubi.create.foundation.block.render.ReducedDestroyEffects; import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult; import com.simibubi.create.foundation.utility.Iterate; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -95,7 +98,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE consumer) { - consumer.accept(new ReducedDestroyEffects()); + consumer.accept(new RenderProperties()); } @Override @@ -600,4 +603,17 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE items.add(TransportedItemStack.read((CompoundTag) inbt))); beltMovementPositive = nbt.getBoolean("PositiveOrder"); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java index 4b8e69c68..ad1517163 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java @@ -6,7 +6,6 @@ import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.Instancer; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; diff --git a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java index dc5ef84d7..3ae5e7b9f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java @@ -40,33 +40,29 @@ public class ChromaticCompoundItem extends Item { super(properties); } - @Override - public boolean shouldOverrideMultiplayerNbt() { - return true; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - int light = stack.getOrCreateTag() + public int getLight(ItemStack stack) { + return stack.getOrCreateTag() .getInt("CollectingLight"); - return 1 - light / (float) AllConfigs.SERVER.recipes.lightSourceCountForRefinedRadiance.get(); } @Override - public boolean showDurabilityBar(ItemStack stack) { - int light = stack.getOrCreateTag() - .getInt("CollectingLight"); - return light > 0; + public boolean isBarVisible(ItemStack stack) { + return getLight(stack) > 0; } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { - return Color.mixColors(0x413c69, 0xFFFFFF, (float) (1 - getDurabilityForDisplay(stack))); + public int getBarWidth(ItemStack stack) { + return Math.round(13.0F * getLight(stack) / AllConfigs.SERVER.recipes.lightSourceCountForRefinedRadiance.get()); + } + + @Override + public int getBarColor(ItemStack stack) { + return Color.mixColors(0x413c69, 0xFFFFFF, getLight(stack) / (float) AllConfigs.SERVER.recipes.lightSourceCountForRefinedRadiance.get()); } @Override public int getItemStackLimit(ItemStack stack) { - return showDurabilityBar(stack) ? 1 : 16; + return isBarVisible(stack) ? 1 : 16; } @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/BackTankUtil.java b/src/main/java/com/simibubi/create/content/curiosities/armor/BackTankUtil.java index 50e356f55..82b3649a8 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/BackTankUtil.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/BackTankUtil.java @@ -70,36 +70,7 @@ public class BackTankUtil { // For Air-using tools @OnlyIn(Dist.CLIENT) - public static int getRGBDurabilityForDisplay(ItemStack stack, int usesPerTank) { - if (usesPerTank == 0) - return 0; - LocalPlayer player = Minecraft.getInstance().player; - if (player == null) - return 0; - ItemStack backtank = get(player); - if (backtank.isEmpty() || !hasAirRemaining(backtank)) - return Mth.hsvToRgb( - Math.max(0.0F, (float) (1.0F - getDurabilityForDisplay(stack, usesPerTank))) / 3.0F, 1.0F, 1.0F); - return backtank.getItem() - .getRGBDurabilityForDisplay(backtank); - } - - @OnlyIn(Dist.CLIENT) - public static double getDurabilityForDisplay(ItemStack stack, int usesPerTank) { - if (usesPerTank == 0) - return 0; - LocalPlayer player = Minecraft.getInstance().player; - if (player == null) - return 0; - ItemStack backtank = get(player); - if (backtank.isEmpty() || !hasAirRemaining(backtank)) - return (double) stack.getDamageValue() / (double) stack.getMaxDamage(); - return backtank.getItem() - .getDurabilityForDisplay(backtank); - } - - @OnlyIn(Dist.CLIENT) - public static boolean showDurabilityBar(ItemStack stack, int usesPerTank) { + public static boolean isBarVisible(ItemStack stack, int usesPerTank) { if (usesPerTank == 0) return false; LocalPlayer player = Minecraft.getInstance().player; @@ -111,4 +82,33 @@ public class BackTankUtil { return true; } + @OnlyIn(Dist.CLIENT) + public static int getBarWidth(ItemStack stack, int usesPerTank) { + if (usesPerTank == 0) + return 13; + LocalPlayer player = Minecraft.getInstance().player; + if (player == null) + return 13; + ItemStack backtank = get(player); + if (backtank.isEmpty() || !hasAirRemaining(backtank)) + return Math.round(13.0F - (float) stack.getDamageValue() / stack.getMaxDamage() * 13.0F); + return backtank.getItem() + .getBarWidth(backtank); + } + + @OnlyIn(Dist.CLIENT) + public static int getBarColor(ItemStack stack, int usesPerTank) { + if (usesPerTank == 0) + return 0; + LocalPlayer player = Minecraft.getInstance().player; + if (player == null) + return 0; + ItemStack backtank = get(player); + if (backtank.isEmpty() || !hasAirRemaining(backtank)) + return Mth.hsvToRgb( + Math.max(0.0F, 1.0F - (float) stack.getDamageValue() / stack.getMaxDamage()) / 3.0F, 1.0F, 1.0F); + return backtank.getItem() + .getBarColor(backtank); + } + } diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java index cd06d4417..1e1cb49e2 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.curiosities.armor; -import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; @@ -17,7 +16,6 @@ import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; @@ -34,9 +32,13 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Pose; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; public class CopperBacktankArmorLayer> extends RenderLayer { + public static final IIngameOverlay REMAINING_AIR_OVERLAY = CopperBacktankArmorLayer::renderRemainingAirOverlay; + public CopperBacktankArmorLayer(RenderLayerParent renderer) { super(renderer); } @@ -103,7 +105,7 @@ public class CopperBacktankArmorLayer p_150895_2_) { if (!allowdedIn(p_150895_1_)) @@ -55,14 +50,18 @@ public class CopperBacktankItem extends CopperArmorItem implements ICapacityEnch } @Override - public double getDurabilityForDisplay(ItemStack stack) { - return 1 - Mth - .clamp(getRemainingAir(stack) / ((float) BackTankUtil.maxAir(stack)), 0, 1); + public boolean isBarVisible(ItemStack stack) { + return true; } @Override - public boolean showDurabilityBar(ItemStack stack) { - return true; + public int getBarWidth(ItemStack stack) { + return Math.round(13.0F * Mth.clamp(getRemainingAir(stack) / ((float) BackTankUtil.maxAir(stack)), 0, 1)); + } + + @Override + public int getBarColor(ItemStack stack) { + return DURABILITY_BAR; } public static int getRemainingAir(ItemStack stack) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java index f0be21aee..7ee64de74 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java @@ -13,6 +13,7 @@ import net.minecraft.core.Direction.Axis; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.util.Mth; @@ -22,7 +23,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; public class CopperBacktankTileEntity extends KineticTileEntity implements Nameable { @@ -101,7 +101,7 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements Namea capacityEnchantLevel = compound.getInt("CapacityEnchantment"); airLevel = compound.getInt("Air"); airLevelTimer = compound.getInt("Timer"); - enchantmentTag = compound.getList("Enchantments", NBT.TAG_COMPOUND); + enchantmentTag = compound.getList("Enchantments", Tag.TAG_COMPOUND); if (compound.contains("CustomName", 8)) this.customName = Component.Serializer.fromJson(compound.getString("CustomName")); if (prev != 0 && prev != airLevel && airLevel == BackTankUtil.maxAir(capacityEnchantLevel) && clientPacket) 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 5e73f8023..44356b417 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 @@ -47,7 +47,6 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.IItemRenderProperties; import net.minecraftforge.common.util.BlockSnapshot; -import net.minecraftforge.common.util.Constants.BlockFlags; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fmllegacy.network.PacketDistributor; @@ -254,7 +253,7 @@ public class SymmetryWandItem extends Item { BlockSnapshot blocksnapshot = BlockSnapshot.create(world.dimension(), world, position); FluidState ifluidstate = world.getFluidState(position); - world.setBlock(position, ifluidstate.createLegacyBlock(), BlockFlags.UPDATE_NEIGHBORS); + world.setBlock(position, ifluidstate.createLegacyBlock(), Block.UPDATE_KNOWN_SHAPE); world.setBlockAndUpdate(position, blockState); CompoundTag wandNbt = wand.getOrCreateTag(); 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 a114fbb13..e8c2e5e29 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 @@ -24,7 +24,6 @@ import com.simibubi.create.foundation.utility.Lang; import net.minecraft.ChatFormatting; import net.minecraft.client.KeyMapping; -import net.minecraft.client.Minecraft; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; import net.minecraft.world.item.DyeColor; @@ -32,10 +31,6 @@ import net.minecraft.world.item.ItemStack; public class RadialToolboxMenu extends AbstractSimiScreen { - public static enum State { - SELECT_BOX, SELECT_ITEM, SELECT_ITEM_UNEQUIP, DETACH - } - private State state; private int ticksOpen; private int hoveredSlot; @@ -248,13 +243,13 @@ public class RadialToolboxMenu extends AbstractSimiScreen { if (state == State.DETACH) { if (selected == UNEQUIP) AllPackets.channel.sendToServer( - new ToolboxEquipPacket(null, selected, Minecraft.getInstance().player.getInventory().selected)); + new ToolboxEquipPacket(null, selected, minecraft.player.getInventory().selected)); return; } if (selected == UNEQUIP) AllPackets.channel.sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, - Minecraft.getInstance().player.getInventory().selected)); + minecraft.player.getInventory().selected)); if (selected < 0) return; @@ -267,7 +262,7 @@ public class RadialToolboxMenu extends AbstractSimiScreen { return; AllPackets.channel.sendToServer(new ToolboxEquipPacket(selectedBox.getBlockPos(), selected, - Minecraft.getInstance().player.getInventory().selected)); + minecraft.player.getInventory().selected)); } @Override @@ -307,7 +302,7 @@ public class RadialToolboxMenu extends AbstractSimiScreen { @Override public boolean mouseClicked(double x, double y, int button) { - int selected = (scrollMode ? scrollSlot : hoveredSlot); + int selected = scrollMode ? scrollSlot : hoveredSlot; if (button == 0) { if (selected == DEPOSIT) { @@ -340,7 +335,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, - Minecraft.getInstance().player.getInventory().selected)); + minecraft.player.getInventory().selected)); state = State.SELECT_BOX; return true; } @@ -355,10 +350,18 @@ public class RadialToolboxMenu extends AbstractSimiScreen { } @Override - public boolean keyPressed(int code, int p_keyPressed_2_, int p_keyPressed_3_) { + public boolean keyPressed(int code, int scanCode, int modifiers) { + InputConstants.Key mouseKey = InputConstants.getKey(code, scanCode); + if (AllKeys.TOOLBELT.getKeybind() + .isActiveAndMatches(mouseKey)) { + onClose(); + ToolboxHandlerClient.COOLDOWN = 2; + return true; + } + KeyMapping[] hotbarBinds = minecraft.options.keyHotbarSlots; for (int i = 0; i < hotbarBinds.length && i < 8; i++) { - if (hotbarBinds[i].matches(code, p_keyPressed_2_)) { + if (hotbarBinds[i].matches(code, scanCode)) { if (state == State.SELECT_ITEM || state == State.SELECT_ITEM_UNEQUIP) { ToolboxInventory inv = selectedBox.inventory; @@ -379,18 +382,11 @@ public class RadialToolboxMenu extends AbstractSimiScreen { } } - return super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_); + return super.keyPressed(code, scanCode, modifiers); } - @Override - public boolean keyReleased(int code, int p_keyPressed_2_, int p_keyPressed_3_) { - InputConstants.Key mouseKey = InputConstants.getKey(code, p_keyPressed_2_); - if (AllKeys.TOOLBELT.getKeybind() - .isActiveAndMatches(mouseKey)) { - this.onClose(); - return true; - } - return super.keyReleased(code, p_keyPressed_2_, p_keyPressed_3_); + public static enum State { + SELECT_BOX, SELECT_ITEM, SELECT_ITEM_UNEQUIP, DETACH } } 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 3152edd9f..931082e95 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 @@ -9,7 +9,6 @@ import java.util.Collections; import java.util.List; import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllKeys; @@ -19,7 +18,6 @@ import com.simibubi.create.foundation.networking.AllPackets; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; @@ -33,9 +31,13 @@ import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; public class ToolboxHandlerClient { + public static final IIngameOverlay OVERLAY = ToolboxHandlerClient::renderOverlay; + static int COOLDOWN = 0; public static void clientTick() { @@ -151,12 +153,9 @@ public class ToolboxHandlerClient { ScreenOpener.open(new RadialToolboxMenu(toolboxes, RadialToolboxMenu.State.SELECT_BOX, null)); } - public static void renderOverlay(PoseStack ms, MultiBufferSource buffer, int light, int overlay, - float partialTicks) { - Window mainWindow = Minecraft.getInstance() - .getWindow(); - int x = mainWindow.getGuiScaledWidth() / 2 - 90; - int y = mainWindow.getGuiScaledHeight() - 23; + public static void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) { + int x = width / 2 - 90; + int y = height - 23; RenderSystem.enableDepthTest(); Player player = Minecraft.getInstance().player; @@ -170,7 +169,7 @@ public class ToolboxHandlerClient { if (compound.isEmpty()) return; - ms.pushPose(); + poseStack.pushPose(); for (int slot = 0; slot < 9; slot++) { String key = String.valueOf(slot); if (!compound.contains(key)) @@ -183,9 +182,9 @@ public class ToolboxHandlerClient { AllGuiTextures texture = ToolboxHandler.distance(player.position(), pos) < max * max ? selected ? TOOLBELT_SELECTED_ON : TOOLBELT_HOTBAR_ON : selected ? TOOLBELT_SELECTED_OFF : TOOLBELT_HOTBAR_OFF; - texture.render(ms, x + 20 * slot - offset, y + offset); + texture.render(poseStack, x + 20 * slot - offset, y + offset); } - ms.popPose(); + poseStack.popPose(); } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxInventory.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxInventory.java index 00f6eb50f..3dfb03a8b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxInventory.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolboxInventory.java @@ -11,10 +11,10 @@ import com.simibubi.create.AllTags.AllItemTags; import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.ShulkerBoxBlock; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; @@ -152,7 +152,7 @@ public class ToolboxInventory extends ItemStackHandler { @Override public void deserializeNBT(CompoundTag nbt) { - filters = NBTHelper.readItemList(nbt.getList("Compartments", NBT.TAG_COMPOUND)); + filters = NBTHelper.readItemList(nbt.getList("Compartments", Tag.TAG_COMPOUND)); if (filters.size() != 8) { filters.clear(); for (int i = 0; i < 8; i++) diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java index 05ecbf43c..d3be9e46e 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java @@ -22,7 +22,6 @@ import com.simibubi.create.foundation.utility.Pair; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.tags.ItemTags; @@ -37,12 +36,15 @@ import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.HitResult.Type; -import net.minecraftforge.common.util.Constants.NBT; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; public class BlueprintOverlayRenderer { + public static final IIngameOverlay OVERLAY = BlueprintOverlayRenderer::renderOverlay; + static boolean active; static boolean empty; static boolean lastSneakState; @@ -204,42 +206,39 @@ public class BlueprintOverlayRenderer { } } - public static void renderOverlay(PoseStack ms, MultiBufferSource buffer, int light, int overlay, - float partialTicks) { + public static void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) { if (!active || empty) return; Minecraft mc = Minecraft.getInstance(); int w = 30 + 21 * ingredients.size() + 21; - int x = (mc.getWindow() - .getGuiScaledWidth() - w) / 2; - int y = (int) (mc.getWindow() - .getGuiScaledHeight() / 3f * 2); + int x = (width - w) / 2; + int y = (int) (height / 3f * 2); for (Pair pair : ingredients) { RenderSystem.enableBlend(); - (pair.getSecond() ? AllGuiTextures.HOTSLOT_ACTIVE : AllGuiTextures.HOTSLOT).render(ms, x, y); + (pair.getSecond() ? AllGuiTextures.HOTSLOT_ACTIVE : AllGuiTextures.HOTSLOT).render(poseStack, x, y); ItemStack itemStack = pair.getFirst(); String count = pair.getSecond() ? null : ChatFormatting.GOLD.toString() + itemStack.getCount(); - drawItemStack(ms, mc, x, y, itemStack, count); + drawItemStack(poseStack, mc, x, y, itemStack, count); x += 21; } x += 5; RenderSystem.enableBlend(); - AllGuiTextures.HOTSLOT_ARROW.render(ms, x, y + 4); + AllGuiTextures.HOTSLOT_ARROW.render(poseStack, x, y + 4); x += 25; if (result.isEmpty()) { - AllGuiTextures.HOTSLOT.render(ms, x, y); + AllGuiTextures.HOTSLOT.render(poseStack, x, y); GuiGameElement.of(Items.BARRIER) .at(x + 3, y + 3) - .render(ms); + .render(poseStack); } else { - (resultCraftable ? AllGuiTextures.HOTSLOT_SUPER_ACTIVE : AllGuiTextures.HOTSLOT).render(ms, + (resultCraftable ? AllGuiTextures.HOTSLOT_SUPER_ACTIVE : AllGuiTextures.HOTSLOT).render(poseStack, resultCraftable ? x - 1 : x, resultCraftable ? y - 1 : y); - drawItemStack(ms, mc, x, y, result, null); + drawItemStack(poseStack, mc, x, y, result, null); } } @@ -275,7 +274,7 @@ public class BlueprintOverlayRenderer { if (AllItems.ATTRIBUTE_FILTER.isIn(itemStack)) { WhitelistMode whitelistMode = WhitelistMode.values()[tag.getInt("WhitelistMode")]; - ListTag attributes = tag.getList("MatchedAttributes", NBT.TAG_COMPOUND); + ListTag attributes = tag.getList("MatchedAttributes", net.minecraft.nbt.Tag.TAG_COMPOUND); if (whitelistMode == WhitelistMode.WHITELIST_DISJ && attributes.size() == 1) { ItemAttribute fromNBT = ItemAttribute.fromNBT((CompoundTag) attributes.get(0)); if (fromNBT instanceof ItemAttribute.InTag) { 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 16be7753c..434e3aefc 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 @@ -215,18 +215,18 @@ public class ExtendoGripItem extends Item { } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { - return BackTankUtil.getRGBDurabilityForDisplay(stack, maxUses()); + public boolean isBarVisible(ItemStack stack) { + return BackTankUtil.isBarVisible(stack, maxUses()); } @Override - public double getDurabilityForDisplay(ItemStack stack) { - return BackTankUtil.getDurabilityForDisplay(stack, maxUses()); + public int getBarWidth(ItemStack stack) { + return BackTankUtil.getBarWidth(stack, maxUses()); } @Override - public boolean showDurabilityBar(ItemStack stack) { - return BackTankUtil.showDurabilityBar(stack, maxUses()); + public int getBarColor(ItemStack stack) { + return BackTankUtil.getBarColor(stack, maxUses()); } private static int maxUses() { 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 88f480986..4a5169e3e 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 @@ -1,6 +1,5 @@ package com.simibubi.create.content.curiosities.tools; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; 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 836801b35..d916fa132 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 @@ -87,18 +87,18 @@ public class PotatoCannonItem extends ProjectileWeaponItem { } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { - return BackTankUtil.getRGBDurabilityForDisplay(stack, maxUses()); + public boolean isBarVisible(ItemStack stack) { + return BackTankUtil.isBarVisible(stack, maxUses()); } @Override - public double getDurabilityForDisplay(ItemStack stack) { - return BackTankUtil.getDurabilityForDisplay(stack, maxUses()); + public int getBarWidth(ItemStack stack) { + return BackTankUtil.getBarWidth(stack, maxUses()); } @Override - public boolean showDurabilityBar(ItemStack stack) { - return BackTankUtil.showDurabilityBar(stack, maxUses()); + public int getBarColor(ItemStack stack) { + return BackTankUtil.getBarColor(stack, maxUses()); } private int maxUses() { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java index 0dbcbdf8d..865053fc7 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java @@ -17,6 +17,7 @@ import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.InteractionHand; @@ -40,7 +41,6 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fml.DistExecutor; public abstract class ZapperItem extends Item { @@ -138,7 +138,7 @@ public abstract class ZapperItem extends Item { stateToUse = NbtUtils.readBlockState(nbt.getCompound("BlockUsed")); stateToUse = BlockHelper.setZeroAge(stateToUse); CompoundTag data = null; - if (AllBlockTags.SAFE_NBT.matches(stateToUse) && nbt.contains("BlockData", NBT.TAG_COMPOUND)) { + if (AllBlockTags.SAFE_NBT.matches(stateToUse) && nbt.contains("BlockData", Tag.TAG_COMPOUND)) { data = nbt.getCompound("BlockData"); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java index 806ae600c..b7cab078d 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java @@ -20,11 +20,11 @@ import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.world.InteractionHand; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.util.Constants; public class WorldshaperScreen extends ZapperScreen { @@ -59,7 +59,7 @@ public class WorldshaperScreen extends ZapperScreen { CompoundTag nbt = zapper.getOrCreateTag(); currentBrush = NBTHelper.readEnum(nbt, "Brush", TerrainBrushes.class); - if (nbt.contains("BrushParams", Constants.NBT.TAG_COMPOUND)) { + if (nbt.contains("BrushParams", Tag.TAG_COMPOUND)) { BlockPos paramsData = NbtUtils.readBlockPos(nbt.getCompound("BrushParams")); currentBrushParams[0] = paramsData.getX(); currentBrushParams[1] = paramsData.getY(); 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 247ff3ba1..708853df2 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 @@ -1,7 +1,6 @@ package com.simibubi.create.content.logistics.block.belts.tunnel; import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java index 39e17521e..88c5c7b8b 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java @@ -35,7 +35,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.items.CapabilityItemHandler; @@ -80,13 +79,13 @@ public class BeltTunnelTileEntity extends SmartTileEntity implements IInstanceRe @Override protected void fromTag(CompoundTag compound, boolean clientPacket) { Set newFlaps = new HashSet<>(6); - ListTag flapsNBT = compound.getList("Flaps", NBT.TAG_INT); + ListTag flapsNBT = compound.getList("Flaps", Tag.TAG_INT); for (Tag inbt : flapsNBT) if (inbt instanceof IntTag) newFlaps.add(Direction.from3DDataValue(((IntTag) inbt).getAsInt())); sides.clear(); - ListTag sidesNBT = compound.getList("Sides", NBT.TAG_INT); + ListTag sidesNBT = compound.getList("Sides", Tag.TAG_INT); for (Tag inbt : sidesNBT) if (inbt instanceof IntTag) sides.add(Direction.from3DDataValue(((IntTag) inbt).getAsInt())); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BrassTunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BrassTunnelTileEntity.java index 0fa82a86e..3081c5fd9 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BrassTunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BrassTunnelTileEntity.java @@ -39,6 +39,7 @@ import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.AxisDirection; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.entity.item.ItemEntity; @@ -48,7 +49,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; @@ -596,7 +596,7 @@ public class BrassTunnelTileEntity extends BeltTunnelTileEntity implements IHave for (boolean filtered : Iterate.trueAndFalse) { distributionTargets.set(filtered, NBTHelper - .readCompoundList(compound.getList(filtered ? "FilteredTargets" : "Targets", NBT.TAG_COMPOUND), nbt -> { + .readCompoundList(compound.getList(filtered ? "FilteredTargets" : "Targets", Tag.TAG_COMPOUND), nbt -> { BlockPos pos = NbtUtils.readBlockPos(nbt.getCompound("Pos")); Direction face = Direction.from3DDataValue(nbt.getInt("Face")); return Pair.of(pos, face); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteRenderer.java index 8adb54ec6..627fbbe92 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteRenderer.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.logistics.block.chute; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.content.logistics.block.chute.ChuteBlock.Shape; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBehaviour.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBehaviour.java index dde4515a7..7f79dc1d9 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBehaviour.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBehaviour.java @@ -27,13 +27,13 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.Containers; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; @@ -204,7 +204,7 @@ public class DepotBehaviour extends TileEntityBehaviour { heldItem = TransportedItemStack.read(compound.getCompound("HeldItem")); processingOutputBuffer.deserializeNBT(compound.getCompound("OutputBuffer")); if (canMergeItems()) { - ListTag list = compound.getList("Incoming", NBT.TAG_COMPOUND); + ListTag list = compound.getList("Incoming", Tag.TAG_COMPOUND); incoming = NBTHelper.readCompoundList(list, TransportedItemStack::read); } } 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 b8ca51510..846c77310 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,8 +3,6 @@ package com.simibubi.create.content.logistics.block.depot; import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; import com.simibubi.create.foundation.utility.AnimationTickHolder; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java index 74f95a11c..aad776901 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java @@ -34,6 +34,7 @@ import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -60,7 +61,6 @@ import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.ItemStackHandler; @@ -532,13 +532,13 @@ public class EjectorTileEntity extends KineticTileEntity { powered = compound.getBoolean("Powered"); state = NBTHelper.readEnum(compound, "State", State.class); lidProgress.readNBT(compound.getCompound("Lid"), false); - launchedItems = NBTHelper.readCompoundList(compound.getList("LaunchedItems", NBT.TAG_COMPOUND), + launchedItems = NBTHelper.readCompoundList(compound.getList("LaunchedItems", Tag.TAG_COMPOUND), nbt -> IntAttached.read(nbt, ItemStack::of)); earlyTarget = null; earlyTargetTime = 0; if (compound.contains("EarlyTarget")) { - earlyTarget = Pair.of(VecHelper.readNBT(compound.getList("EarlyTarget", NBT.TAG_DOUBLE)), + earlyTarget = Pair.of(VecHelper.readNBT(compound.getList("EarlyTarget", Tag.TAG_DOUBLE)), NbtUtils.readBlockPos(compound.getCompound("EarlyTargetPos"))); earlyTargetTime = compound.getFloat("EarlyTargetTime"); } 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 e97d23857..0a914ad73 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,8 +5,6 @@ import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.Color; 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 7ad96f7f4..867930b9b 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 @@ -2,7 +2,6 @@ package com.simibubi.create.content.logistics.block.funnel; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.core.PartialModel; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmPlacementPacket.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmPlacementPacket.java index d6d95efed..b811f3ad0 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmPlacementPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmPlacementPacket.java @@ -8,11 +8,11 @@ import com.simibubi.create.foundation.networking.SimplePacketBase; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fmllegacy.network.NetworkEvent.Context; public class ArmPlacementPacket extends SimplePacketBase { @@ -28,7 +28,7 @@ public class ArmPlacementPacket extends SimplePacketBase { public ArmPlacementPacket(FriendlyByteBuf buffer) { CompoundTag nbt = buffer.readNbt(); - receivedTag = nbt.getList("Points", NBT.TAG_COMPOUND); + receivedTag = nbt.getList("Points", Tag.TAG_COMPOUND); pos = buffer.readBlockPos(); } 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 4e8e67173..aa513be83 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 @@ -1,7 +1,6 @@ package com.simibubi.create.content.logistics.block.mechanicalArm; import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java index ac9e62acb..4a4165885 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java @@ -42,7 +42,6 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants.NBT; public class ArmTileEntity extends KineticTileEntity implements ITransformableTE { @@ -478,7 +477,7 @@ public class ArmTileEntity extends KineticTileEntity implements ITransformableTE phase = NBTHelper.readEnum(compound, "Phase", Phase.class); chasedPointIndex = compound.getInt("TargetPointIndex"); chasedPointProgress = compound.getFloat("MovementProgress"); - interactionPointTag = compound.getList("InteractionPoints", NBT.TAG_COMPOUND); + interactionPointTag = compound.getList("InteractionPoints", Tag.TAG_COMPOUND); redstoneLocked = compound.getBoolean("Powered"); if (!clientPacket) 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 94d7dbfff..d84eff6f6 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 @@ -6,9 +6,7 @@ import com.jozufozu.flywheel.backend.material.Material; import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.transform.Rotate; -import com.jozufozu.flywheel.util.transform.TransformStack; import com.jozufozu.flywheel.util.transform.Translate; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java index 28f440c05..ffa7d05d7 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java @@ -16,6 +16,7 @@ import net.minecraft.commands.CommandSource; import net.minecraft.commands.CommandSourceStack; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; import net.minecraft.network.chat.TextComponent; @@ -26,7 +27,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; public class NixieTubeTileEntity extends SmartTileEntity { @@ -85,7 +85,7 @@ public class NixieTubeTileEntity extends SmartTileEntity { public void displayCustomNameOf(ItemStack stack, int nixiePositionInRow) { CompoundTag compoundnbt = stack.getTagElement("display"); - if (compoundnbt != null && compoundnbt.contains("Name", NBT.TAG_STRING)) { + if (compoundnbt != null && compoundnbt.contains("Name", Tag.TAG_STRING)) { hasCustomText = true; rawCustomText = getJsonFromString(compoundnbt.getString("Name")); customTextIndex = nixiePositionInRow; @@ -117,7 +117,7 @@ public class NixieTubeTileEntity extends SmartTileEntity { protected void fromTag(CompoundTag nbt, boolean clientPacket) { super.fromTag(nbt, clientPacket); - if (nbt.contains("RawCustomText", NBT.TAG_STRING)) { + if (nbt.contains("RawCustomText", Tag.TAG_STRING)) { rawCustomText = getJsonFromString(nbt.getString("RawCustomText")); // Check if string forms valid JSON if (rawCustomText != null && !rawCustomText.isJsonNull()) { diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java index b2c9c584b..d56a6ac3d 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.logistics.item; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllItems; 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 5ccb64bb6..194e385c2 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 @@ -27,14 +27,17 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.Options; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.player.LocalPlayer; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; public class LinkedControllerClientHandler { + public static final IIngameOverlay OVERLAY = LinkedControllerClientHandler::renderOverlay; + public static Mode MODE = Mode.IDLE; public static int PACKET_RATE = 5; public static Collection currentlyPressed = new HashSet<>(); @@ -227,18 +230,14 @@ public class LinkedControllerClientHandler { controls.forEach(kb -> kb.setDown(false)); } - public static void renderOverlay(PoseStack ms, MultiBufferSource buffer, int light, int overlay, - float partialTicks) { + public static void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width1, int height1) { if (MODE != Mode.BIND) return; Minecraft mc = Minecraft.getInstance(); - ms.pushPose(); + poseStack.pushPose(); Screen tooltipScreen = new TooltipScreen(null); - tooltipScreen.init(mc, mc.getWindow() - .getGuiScaledWidth(), - mc.getWindow() - .getGuiScaledHeight()); + tooltipScreen.init(mc, width1, height1); Object[] keys = new Object[6]; Vector controls = getControls(); @@ -262,10 +261,9 @@ public class LinkedControllerClientHandler { int x = (tooltipScreen.width / 3) - width / 2; int y = tooltipScreen.height - height; - tooltipScreen.renderComponentTooltip(ms, list, x, y); - - ms.popPose(); + tooltipScreen.renderComponentTooltip(poseStack, list, x, y); + poseStack.popPose(); } public enum Mode { diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java index 3484b7497..76cf1d624 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java @@ -2,7 +2,6 @@ package com.simibubi.create.content.logistics.item; import java.util.Vector; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.AllItems; diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterContainer.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterContainer.java index 8fd8148f7..2ab82ce70 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterContainer.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterContainer.java @@ -9,6 +9,7 @@ import com.simibubi.create.foundation.utility.Pair; import net.minecraft.ChatFormatting; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.TextComponent; import net.minecraft.world.entity.player.Inventory; @@ -18,7 +19,6 @@ import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.SlotItemHandler; @@ -132,7 +132,7 @@ public class AttributeFilterContainer extends AbstractFilterContainer { whitelistMode = WhitelistMode.values()[filterItem.getOrCreateTag() .getInt("WhitelistMode")]; ListTag attributes = filterItem.getOrCreateTag() - .getList("MatchedAttributes", NBT.TAG_COMPOUND); + .getList("MatchedAttributes", Tag.TAG_COMPOUND); attributes.forEach(inbt -> { CompoundTag compound = (CompoundTag) inbt; selectedAttributes.add(Pair.of(ItemAttribute.fromNBT(compound), compound.getBoolean("Inverted"))); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java index 899230fa3..dcde5ef04 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java @@ -35,7 +35,6 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fmllegacy.network.NetworkHooks; import net.minecraftforge.items.ItemHandlerHelper; @@ -120,7 +119,7 @@ public class FilterItem extends Item implements MenuProvider { int count = 0; ListTag attributes = filter.getOrCreateTag() - .getList("MatchedAttributes", NBT.TAG_COMPOUND); + .getList("MatchedAttributes", Tag.TAG_COMPOUND); for (Tag inbt : attributes) { CompoundTag compound = (CompoundTag) inbt; ItemAttribute attribute = ItemAttribute.fromNBT(compound); @@ -216,7 +215,7 @@ public class FilterItem extends Item implements MenuProvider { WhitelistMode whitelistMode = WhitelistMode.values()[filter.getOrCreateTag() .getInt("WhitelistMode")]; ListTag attributes = filter.getOrCreateTag() - .getList("MatchedAttributes", NBT.TAG_COMPOUND); + .getList("MatchedAttributes", Tag.TAG_COMPOUND); for (Tag inbt : attributes) { CompoundTag compound = (CompoundTag) inbt; ItemAttribute attribute = ItemAttribute.fromNBT(compound); diff --git a/src/main/java/com/simibubi/create/content/schematics/block/LaunchedItem.java b/src/main/java/com/simibubi/create/content/schematics/block/LaunchedItem.java index 1943c04ed..482b93360 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/LaunchedItem.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/LaunchedItem.java @@ -13,12 +13,12 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction.Axis; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.util.Constants; public abstract class LaunchedItem { @@ -111,7 +111,7 @@ public abstract class LaunchedItem { void readNBT(CompoundTag nbt) { super.readNBT(nbt); state = NbtUtils.readBlockState(nbt.getCompound("BlockState")); - if (nbt.contains("Data", Constants.NBT.TAG_COMPOUND)) { + if (nbt.contains("Data", Tag.TAG_COMPOUND)) { data = nbt.getCompound("Data"); } } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java index 7bdadc658..6ad9758c7 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java @@ -23,7 +23,6 @@ import com.simibubi.create.foundation.utility.outliner.AABBOutline; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.core.Vec3i; import net.minecraft.nbt.CompoundTag; @@ -40,6 +39,8 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlac import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.client.gui.ForgeIngameGui; +import net.minecraftforge.client.gui.IIngameOverlay; public class SchematicHandler { @@ -60,6 +61,8 @@ public class SchematicHandler { private SchematicHotbarSlotOverlay overlay; private ToolSelectionScreen selectionScreen; + private final IIngameOverlay overlayRenderer = this::renderOverlay; + public SchematicHandler() { renderers = new Vector<>(3); for (int i = 0; i < renderers.capacity(); i++) @@ -194,16 +197,20 @@ public class SchematicHandler { } - public void renderOverlay(PoseStack ms, MultiBufferSource buffer, int light, int overlay, float partialTicks) { + public IIngameOverlay getOverlayRenderer() { + return overlayRenderer; + } + + public void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) { if (!active) return; if (activeSchematicItem != null) - this.overlay.renderOn(ms, activeHotbarSlot); + this.overlay.renderOn(poseStack, activeHotbarSlot); currentTool.getTool() - .renderOverlay(ms, buffer); - selectionScreen.renderPassive(ms, partialTicks); + .renderOverlay(gui, poseStack, partialTicks, width, height); + selectionScreen.renderPassive(poseStack, partialTicks); } - + public void onMouseInput(int button, boolean pressed) { if (!active) return; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java index f38e0c9cf..f7a2ecdf7 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.schematics.client.tools; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.render.SuperRenderTypeBuffer; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraftforge.client.gui.ForgeIngameGui; public interface ISchematicTool { @@ -14,7 +14,7 @@ public interface ISchematicTool { public boolean handleMouseWheel(double delta); public void renderTool(PoseStack ms, SuperRenderTypeBuffer buffer); - public void renderOverlay(PoseStack ms, MultiBufferSource buffer); + public void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height); public void renderOnSchematic(PoseStack ms, SuperRenderTypeBuffer buffer); } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java index 1dd9d2da8..ca7b40d21 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.schematics.client.tools; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.render.SuperRenderTypeBuffer; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraftforge.client.gui.ForgeIngameGui; public abstract class PlacementToolBase extends SchematicToolBase { @@ -23,8 +23,8 @@ public abstract class PlacementToolBase extends SchematicToolBase { } @Override - public void renderOverlay(PoseStack ms, MultiBufferSource buffer) { - super.renderOverlay(ms, buffer); + public void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) { + super.renderOverlay(gui, poseStack, partialTicks, width, height); } @Override diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java index b2a9679c8..b3296d1d0 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java @@ -18,13 +18,13 @@ import com.simibubi.create.foundation.utility.outliner.AABBOutline; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult.Type; import net.minecraft.world.phys.Vec3; +import net.minecraftforge.client.gui.ForgeIngameGui; public abstract class SchematicToolBase implements ISchematicTool { @@ -124,7 +124,7 @@ public abstract class SchematicToolBase implements ISchematicTool { public void renderTool(PoseStack ms, SuperRenderTypeBuffer buffer) {} @Override - public void renderOverlay(PoseStack ms, MultiBufferSource buffer) {} + public void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) {} @Override public void renderOnSchematic(PoseStack ms, SuperRenderTypeBuffer buffer) { diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java index 8337e012c..df275d65c 100644 --- a/src/main/java/com/simibubi/create/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/events/ClientEvents.java @@ -21,7 +21,6 @@ import com.simibubi.create.content.contraptions.components.structureMovement.tra import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController; import com.simibubi.create.content.contraptions.components.turntable.TurntableHandler; -import com.simibubi.create.content.contraptions.goggles.GoggleOverlayRenderer; import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRecipe; import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorHandler; import com.simibubi.create.content.curiosities.armor.CopperBacktankArmorLayer; @@ -56,11 +55,7 @@ import com.simibubi.create.foundation.utility.worldWrappers.WrappedClientWorld; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.renderer.LightTexture; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; -import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; @@ -76,10 +71,8 @@ import net.minecraftforge.client.event.ClientPlayerNetworkEvent; import net.minecraftforge.client.event.EntityRenderersEvent; import net.minecraftforge.client.event.EntityViewRenderEvent; import net.minecraftforge.client.event.RegisterClientReloadListenersEvent; -import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderTooltipEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.client.gui.ForgeIngameGui; import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.RenderTickEvent; @@ -199,31 +192,6 @@ public class ClientEvents { ms.popPose(); } - @SubscribeEvent - public static void afterRenderOverlayLayer(RenderGameOverlayEvent.PostLayer event) { - PoseStack ms = event.getMatrixStack(); - BufferSource buffers = Minecraft.getInstance() - .renderBuffers() - .bufferSource(); - int light = LightTexture.FULL_BRIGHT; - int overlay = OverlayTexture.NO_OVERLAY; - float pt = event.getPartialTicks(); - - if (event.getOverlay() == ForgeIngameGui.AIR_LEVEL_ELEMENT) - CopperBacktankArmorLayer.renderRemainingAirOverlay(ms, buffers, light, overlay, pt); - if (event.getOverlay() == ForgeIngameGui.HOTBAR_ELEMENT) - onRenderHotbar(ms, buffers, light, overlay, pt); - } - - public static void onRenderHotbar(PoseStack ms, MultiBufferSource buffer, int light, int overlay, - float partialTicks) { - CreateClient.SCHEMATIC_HANDLER.renderOverlay(ms, buffer, light, overlay, partialTicks); - LinkedControllerClientHandler.renderOverlay(ms, buffer, light, overlay, partialTicks); - BlueprintOverlayRenderer.renderOverlay(ms, buffer, light, overlay, partialTicks); - GoggleOverlayRenderer.renderOverlay(ms, buffer, light, overlay, partialTicks); - ToolboxHandlerClient.renderOverlay(ms, buffer, light, overlay, partialTicks); - } - @SubscribeEvent public static void getItemTooltipColor(RenderTooltipEvent.Color event) { PonderTooltipHandler.handleTooltipColor(event); diff --git a/src/main/java/com/simibubi/create/events/CommonEvents.java b/src/main/java/com/simibubi/create/events/CommonEvents.java index 72440efca..debbbba4e 100644 --- a/src/main/java/com/simibubi/create/events/CommonEvents.java +++ b/src/main/java/com/simibubi/create/events/CommonEvents.java @@ -36,6 +36,7 @@ import net.minecraft.world.level.material.FluidState; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.event.AddReloadListenerEvent; import net.minecraftforge.event.AttachCapabilitiesEvent; +import net.minecraftforge.event.OnDatapackSyncEvent; import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.ServerTickEvent; @@ -139,7 +140,7 @@ public class CommonEvents { } @SubscribeEvent - public static void registerReloadListeners(AddReloadListenerEvent event) { + public static void addReloadListeners(AddReloadListenerEvent event) { event.addListener(RecipeFinder.LISTENER); event.addListener(PotionMixingRecipeManager.LISTENER); event.addListener(FluidTransferRecipes.LISTENER); @@ -147,7 +148,17 @@ public class CommonEvents { } @SubscribeEvent - public static void serverStopped(FMLServerStoppingEvent event) { + public static void onDatapackSync(OnDatapackSyncEvent event) { + ServerPlayer player = event.getPlayer(); + if (player != null) { + PotatoProjectileTypeManager.syncTo(player); + } else { + PotatoProjectileTypeManager.syncToAll(); + } + } + + @SubscribeEvent + public static void serverStopping(FMLServerStoppingEvent event) { Create.SCHEMATIC_RECEIVER.shutdown(); } diff --git a/src/main/java/com/simibubi/create/foundation/block/BreakProgressHook.java b/src/main/java/com/simibubi/create/foundation/block/BreakProgressHook.java deleted file mode 100644 index 0b56c2957..000000000 --- a/src/main/java/com/simibubi/create/foundation/block/BreakProgressHook.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.simibubi.create.foundation.block; - -import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; - -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.renderer.LevelRenderer; -import net.minecraft.core.BlockPos; - -public class BreakProgressHook { - - public static void whenBreaking(ClientLevel world, LevelRenderer renderer, int playerEntityId, BlockPos pos, int progress) { - if (AllBlocks.BELT.has(world.getBlockState(pos))) { - BeltTileEntity belt = (BeltTileEntity) world.getBlockEntity(pos); - - for (BlockPos beltPos : BeltBlock.getBeltChain(world, belt.getController())) { - renderer.destroyBlockProgress(beltPos.hashCode(), beltPos, progress); - } - } - } -} diff --git a/src/main/java/com/simibubi/create/foundation/block/render/DestroyProgressRenderingHandler.java b/src/main/java/com/simibubi/create/foundation/block/render/DestroyProgressRenderingHandler.java new file mode 100644 index 000000000..e077bad1b --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/render/DestroyProgressRenderingHandler.java @@ -0,0 +1,16 @@ +package com.simibubi.create.foundation.block.render; + +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.client.IBlockRenderProperties; + +public interface DestroyProgressRenderingHandler extends IBlockRenderProperties { + /** + * Called before the default block breaking progress overlay is rendered. + * + * @return if the default rendering should be cancelled or not + */ + boolean renderDestroyProgress(ClientLevel level, LevelRenderer renderer, int breakerId, BlockPos pos, int progress, BlockState blockState); +} diff --git a/src/main/java/com/simibubi/create/foundation/block/render/SpriteShiftEntry.java b/src/main/java/com/simibubi/create/foundation/block/render/SpriteShiftEntry.java index 0f365ba58..c4efb9b35 100644 --- a/src/main/java/com/simibubi/create/foundation/block/render/SpriteShiftEntry.java +++ b/src/main/java/com/simibubi/create/foundation/block/render/SpriteShiftEntry.java @@ -1,38 +1,32 @@ package com.simibubi.create.foundation.block.render; -import net.minecraft.client.renderer.texture.TextureAtlas; +import com.jozufozu.flywheel.core.StitchedSprite; + import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.resources.ResourceLocation; public class SpriteShiftEntry { - protected ResourceLocation originalTextureLocation; - protected ResourceLocation targetTextureLocation; - protected TextureAtlasSprite original; - protected TextureAtlasSprite target; + protected StitchedSprite original; + protected StitchedSprite target; public void set(ResourceLocation originalTextureLocation, ResourceLocation targetTextureLocation) { - this.originalTextureLocation = originalTextureLocation; - this.targetTextureLocation = targetTextureLocation; + original = new StitchedSprite(originalTextureLocation); + target = new StitchedSprite(targetTextureLocation); } public ResourceLocation getOriginalResourceLocation() { - return originalTextureLocation; + return original.getLocation(); } public ResourceLocation getTargetResourceLocation() { - return targetTextureLocation; + return target.getLocation(); } public TextureAtlasSprite getOriginal() { - return original; + return original.get(); } public TextureAtlasSprite getTarget() { - return target; + return target.get(); } - - protected void loadTextures(TextureAtlas atlas) { - original = atlas.getSprite(originalTextureLocation); - target = atlas.getSprite(targetTextureLocation); - } -} \ No newline at end of file +} diff --git a/src/main/java/com/simibubi/create/foundation/block/render/SpriteShifter.java b/src/main/java/com/simibubi/create/foundation/block/render/SpriteShifter.java index dbca39ce3..04a0cc605 100644 --- a/src/main/java/com/simibubi/create/foundation/block/render/SpriteShifter.java +++ b/src/main/java/com/simibubi/create/foundation/block/render/SpriteShifter.java @@ -1,21 +1,12 @@ package com.simibubi.create.foundation.block.render; import java.util.HashMap; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import com.simibubi.create.Create; -import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.InventoryMenu; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -@EventBusSubscriber(value = Dist.CLIENT, bus = EventBusSubscriber.Bus.MOD) public class SpriteShifter { protected static final Map ENTRY_CACHE = new HashMap<>(); @@ -35,32 +26,4 @@ public class SpriteShifter { return get(Create.asResource(originalLocation), Create.asResource(targetLocation)); } - public static List getAllTargetSprites() { - return ENTRY_CACHE.values().stream().map(SpriteShiftEntry::getTargetResourceLocation).collect(Collectors.toList()); - } - - @SubscribeEvent - public static void onTextureStitchPre(TextureStitchEvent.Pre event) { - if (!event.getMap() - .location() - .equals(InventoryMenu.BLOCK_ATLAS)) - return; - - getAllTargetSprites() - .forEach(event::addSprite); - } - - @SubscribeEvent - public static void onTextureStitchPost(TextureStitchEvent.Post event) { - if (!event.getMap() - .location() - .equals(InventoryMenu.BLOCK_ATLAS)) - return; - - TextureAtlas atlas = event.getMap(); - for (SpriteShiftEntry entry : ENTRY_CACHE.values()) { - entry.loadTextures(atlas); - } - } - } 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 dabc73fb2..ed6fa72f5 100644 --- a/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java +++ b/src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java @@ -14,8 +14,8 @@ import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.networking.SimplePacketBase; import com.simibubi.create.foundation.ponder.PonderRegistry; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.content.PonderIndexScreen; +import com.simibubi.create.foundation.ponder.ui.PonderIndexScreen; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java index c82207d53..3cd201912 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java @@ -2,7 +2,6 @@ package com.simibubi.create.foundation.fluid; import java.util.function.Function; -import com.jozufozu.flywheel.util.transform.MatrixTransformStack; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack.Pose; diff --git a/src/main/java/com/simibubi/create/foundation/gui/CreateMainMenuScreen.java b/src/main/java/com/simibubi/create/foundation/gui/CreateMainMenuScreen.java index 2706ec371..5b1d96d66 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/CreateMainMenuScreen.java +++ b/src/main/java/com/simibubi/create/foundation/gui/CreateMainMenuScreen.java @@ -10,7 +10,7 @@ import com.simibubi.create.foundation.config.ui.BaseConfigScreen; import com.simibubi.create.foundation.gui.element.BoxElement; import com.simibubi.create.foundation.gui.element.GuiGameElement; import com.simibubi.create.foundation.item.TooltipHelper; -import com.simibubi.create.foundation.ponder.content.PonderTagIndexScreen; +import com.simibubi.create.foundation.ponder.ui.PonderTagIndexScreen; import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Lang; diff --git a/src/main/java/com/simibubi/create/foundation/gui/CustomLightingSettings.java b/src/main/java/com/simibubi/create/foundation/gui/CustomLightingSettings.java index 8f3e34e63..9abc3159c 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/CustomLightingSettings.java +++ b/src/main/java/com/simibubi/create/foundation/gui/CustomLightingSettings.java @@ -3,7 +3,6 @@ package com.simibubi.create.foundation.gui; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.math.Matrix4f; import com.mojang.math.Vector3f; -import com.simibubi.create.foundation.utility.VecHelper; public class CustomLightingSettings implements ILightingSettings { @@ -29,7 +28,7 @@ public class CustomLightingSettings implements ILightingSettings { light2.transform(Vector3f.YP.rotationDegrees(yRot2)); light2.transform(Vector3f.XN.rotationDegrees(xRot2)); } else { - light2 = VecHelper.ZERO_3F; + light2 = Vector3f.ZERO; } lightMatrix = new Matrix4f(); diff --git a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java index cacfa89b9..3d1b6f05f 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java +++ b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java @@ -8,7 +8,7 @@ import java.util.Optional; import javax.annotation.Nullable; -import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; +import com.simibubi.create.foundation.ponder.ui.NavigatableSimiScreen; import com.simibubi.create.foundation.utility.animation.LerpedFloat; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/gui/element/GuiGameElement.java b/src/main/java/com/simibubi/create/foundation/gui/element/GuiGameElement.java index 8f4453f19..461a5a2b5 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/element/GuiGameElement.java +++ b/src/main/java/com/simibubi/create/foundation/gui/element/GuiGameElement.java @@ -28,7 +28,6 @@ import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.world.inventory.InventoryMenu; @@ -262,8 +261,8 @@ public class GuiGameElement { ItemRenderer renderer = Minecraft.getInstance().getItemRenderer(); BakedModel bakedModel = renderer.getModel(stack, null, null, 0); - renderer.textureManager.getTexture(TextureAtlas.LOCATION_BLOCKS).setFilter(false, false); - RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_BLOCKS); + renderer.textureManager.getTexture(InventoryMenu.BLOCK_ATLAS).setFilter(false, false); + RenderSystem.setShaderTexture(0, InventoryMenu.BLOCK_ATLAS); RenderSystem.enableBlend(); RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/com/simibubi/create/foundation/mixin/BreakProgressMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/BreakProgressMixin.java deleted file mode 100644 index 0f76fceaf..000000000 --- a/src/main/java/com/simibubi/create/foundation/mixin/BreakProgressMixin.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.simibubi.create.foundation.mixin; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import com.simibubi.create.foundation.block.BreakProgressHook; - -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.renderer.LevelRenderer; -import net.minecraft.core.BlockPos; - -@Mixin(ClientLevel.class) -public class BreakProgressMixin { - @Shadow - @Final - private LevelRenderer levelRenderer; // levelRenderer - private final ClientLevel self = (ClientLevel) (Object) this; - - @Inject(at = @At("HEAD"), method = "destroyBlockProgress") - private void onBreakProgress(int playerEntityId, BlockPos pos, int progress, CallbackInfo ci) { - BreakProgressHook.whenBreaking(self, this.levelRenderer, playerEntityId, pos, progress); - } -} diff --git a/src/main/java/com/simibubi/create/foundation/mixin/DestroyProgressMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/DestroyProgressMixin.java new file mode 100644 index 000000000..1dde3aa35 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/mixin/DestroyProgressMixin.java @@ -0,0 +1,36 @@ +package com.simibubi.create.foundation.mixin; + +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import com.simibubi.create.foundation.block.render.DestroyProgressRenderingHandler; + +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.client.IBlockRenderProperties; +import net.minecraftforge.client.RenderProperties; + +@Mixin(ClientLevel.class) +public class DestroyProgressMixin { + @Shadow + @Final + private LevelRenderer levelRenderer; + + @Inject(at = @At("HEAD"), method = "destroyBlockProgress(ILnet/minecraft/core/BlockPos;I)V", cancellable = true) + private void onDestroyBlockProgress(int breakerId, BlockPos pos, int progress, CallbackInfo ci) { + ClientLevel self = (ClientLevel) (Object) this; + BlockState state = self.getBlockState(pos); + IBlockRenderProperties properties = RenderProperties.get(state); + if (properties instanceof DestroyProgressRenderingHandler handler) { + if (handler.renderDestroyProgress(self, levelRenderer, breakerId, pos, progress, state)) { + ci.cancel(); + } + } + } +} diff --git a/src/main/java/com/simibubi/create/foundation/mixin/HeavyBootsOnPlayerMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/HeavyBootsOnPlayerMixin.java index 7ab48fa93..f29265549 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/HeavyBootsOnPlayerMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/HeavyBootsOnPlayerMixin.java @@ -18,8 +18,8 @@ import net.minecraftforge.api.distmarker.OnlyIn; @Mixin(LocalPlayer.class) public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer { - public HeavyBootsOnPlayerMixin(ClientLevel p_i50991_1_, GameProfile p_i50991_2_) { - super(p_i50991_1_, p_i50991_2_); + private HeavyBootsOnPlayerMixin(ClientLevel level, GameProfile profile) { + super(level, profile); } @Inject(at = @At("HEAD"), method = "isUnderWater", cancellable = true) diff --git a/src/main/java/com/simibubi/create/foundation/mixin/PlayerListMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/PlayerListMixin.java deleted file mode 100644 index 35924243d..000000000 --- a/src/main/java/com/simibubi/create/foundation/mixin/PlayerListMixin.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.simibubi.create.foundation.mixin; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import com.simibubi.create.content.curiosities.weapons.PotatoProjectileTypeManager; - -import net.minecraft.network.Connection; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.players.PlayerList; - -@Mixin(PlayerList.class) -public class PlayerListMixin { - @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/stats/ServerRecipeBook;sendInitialRecipeBook(Lnet/minecraft/server/level/ServerPlayer;)V", shift = At.Shift.AFTER), method = "placeNewPlayer(Lnet/minecraft/network/Connection;Lnet/minecraft/server/level/ServerPlayer;)V") - private void afterSendRecipeBookOnPlaceNewPlayer(Connection connection, ServerPlayer player, CallbackInfo ci) { - PotatoProjectileTypeManager.syncTo(player); - } - - @Inject(at = @At("TAIL"), method = "reloadResources()V") - private void onReloadResources(CallbackInfo ci) { - PotatoProjectileTypeManager.syncToAll(); - } -} 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 260a4cb4b..358433140 100644 --- a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java +++ b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java @@ -159,11 +159,11 @@ public enum AllPackets { private static class LoadedPacket { private static int index = 0; - BiConsumer encoder; - Function decoder; - BiConsumer> handler; - Class type; - NetworkDirection direction; + private BiConsumer encoder; + private Function decoder; + private BiConsumer> handler; + private Class type; + private NetworkDirection direction; private LoadedPacket(Class type, Function factory, NetworkDirection direction) { encoder = T::write; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/ElementLink.java b/src/main/java/com/simibubi/create/foundation/ponder/ElementLink.java index 92853a2d5..8484baf65 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/ElementLink.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ElementLink.java @@ -2,6 +2,8 @@ package com.simibubi.create.foundation.ponder; import java.util.UUID; +import com.simibubi.create.foundation.ponder.element.PonderElement; + public class ElementLink { private Class elementClass; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapter.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderChapter.java similarity index 88% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapter.java rename to src/main/java/com/simibubi/create/foundation/ponder/PonderChapter.java index feb8cac9b..d09c382b4 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapter.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderChapter.java @@ -1,12 +1,10 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder; import javax.annotation.Nonnull; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.gui.element.ScreenElement; -import com.simibubi.create.foundation.ponder.PonderLocalization; -import com.simibubi.create.foundation.ponder.PonderRegistry; import net.minecraft.client.gui.GuiComponent; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapterRegistry.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderChapterRegistry.java similarity index 92% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapterRegistry.java rename to src/main/java/com/simibubi/create/foundation/ponder/PonderChapterRegistry.java index 714a7c20b..6fb60ad9a 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderChapterRegistry.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderChapterRegistry.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder; import java.util.ArrayList; import java.util.Collections; @@ -10,7 +10,6 @@ import java.util.stream.Collectors; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import com.simibubi.create.foundation.ponder.PonderStoryBoardEntry; import com.simibubi.create.foundation.utility.Pair; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java index f9663a576..cb3738219 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java @@ -7,10 +7,10 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.simibubi.create.Create; import com.simibubi.create.foundation.ponder.content.PonderIndex; -import com.simibubi.create.foundation.ponder.content.PonderTag; -import com.simibubi.create.foundation.ponder.content.PonderTagIndexScreen; -import com.simibubi.create.foundation.ponder.content.PonderTagScreen; import com.simibubi.create.foundation.ponder.content.SharedText; +import com.simibubi.create.foundation.ponder.ui.PonderTagIndexScreen; +import com.simibubi.create.foundation.ponder.ui.PonderTagScreen; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.Couple; import com.tterrag.registrate.AbstractRegistrate; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderPalette.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderPalette.java similarity index 90% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderPalette.java rename to src/main/java/com/simibubi/create/foundation/ponder/PonderPalette.java index d53685b18..395a7c4f8 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderPalette.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderPalette.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder; import com.simibubi.create.foundation.utility.Color; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistrationHelper.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistrationHelper.java index fb6758c31..d17711d57 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistrationHelper.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistrationHelper.java @@ -4,8 +4,6 @@ import java.util.Arrays; import java.util.function.Consumer; import com.simibubi.create.foundation.ponder.PonderStoryBoardEntry.PonderStoryBoard; -import com.simibubi.create.foundation.ponder.content.PonderChapter; -import com.simibubi.create.foundation.ponder.content.PonderTag; import com.tterrag.registrate.util.entry.ItemProviderEntry; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java index 1fb744560..0d81c2e74 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java @@ -13,10 +13,7 @@ import java.util.Map; import java.util.zip.GZIPInputStream; import com.simibubi.create.Create; -import com.simibubi.create.foundation.ponder.content.PonderChapter; -import com.simibubi.create.foundation.ponder.content.PonderChapterRegistry; import com.simibubi.create.foundation.ponder.content.PonderIndex; -import com.simibubi.create.foundation.ponder.content.PonderTagRegistry; import com.simibubi.create.foundation.ponder.content.SharedText; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderScene.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderScene.java index 8721a19e1..46cdf4e34 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderScene.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderScene.java @@ -24,11 +24,13 @@ import com.mojang.math.Matrix4f; import com.mojang.math.Vector4f; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.ponder.content.PonderIndex; -import com.simibubi.create.foundation.ponder.content.PonderTag; -import com.simibubi.create.foundation.ponder.elements.PonderOverlayElement; -import com.simibubi.create.foundation.ponder.elements.PonderSceneElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.HideAllInstruction; +import com.simibubi.create.foundation.ponder.element.PonderElement; +import com.simibubi.create.foundation.ponder.element.PonderOverlayElement; +import com.simibubi.create.foundation.ponder.element.PonderSceneElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.HideAllInstruction; +import com.simibubi.create.foundation.ponder.instruction.PonderInstruction; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.render.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Pair; @@ -59,31 +61,32 @@ public class PonderScene { public static final String TITLE_KEY = "header"; - boolean finished; - int sceneIndex; - int textIndex; + private boolean finished; +// private int sceneIndex; + private int textIndex; ResourceLocation sceneId; - IntList keyframeTimes; + private IntList keyframeTimes; - List schedule, activeSchedule; - Map linkedElements; - Set elements; - List tags; + List schedule; + private List activeSchedule; + private Map linkedElements; + private Set elements; + private List tags; - PonderWorld world; - String namespace; - ResourceLocation component; - SceneTransform transform; - SceneRenderInfo info; - Outliner outliner; - String defaultTitle; + private PonderWorld world; + private String namespace; + private ResourceLocation component; + private SceneTransform transform; + private SceneCamera camera; + private Outliner outliner; +// private String defaultTitle; - Vec3 pointOfInterest; - Vec3 chasingPointOfInterest; - WorldSectionElement baseWorldSection; + private Vec3 pointOfInterest; + private Vec3 chasingPointOfInterest; + private WorldSectionElement baseWorldSection; @Nullable - Entity renderViewEntity; + private Entity renderViewEntity; int basePlateOffsetX; int basePlateOffsetZ; @@ -91,9 +94,9 @@ public class PonderScene { float scaleFactor; float yOffset; - boolean stoppedCounting; - int totalTime; - int currentTime; + private boolean stoppedCounting; + private int totalTime; + private int currentTime; public PonderScene(PonderWorld world, String namespace, ResourceLocation component, Collection tags) { if (world != null) @@ -114,7 +117,7 @@ public class PonderScene { activeSchedule = new ArrayList<>(); transform = new SceneTransform(); basePlateSize = getBounds().getXSpan(); - info = new SceneRenderInfo(); + camera = new SceneCamera(); baseWorldSection = new WorldSectionElement(); renderViewEntity = world != null ? new ArmorStand(world, 0, 0, 0) : null; keyframeTimes = new IntArrayList(4); @@ -178,14 +181,6 @@ public class PonderScene { return Pair.of(pickBlock, selectedPos); } - public String getTitle() { - return getString(TITLE_KEY); - } - - public String getString(String key) { - return PonderLocalization.getSpecific(sceneId, key); - } - public void reset() { currentTime = 0; activeSchedule.clear(); @@ -241,9 +236,9 @@ public class PonderScene { forEachVisible(PonderSceneElement.class, e -> e.renderLayer(world, buffer, type, ms, pt)); forEachVisible(PonderSceneElement.class, e -> e.renderLast(world, buffer, ms, pt)); - info.set(transform.xRotation.getValue(pt) + 90, transform.yRotation.getValue(pt) + 180); - world.renderEntities(ms, buffer, info, pt); - world.renderParticles(ms, buffer, info, pt); + camera.set(transform.xRotation.getValue(pt) + 90, transform.yRotation.getValue(pt) + 180); + world.renderEntities(ms, buffer, camera, pt); + world.renderParticles(ms, buffer, camera, pt); outliner.renderOutlines(ms, buffer, pt); ms.popPose(); @@ -340,30 +335,11 @@ public class PonderScene { return function.apply(resolve(link)); } - public PonderWorld getWorld() { - return world; - } - - public Set getElements() { - return elements; - } - public void forEach(Consumer function) { for (PonderElement elemtent : elements) function.accept(elemtent); } - public void forEachWorldEntity(Class type, Consumer function) { - world.getEntityStream() - .filter(type::isInstance) - .map(type::cast) - .forEach(function); - /* - * for (Entity element : world.getEntities()) { if (type.isInstance(element)) - * function.accept(type.cast(element)); } - */ - } - public void forEach(Class type, Consumer function) { for (PonderElement element : elements) if (type.isInstance(element)) @@ -376,8 +352,15 @@ public class PonderScene { function.accept(type.cast(element)); } - public BoundingBox getBounds() { - return world == null ? new BoundingBox(BlockPos.ZERO) : world.getBounds(); + public void forEachWorldEntity(Class type, Consumer function) { + world.getEntityStream() + .filter(type::isInstance) + .map(type::cast) + .forEach(function); + /* + * for (Entity element : world.getEntities()) { if (type.isInstance(element)) + * function.accept(type.cast(element)); } + */ } public Supplier registerText(String defaultText) { @@ -396,10 +379,46 @@ public class PonderScene { return new SceneBuildingUtil(getBounds()); } + public String getTitle() { + return getString(TITLE_KEY); + } + + public String getString(String key) { + return PonderLocalization.getSpecific(sceneId, key); + } + + public PonderWorld getWorld() { + return world; + } + public String getNamespace() { return namespace; } + public int getKeyframeCount() { + return keyframeTimes.size(); + } + + public int getKeyframeTime(int index) { + return keyframeTimes.getInt(index); + } + + public List getTags() { + return tags; + } + + public ResourceLocation getComponent() { + return component; + } + + public Set getElements() { + return elements; + } + + public BoundingBox getBounds() { + return world == null ? new BoundingBox(BlockPos.ZERO) : world.getBounds(); + } + public ResourceLocation getId() { return sceneId; } @@ -420,14 +439,38 @@ public class PonderScene { this.finished = finished; } + public int getBasePlateOffsetX() { + return basePlateOffsetX; + } + + public int getBasePlateOffsetZ() { + return basePlateOffsetZ; + } + + public int getBasePlateSize() { + return basePlateSize; + } + + public float getYOffset() { + return yOffset; + } + + public int getTotalTime() { + return totalTime; + } + + public int getCurrentTime() { + return currentTime; + } + public class SceneTransform { public LerpedFloat xRotation, yRotation; // Screen params - int width, height; - double offset; - Matrix4f cachedMat; + private int width, height; + private double offset; + private Matrix4f cachedMat; public SceneTransform() { xRotation = LerpedFloat.angular() @@ -455,7 +498,7 @@ public class PonderScene { public PoseStack apply(PoseStack ms, float pt, boolean overlayCompatible) { ms.translate(width / 2, height / 2, 200 + offset); - TransformStack.cast(ms) + TransformStack.cast(ms) .rotateX(-35) .rotateY(55) .translate(offset, 0, 0) @@ -529,7 +572,7 @@ public class PonderScene { } - public class SceneRenderInfo extends Camera { + public class SceneCamera extends Camera { public void set(float xRotation, float yRotation) { setRotation(yRotation, xRotation); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderStoryBoardEntry.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderStoryBoardEntry.java index b801539f9..5936c4483 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderStoryBoardEntry.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderStoryBoardEntry.java @@ -4,9 +4,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.simibubi.create.foundation.ponder.content.PonderChapter; -import com.simibubi.create.foundation.ponder.content.PonderTag; - import net.minecraft.resources.ResourceLocation; public class PonderStoryBoardEntry { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTag.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderTag.java similarity index 96% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderTag.java rename to src/main/java/com/simibubi/create/foundation/ponder/PonderTag.java index bae29b999..ade6f4a79 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTag.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderTag.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; @@ -7,8 +7,6 @@ import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.foundation.gui.element.GuiGameElement; import com.simibubi.create.foundation.gui.element.ScreenElement; -import com.simibubi.create.foundation.ponder.PonderLocalization; -import com.simibubi.create.foundation.ponder.PonderRegistry; import net.minecraft.client.gui.GuiComponent; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagRegistry.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderTagRegistry.java similarity index 98% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagRegistry.java rename to src/main/java/com/simibubi/create/foundation/ponder/PonderTagRegistry.java index 94017fc1f..cad0c1bab 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagRegistry.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderTagRegistry.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java index 8d4c56c92..fd62d19ab 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java @@ -5,6 +5,8 @@ import java.util.List; import com.google.common.base.Strings; import com.mojang.blaze3d.platform.InputConstants; import com.simibubi.create.foundation.gui.ScreenOpener; +import com.simibubi.create.foundation.ponder.ui.NavigatableSimiScreen; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.animation.LerpedFloat; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java index 4e9158eb6..4f69e1f7d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java @@ -13,7 +13,7 @@ import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.schematics.SchematicWorld; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.render.SuperRenderTypeBuffer; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.utility.worldWrappers.WrappedClientWorld; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java index 391c7efbd..3e4fa29bb 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java @@ -21,41 +21,41 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity; import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.MinecartElement; -import com.simibubi.create.foundation.ponder.elements.MinecartElement.MinecartConstructor; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.ParrotPose; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.SpinOnComponentPose; -import com.simibubi.create.foundation.ponder.elements.TextWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.AnimateMinecartInstruction; -import com.simibubi.create.foundation.ponder.instructions.AnimateParrotInstruction; -import com.simibubi.create.foundation.ponder.instructions.AnimateTileEntityInstruction; -import com.simibubi.create.foundation.ponder.instructions.AnimateWorldSectionInstruction; -import com.simibubi.create.foundation.ponder.instructions.ChaseAABBInstruction; -import com.simibubi.create.foundation.ponder.instructions.CreateMinecartInstruction; -import com.simibubi.create.foundation.ponder.instructions.CreateParrotInstruction; -import com.simibubi.create.foundation.ponder.instructions.DelayInstruction; -import com.simibubi.create.foundation.ponder.instructions.DisplayWorldSectionInstruction; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; -import com.simibubi.create.foundation.ponder.instructions.FadeOutOfSceneInstruction; -import com.simibubi.create.foundation.ponder.instructions.HighlightValueBoxInstruction; -import com.simibubi.create.foundation.ponder.instructions.KeyframeInstruction; -import com.simibubi.create.foundation.ponder.instructions.LineInstruction; -import com.simibubi.create.foundation.ponder.instructions.MarkAsFinishedInstruction; -import com.simibubi.create.foundation.ponder.instructions.MovePoiInstruction; -import com.simibubi.create.foundation.ponder.instructions.OutlineSelectionInstruction; -import com.simibubi.create.foundation.ponder.instructions.ReplaceBlocksInstruction; -import com.simibubi.create.foundation.ponder.instructions.RotateSceneInstruction; -import com.simibubi.create.foundation.ponder.instructions.ShowInputInstruction; -import com.simibubi.create.foundation.ponder.instructions.TextInstruction; -import com.simibubi.create.foundation.ponder.instructions.TileEntityDataInstruction; +import com.simibubi.create.foundation.ponder.element.AnimatedSceneElement; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.MinecartElement; +import com.simibubi.create.foundation.ponder.element.MinecartElement.MinecartConstructor; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.ParrotPose; +import com.simibubi.create.foundation.ponder.element.ParrotElement.SpinOnComponentPose; +import com.simibubi.create.foundation.ponder.element.TextWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.AnimateMinecartInstruction; +import com.simibubi.create.foundation.ponder.instruction.AnimateParrotInstruction; +import com.simibubi.create.foundation.ponder.instruction.AnimateTileEntityInstruction; +import com.simibubi.create.foundation.ponder.instruction.AnimateWorldSectionInstruction; +import com.simibubi.create.foundation.ponder.instruction.ChaseAABBInstruction; +import com.simibubi.create.foundation.ponder.instruction.CreateMinecartInstruction; +import com.simibubi.create.foundation.ponder.instruction.CreateParrotInstruction; +import com.simibubi.create.foundation.ponder.instruction.DelayInstruction; +import com.simibubi.create.foundation.ponder.instruction.DisplayWorldSectionInstruction; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.instruction.FadeOutOfSceneInstruction; +import com.simibubi.create.foundation.ponder.instruction.HighlightValueBoxInstruction; +import com.simibubi.create.foundation.ponder.instruction.KeyframeInstruction; +import com.simibubi.create.foundation.ponder.instruction.LineInstruction; +import com.simibubi.create.foundation.ponder.instruction.MarkAsFinishedInstruction; +import com.simibubi.create.foundation.ponder.instruction.MovePoiInstruction; +import com.simibubi.create.foundation.ponder.instruction.OutlineSelectionInstruction; +import com.simibubi.create.foundation.ponder.instruction.PonderInstruction; +import com.simibubi.create.foundation.ponder.instruction.ReplaceBlocksInstruction; +import com.simibubi.create.foundation.ponder.instruction.RotateSceneInstruction; +import com.simibubi.create.foundation.ponder.instruction.ShowInputInstruction; +import com.simibubi.create.foundation.ponder.instruction.TextInstruction; +import com.simibubi.create.foundation.ponder.instruction.TileEntityDataInstruction; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour; @@ -138,7 +138,7 @@ public class SceneBuilder { * @param title */ public void title(String sceneId, String title) { - scene.sceneId = new ResourceLocation(scene.namespace, sceneId); + scene.sceneId = new ResourceLocation(scene.getNamespace(), sceneId); PonderLocalization.registerSpecific(scene.sceneId, PonderScene.TITLE_KEY, title); } @@ -188,8 +188,8 @@ public class SceneBuilder { */ public void showBasePlate() { world.showSection( - scene.getSceneBuildingUtil().select.cuboid(new BlockPos(scene.basePlateOffsetX, 0, scene.basePlateOffsetZ), - new Vec3i(scene.basePlateSize - 1, 0, scene.basePlateSize - 1)), + scene.getSceneBuildingUtil().select.cuboid(new BlockPos(scene.getBasePlateOffsetX(), 0, scene.getBasePlateOffsetZ()), + new Vec3i(scene.getBasePlateSize() - 1, 0, scene.getBasePlateSize() - 1)), Direction.UP); } @@ -278,13 +278,13 @@ public class SceneBuilder { } public void superGlue(BlockPos pos, Direction side, boolean fullBlock) { - addInstruction(scene -> SuperGlueItem.spawnParticles(scene.world, pos, side, fullBlock)); + addInstruction(scene -> SuperGlueItem.spawnParticles(scene.getWorld(), pos, side, fullBlock)); } private void rotationIndicator(BlockPos pos, boolean direction) { addInstruction(scene -> { - BlockState blockState = scene.world.getBlockState(pos); - BlockEntity tileEntity = scene.world.getBlockEntity(pos); + BlockState blockState = scene.getWorld().getBlockState(pos); + BlockEntity tileEntity = scene.getWorld().getBlockEntity(pos); if (!(blockState.getBlock() instanceof KineticBlock)) return; @@ -307,7 +307,7 @@ public class SceneBuilder { .charAt(0)); for (int i = 0; i < 20; i++) - scene.world.addParticle(particleData, location.x, location.y, location.z, 0, 0, 0); + scene.getWorld().addParticle(particleData, location.x, location.y, location.z, 0, 0, 0); }); } @@ -526,7 +526,7 @@ public class SceneBuilder { } public void restoreBlocks(Selection selection) { - addInstruction(scene -> scene.world.restoreBlocks(selection)); + addInstruction(scene -> scene.getWorld().restoreBlocks(selection)); } public ElementLink makeSectionIndependent(Selection selection) { @@ -777,7 +777,7 @@ public class SceneBuilder { public void modifyTileEntity(BlockPos position, Class teType, Consumer consumer) { addInstruction(scene -> { - BlockEntity tileEntity = scene.world.getBlockEntity(position); + BlockEntity tileEntity = scene.getWorld().getBlockEntity(position); if (teType.isInstance(tileEntity)) consumer.accept(teType.cast(tileEntity)); }); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/ArmScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/ArmScenes.java index 1a1fb5fe9..489fa594d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/ArmScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/ArmScenes.java @@ -6,11 +6,12 @@ import com.simibubi.create.content.contraptions.components.crafter.MechanicalCra import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity.Phase; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/BearingScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/BearingScenes.java index 7e027644e..280d81cf6 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/BearingScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/BearingScenes.java @@ -5,11 +5,12 @@ import com.simibubi.create.content.contraptions.components.actors.HarvesterTileE import com.simibubi.create.content.contraptions.components.structureMovement.bearing.SailBlock; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/BeltScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/BeltScenes.java index 545e31cc2..7e42ff7ab 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/BeltScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/BeltScenes.java @@ -15,15 +15,16 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity.Phase; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FaceCursorPose; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FacePointOfInterestPose; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FaceCursorPose; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FacePointOfInterestPose; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/CartAssemblerScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/CartAssemblerScenes.java index 1e2656d0c..6091b89a3 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/CartAssemblerScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/CartAssemblerScenes.java @@ -5,14 +5,15 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssembleRailType; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.MinecartElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.MinecartElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/ChainDriveScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/ChainDriveScenes.java index 686b9f7b3..73984829c 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/ChainDriveScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/ChainDriveScenes.java @@ -3,12 +3,13 @@ package com.simibubi.create.foundation.ponder.content; import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.TextWindowElement.Builder; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.TextWindowElement.Builder; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/ChassisScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/ChassisScenes.java index 0698aa79b..6799f54b3 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/ChassisScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/ChassisScenes.java @@ -6,12 +6,13 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/ChuteScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/ChuteScenes.java index 899db4353..8672254d6 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/ChuteScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/ChuteScenes.java @@ -8,12 +8,13 @@ import com.simibubi.create.content.logistics.block.chute.ChuteBlock; import com.simibubi.create.content.logistics.block.chute.ChuteBlock.Shape; import com.simibubi.create.content.logistics.block.chute.SmartChuteTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/CrafterScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/CrafterScenes.java index 1b883c3a4..ca3599d9c 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/CrafterScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/CrafterScenes.java @@ -8,11 +8,12 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/DebugScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/DebugScenes.java index 9aa632f3d..196bb65a6 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/DebugScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/DebugScenes.java @@ -5,16 +5,17 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderStoryBoardEntry.PonderStoryBoard; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.DancePose; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FacePointOfInterestPose; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.DancePose; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FacePointOfInterestPose; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import com.tterrag.registrate.util.entry.ItemEntry; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/DeployerScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/DeployerScenes.java index 14918720a..e24662732 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/DeployerScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/DeployerScenes.java @@ -4,14 +4,15 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity; import com.simibubi.create.content.curiosities.tools.SandPaperItem; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/EjectorScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/EjectorScenes.java index 2b71a8261..d3a714128 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/EjectorScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/EjectorScenes.java @@ -4,12 +4,13 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.content.logistics.block.depot.EjectorTileEntity; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/FanScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/FanScenes.java index aae951c5f..6a778be0b 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/FanScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/FanScenes.java @@ -4,16 +4,17 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.logistics.block.depot.DepotTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FlappyPose; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FlappyPose; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/FunnelScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/FunnelScenes.java index dfc3d68a9..5fe639aea 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/FunnelScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/FunnelScenes.java @@ -6,12 +6,13 @@ import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock; import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/GantryScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/GantryScenes.java index fad3f5f2d..414d89c19 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/GantryScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/GantryScenes.java @@ -1,10 +1,11 @@ package com.simibubi.create.foundation.ponder.content; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/KineticsScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/KineticsScenes.java index 0be13791f..e698d5b90 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/KineticsScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/KineticsScenes.java @@ -13,12 +13,13 @@ import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import com.tterrag.registrate.util.entry.BlockEntry; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalDrillScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalDrillScenes.java index 494a840fe..74db92edf 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalDrillScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalDrillScenes.java @@ -4,9 +4,9 @@ import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalSawScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalSawScenes.java index 3b40e7fb4..29715ce43 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalSawScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/MechanicalSawScenes.java @@ -4,12 +4,13 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/MovementActorScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/MovementActorScenes.java index 8f0d8045d..0cd882d02 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/MovementActorScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/MovementActorScenes.java @@ -5,14 +5,15 @@ import com.simibubi.create.content.contraptions.components.actors.PortableItemIn import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FlappyPose; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FlappyPose; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PistonScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PistonScenes.java index 316067bb0..3624fb0c4 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PistonScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PistonScenes.java @@ -2,13 +2,14 @@ package com.simibubi.create.foundation.ponder.content; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonHeadBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement.FaceCursorPose; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement.FaceCursorPose; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; 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 04e0c1de5..20f6b46d8 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 @@ -5,6 +5,7 @@ import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.foundation.ponder.PonderRegistrationHelper; import com.simibubi.create.foundation.ponder.PonderRegistry; +import com.simibubi.create.foundation.ponder.PonderTag; import com.simibubi.create.foundation.ponder.content.fluid.DrainScenes; import com.simibubi.create.foundation.ponder.content.fluid.FluidMovementActorScenes; import com.simibubi.create.foundation.ponder.content.fluid.FluidTankScenes; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/ProcessingScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/ProcessingScenes.java index 53a7be260..fb79e7005 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/ProcessingScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/ProcessingScenes.java @@ -14,14 +14,15 @@ import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlo import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; import com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.EntityElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.EntityElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.IntAttached; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.NBTHelper; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PulleyScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PulleyScenes.java index 9b7f8b20c..0c6ccb5da 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PulleyScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PulleyScenes.java @@ -1,11 +1,12 @@ package com.simibubi.create.foundation.ponder.content; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java index 409b682f1..c6ee04b40 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java @@ -14,12 +14,13 @@ import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/TunnelScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/TunnelScenes.java index 4298b9e26..076a44f0e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/TunnelScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/TunnelScenes.java @@ -8,10 +8,11 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.SidedFilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour; import com.simibubi.create.foundation.utility.Iterate; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/DrainScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/DrainScenes.java index 46a87e309..a5553a79d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/DrainScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/DrainScenes.java @@ -5,8 +5,8 @@ import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidMovementActorScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidMovementActorScenes.java index 1b36d2ebd..a211fcc03 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidMovementActorScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidMovementActorScenes.java @@ -5,12 +5,12 @@ import com.simibubi.create.content.contraptions.components.actors.PortableFluidI import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidTankScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidTankScenes.java index 2ec9a5d38..e7d46d6a6 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidTankScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/FluidTankScenes.java @@ -13,13 +13,13 @@ import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/HosePulleyScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/HosePulleyScenes.java index 7a82c4503..accb2ab6a 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/HosePulleyScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/HosePulleyScenes.java @@ -7,11 +7,11 @@ import java.util.List; import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyFluidHandler; import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PipeScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PipeScenes.java index c87ecbc62..891b07235 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PipeScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PipeScenes.java @@ -14,12 +14,12 @@ import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.processing.BasinTileEntity; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour; import com.simibubi.create.foundation.utility.Pointing; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PumpScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PumpScenes.java index dee73c25d..298af869f 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PumpScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/PumpScenes.java @@ -7,12 +7,12 @@ import com.simibubi.create.content.contraptions.fluids.pipes.GlassFluidPipeBlock import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/SpoutScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/SpoutScenes.java index 785431b84..8f86f5d70 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/SpoutScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/fluid/SpoutScenes.java @@ -7,14 +7,14 @@ import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; -import com.simibubi.create.foundation.ponder.elements.BeltItemElement; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; -import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter; +import com.simibubi.create.foundation.ponder.element.BeltItemElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedOverlayElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedOverlayElement.java similarity index 87% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedOverlayElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedOverlayElement.java index 19bbd1334..27d1ff57d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedOverlayElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedOverlayElement.java @@ -1,8 +1,8 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.PonderUI; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.animation.LerpedFloat; public abstract class AnimatedOverlayElement extends PonderOverlayElement { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedSceneElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedSceneElement.java similarity index 97% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedSceneElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedSceneElement.java index 34e93728b..a8c8b7258 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/AnimatedSceneElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/AnimatedSceneElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/BeltItemElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/BeltItemElement.java similarity index 81% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/BeltItemElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/BeltItemElement.java index 4935b3da4..79640d5bc 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/BeltItemElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/BeltItemElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/EntityElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/EntityElement.java similarity index 82% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/EntityElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/EntityElement.java index 317c2a9e6..3c3d5b30c 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/EntityElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/EntityElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/InputWindowElement.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/InputWindowElement.java index 3f1fb07da..cc2fcbbb7 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/InputWindowElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; @@ -7,9 +7,9 @@ import com.simibubi.create.Create; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.element.GuiGameElement; import com.simibubi.create.foundation.ponder.PonderLocalization; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.content.PonderPalette; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.client.gui.Font; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/MinecartElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/MinecartElement.java similarity index 98% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/MinecartElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/MinecartElement.java index 4a96afb4e..deded1210 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/MinecartElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/MinecartElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/OutlinerElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/OutlinerElement.java similarity index 94% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/OutlinerElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/OutlinerElement.java index 44773221a..894397474 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/OutlinerElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/OutlinerElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import java.util.function.Function; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/ParrotElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/ParrotElement.java similarity index 98% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/ParrotElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/ParrotElement.java index ac07defce..134736dc5 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/ParrotElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/ParrotElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import java.util.function.Supplier; @@ -8,8 +8,8 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.PonderUI; import com.simibubi.create.foundation.ponder.PonderWorld; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderElement.java similarity index 73% rename from src/main/java/com/simibubi/create/foundation/ponder/PonderElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/PonderElement.java index 5b7df27ac..f8f63dc09 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderElement.java @@ -1,4 +1,6 @@ -package com.simibubi.create.foundation.ponder; +package com.simibubi.create.foundation.ponder.element; + +import com.simibubi.create.foundation.ponder.PonderScene; public class PonderElement { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/PonderOverlayElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderOverlayElement.java similarity index 64% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/PonderOverlayElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/PonderOverlayElement.java index aa1501b5e..9808d3d18 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/PonderOverlayElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderOverlayElement.java @@ -1,9 +1,8 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.foundation.ponder.PonderElement; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.PonderUI; +import com.simibubi.create.foundation.ponder.ui.PonderUI; public abstract class PonderOverlayElement extends PonderElement { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/PonderSceneElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderSceneElement.java similarity index 84% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/PonderSceneElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/PonderSceneElement.java index ed2e1ca40..b5f5211fa 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/PonderSceneElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/PonderSceneElement.java @@ -1,7 +1,6 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.foundation.ponder.PonderElement; import com.simibubi.create.foundation.ponder.PonderWorld; import net.minecraft.client.renderer.MultiBufferSource; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/TextWindowElement.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/TextWindowElement.java index 437f71e21..fd456a496 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/TextWindowElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import java.util.List; import java.util.function.Supplier; @@ -8,9 +8,9 @@ import com.mojang.math.Matrix4f; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.element.BoxElement; import com.simibubi.create.foundation.ponder.PonderLocalization; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.content.PonderPalette; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.Color; import net.minecraft.network.chat.FormattedText; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/TrackedElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/TrackedElement.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/TrackedElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/TrackedElement.java index 8c66bcdd3..bcf5fa776 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/TrackedElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/TrackedElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import java.lang.ref.WeakReference; import java.util.function.Consumer; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/WorldSectionElement.java b/src/main/java/com/simibubi/create/foundation/ponder/element/WorldSectionElement.java similarity index 99% rename from src/main/java/com/simibubi/create/foundation/ponder/elements/WorldSectionElement.java rename to src/main/java/com/simibubi/create/foundation/ponder/element/WorldSectionElement.java index dccffa6ae..11a1ca661 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/WorldSectionElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/element/WorldSectionElement.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.elements; +package com.simibubi.create.foundation.ponder.element; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateElementInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateElementInstruction.java similarity index 91% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateElementInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateElementInstruction.java index 1d9183d6a..9df762631 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateElementInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateElementInstruction.java @@ -1,11 +1,11 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.BiConsumer; import java.util.function.Function; import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.elements.PonderSceneElement; +import com.simibubi.create.foundation.ponder.element.PonderSceneElement; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateMinecartInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateMinecartInstruction.java similarity index 88% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateMinecartInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateMinecartInstruction.java index de49e865b..3dc1df60a 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateMinecartInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateMinecartInstruction.java @@ -1,10 +1,10 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.BiConsumer; import java.util.function.Function; import com.simibubi.create.foundation.ponder.ElementLink; -import com.simibubi.create.foundation.ponder.elements.MinecartElement; +import com.simibubi.create.foundation.ponder.element.MinecartElement; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateParrotInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateParrotInstruction.java similarity index 88% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateParrotInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateParrotInstruction.java index 7a7165b9f..27b86461e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateParrotInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateParrotInstruction.java @@ -1,10 +1,10 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.BiConsumer; import java.util.function.Function; import com.simibubi.create.foundation.ponder.ElementLink; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateTileEntityInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateTileEntityInstruction.java similarity index 98% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateTileEntityInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateTileEntityInstruction.java index 82e1f7b8e..373727e8e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateTileEntityInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateTileEntityInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.Optional; import java.util.function.BiConsumer; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateWorldSectionInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateWorldSectionInstruction.java similarity index 89% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateWorldSectionInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateWorldSectionInstruction.java index 7bce8fbab..afb362a47 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/AnimateWorldSectionInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/AnimateWorldSectionInstruction.java @@ -1,10 +1,10 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.BiConsumer; import java.util.function.Function; import com.simibubi.create.foundation.ponder.ElementLink; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ChaseAABBInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ChaseAABBInstruction.java similarity index 81% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/ChaseAABBInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/ChaseAABBInstruction.java index 3472b54b9..9370df375 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ChaseAABBInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ChaseAABBInstruction.java @@ -1,7 +1,7 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.content.PonderPalette; import net.minecraft.world.phys.AABB; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateMinecartInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateMinecartInstruction.java similarity index 74% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateMinecartInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateMinecartInstruction.java index 0ed9c774a..efd187fe4 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateMinecartInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateMinecartInstruction.java @@ -1,6 +1,6 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.elements.MinecartElement; +import com.simibubi.create.foundation.ponder.element.MinecartElement; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateParrotInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateParrotInstruction.java similarity index 74% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateParrotInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateParrotInstruction.java index 80ebfc806..32ec9153b 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/CreateParrotInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/CreateParrotInstruction.java @@ -1,6 +1,6 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.elements.ParrotElement; +import com.simibubi.create.foundation.ponder.element.ParrotElement; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/DelayInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/DelayInstruction.java similarity index 67% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/DelayInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/DelayInstruction.java index 0965aa74b..a112b8599 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/DelayInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/DelayInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; public class DelayInstruction extends TickingInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/DisplayWorldSectionInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/DisplayWorldSectionInstruction.java similarity index 92% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/DisplayWorldSectionInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/DisplayWorldSectionInstruction.java index 67d6e5ecf..b809239de 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/DisplayWorldSectionInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/DisplayWorldSectionInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.Optional; import java.util.function.Supplier; @@ -8,7 +8,7 @@ import javax.annotation.Nullable; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueItem; import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/EmitParticlesInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/EmitParticlesInstruction.java similarity index 96% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/EmitParticlesInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/EmitParticlesInstruction.java index 223ab83fa..6c19f81e0 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/EmitParticlesInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/EmitParticlesInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.Create; import com.simibubi.create.foundation.ponder.PonderScene; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeInOutInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeInOutInstruction.java similarity index 94% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeInOutInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeInOutInstruction.java index a7f195ffe..6860d2565 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeInOutInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeInOutInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.PonderScene; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeIntoSceneInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeIntoSceneInstruction.java similarity index 91% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeIntoSceneInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeIntoSceneInstruction.java index 2f3537c8c..ab3ee8f7e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeIntoSceneInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeIntoSceneInstruction.java @@ -1,8 +1,8 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement; +import com.simibubi.create.foundation.ponder.element.AnimatedSceneElement; import net.minecraft.core.Direction; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeOutOfSceneInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeOutOfSceneInstruction.java similarity index 89% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeOutOfSceneInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeOutOfSceneInstruction.java index 5cc438f14..249f54f73 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/FadeOutOfSceneInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/FadeOutOfSceneInstruction.java @@ -1,8 +1,8 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement; +import com.simibubi.create.foundation.ponder.element.AnimatedSceneElement; import net.minecraft.core.Direction; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/HideAllInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/HideAllInstruction.java similarity index 87% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/HideAllInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/HideAllInstruction.java index e901ece96..89ea2a8fb 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/HideAllInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/HideAllInstruction.java @@ -1,8 +1,8 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.elements.AnimatedOverlayElement; -import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement; +import com.simibubi.create.foundation.ponder.element.AnimatedOverlayElement; +import com.simibubi.create.foundation.ponder.element.AnimatedSceneElement; import net.minecraft.core.Direction; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/HighlightValueBoxInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/HighlightValueBoxInstruction.java similarity index 85% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/HighlightValueBoxInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/HighlightValueBoxInstruction.java index aafbae409..0af8b6ad7 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/HighlightValueBoxInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/HighlightValueBoxInstruction.java @@ -1,7 +1,7 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.content.PonderPalette; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/KeyframeInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/KeyframeInstruction.java similarity index 84% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/KeyframeInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/KeyframeInstruction.java index 8bc6ea00a..765e5efe1 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/KeyframeInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/KeyframeInstruction.java @@ -1,6 +1,5 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; public class KeyframeInstruction extends PonderInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/LineInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/LineInstruction.java similarity index 81% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/LineInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/LineInstruction.java index 27530110f..6e0d52184 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/LineInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/LineInstruction.java @@ -1,7 +1,7 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.content.PonderPalette; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/MarkAsFinishedInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/MarkAsFinishedInstruction.java similarity index 74% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/MarkAsFinishedInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/MarkAsFinishedInstruction.java index ef15e46dd..31d3a17c7 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/MarkAsFinishedInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/MarkAsFinishedInstruction.java @@ -1,6 +1,5 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; public class MarkAsFinishedInstruction extends PonderInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/MovePoiInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/MovePoiInstruction.java similarity index 75% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/MovePoiInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/MovePoiInstruction.java index 8a4dab91f..4b4391341 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/MovePoiInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/MovePoiInstruction.java @@ -1,6 +1,5 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/OutlineSelectionInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/OutlineSelectionInstruction.java similarity index 83% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/OutlineSelectionInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/OutlineSelectionInstruction.java index 23207f9fc..85510775b 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/OutlineSelectionInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/OutlineSelectionInstruction.java @@ -1,8 +1,8 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; +import com.simibubi.create.foundation.ponder.PonderPalette; import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.content.PonderPalette; public class OutlineSelectionInstruction extends TickingInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/PonderInstruction.java similarity index 86% rename from src/main/java/com/simibubi/create/foundation/ponder/PonderInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/PonderInstruction.java index 1309d33f0..48bcb49b2 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/PonderInstruction.java @@ -1,7 +1,9 @@ -package com.simibubi.create.foundation.ponder; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.Consumer; +import com.simibubi.create.foundation.ponder.PonderScene; + public abstract class PonderInstruction { public boolean isBlocking() { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ReplaceBlocksInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ReplaceBlocksInstruction.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/ReplaceBlocksInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/ReplaceBlocksInstruction.java index 231a512bf..219ad9bfd 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ReplaceBlocksInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ReplaceBlocksInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.UnaryOperator; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/RotateSceneInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/RotateSceneInstruction.java similarity index 88% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/RotateSceneInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/RotateSceneInstruction.java index 9edec76fc..ade54ac01 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/RotateSceneInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/RotateSceneInstruction.java @@ -1,6 +1,5 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ShowInputInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ShowInputInstruction.java similarity index 81% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/ShowInputInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/ShowInputInstruction.java index 4a1864478..b94ddbadd 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/ShowInputInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/ShowInputInstruction.java @@ -1,7 +1,7 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.PonderScene; -import com.simibubi.create.foundation.ponder.elements.InputWindowElement; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; public class ShowInputInstruction extends FadeInOutInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TextInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TextInstruction.java similarity index 85% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/TextInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/TextInstruction.java index d0380cc81..2b81b5805 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TextInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TextInstruction.java @@ -1,9 +1,9 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.OutlinerElement; -import com.simibubi.create.foundation.ponder.elements.TextWindowElement; +import com.simibubi.create.foundation.ponder.element.OutlinerElement; +import com.simibubi.create.foundation.ponder.element.TextWindowElement; public class TextInstruction extends FadeInOutInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TickingInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TickingInstruction.java similarity index 88% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/TickingInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/TickingInstruction.java index 93f2b5a03..fc5549b50 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TickingInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TickingInstruction.java @@ -1,6 +1,5 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; public abstract class TickingInstruction extends PonderInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TileEntityDataInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TileEntityDataInstruction.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/TileEntityDataInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/TileEntityDataInstruction.java index deb5d8c57..65de59767 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/TileEntityDataInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/TileEntityDataInstruction.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; import java.util.function.UnaryOperator; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/instructions/WorldModifyInstruction.java b/src/main/java/com/simibubi/create/foundation/ponder/instruction/WorldModifyInstruction.java similarity index 77% rename from src/main/java/com/simibubi/create/foundation/ponder/instructions/WorldModifyInstruction.java rename to src/main/java/com/simibubi/create/foundation/ponder/instruction/WorldModifyInstruction.java index 583514b67..3640fcc40 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/instructions/WorldModifyInstruction.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/instruction/WorldModifyInstruction.java @@ -1,9 +1,8 @@ -package com.simibubi.create.foundation.ponder.instructions; +package com.simibubi.create.foundation.ponder.instruction; -import com.simibubi.create.foundation.ponder.PonderInstruction; import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.Selection; -import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; public abstract class WorldModifyInstruction extends PonderInstruction { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/ui/ChapterLabel.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/ChapterLabel.java index 1429bd876..b32dbfe97 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/ui/ChapterLabel.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/ChapterLabel.java @@ -8,7 +8,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.widget.AbstractSimiWidget; -import com.simibubi.create.foundation.ponder.content.PonderChapter; +import com.simibubi.create.foundation.ponder.PonderChapter; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/NavigatableSimiScreen.java similarity index 98% rename from src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/NavigatableSimiScreen.java index b1cc3a9e8..ffd33428a 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/NavigatableSimiScreen.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder; +package com.simibubi.create.foundation.ponder.ui; import java.util.List; import java.util.Optional; @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.UIRenderHelper; -import com.simibubi.create.foundation.ponder.ui.PonderButton; +import com.simibubi.create.foundation.ponder.PonderLocalization; import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.animation.LerpedFloat; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderButton.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderButton.java index e5e700afa..cf2311b50 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderButton.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderButton.java @@ -9,7 +9,7 @@ import com.simibubi.create.foundation.gui.element.GuiGameElement; import com.simibubi.create.foundation.gui.element.RenderElement; import com.simibubi.create.foundation.gui.widget.BoxWidget; import com.simibubi.create.foundation.gui.widget.ElementWidget; -import com.simibubi.create.foundation.ponder.content.PonderTag; +import com.simibubi.create.foundation.ponder.PonderTag; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.animation.LerpedFloat; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderIndexScreen.java similarity index 94% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/PonderIndexScreen.java index 8a9c43503..17e337439 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderIndexScreen.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder.ui; import java.util.ArrayList; import java.util.List; @@ -12,12 +12,8 @@ import com.simibubi.create.content.contraptions.components.crank.ValveHandleBloc import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.UIRenderHelper; -import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; +import com.simibubi.create.foundation.ponder.PonderChapter; import com.simibubi.create.foundation.ponder.PonderRegistry; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.ui.ChapterLabel; -import com.simibubi.create.foundation.ponder.ui.LayoutHelper; -import com.simibubi.create.foundation.ponder.ui.PonderButton; import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.renderer.Rect2i; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderProgressBar.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderProgressBar.java similarity index 80% rename from src/main/java/com/simibubi/create/foundation/ponder/PonderProgressBar.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/PonderProgressBar.java index a438e9a44..aea0edeac 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderProgressBar.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderProgressBar.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder; +package com.simibubi.create.foundation.ponder.ui; import javax.annotation.Nonnull; @@ -6,9 +6,9 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.element.BoxElement; import com.simibubi.create.foundation.gui.widget.AbstractSimiWidget; +import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import it.unimi.dsi.fastutil.ints.IntList; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.sounds.SoundManager; @@ -36,7 +36,7 @@ public class PonderProgressBar extends AbstractSimiWidget { @Override protected boolean clicked(double mouseX, double mouseY) { - return this.active && this.visible && !ponder.getActiveScene().keyframeTimes.isEmpty() + return this.active && this.visible && ponder.getActiveScene().getKeyframeCount() > 0 && mouseX >= (double) this.x && mouseX < (double) (this.x + this.width + 4) && mouseY >= (double) this.y - 3 && mouseY < (double) (this.y + this.height + 20); } @@ -44,39 +44,36 @@ public class PonderProgressBar extends AbstractSimiWidget { @Override public void onClick(double mouseX, double mouseY) { PonderScene activeScene = ponder.getActiveScene(); - IntList keyframeTimes = activeScene.keyframeTimes; int keyframeIndex = getHoveredKeyframeIndex(activeScene, mouseX); if (keyframeIndex == -1) ponder.seekToTime(0); - else if (keyframeIndex == keyframeTimes.size()) - ponder.seekToTime(activeScene.totalTime); + else if (keyframeIndex == activeScene.getKeyframeCount()) + ponder.seekToTime(activeScene.getTotalTime()); else - ponder.seekToTime(keyframeTimes.getInt(keyframeIndex)); + ponder.seekToTime(activeScene.getKeyframeTime(keyframeIndex)); } public int getHoveredKeyframeIndex(PonderScene activeScene, double mouseX) { - IntList keyframeTimes = activeScene.keyframeTimes; - - int totalTime = activeScene.totalTime; + int totalTime = activeScene.getTotalTime(); int clickedAtTime = (int) ((mouseX - x) / ((double) width + 4) * totalTime); { - int lastKeyframeTime = keyframeTimes.getInt(keyframeTimes.size() - 1); + int lastKeyframeTime = activeScene.getKeyframeTime(activeScene.getKeyframeCount() - 1); int diffToEnd = totalTime - clickedAtTime; int diffToLast = clickedAtTime - lastKeyframeTime; if (diffToEnd > 0 && diffToEnd < diffToLast / 2) { - return keyframeTimes.size(); + return activeScene.getKeyframeCount(); } } int index = -1; - for (int i = 0; i < keyframeTimes.size(); i++) { - int keyframeTime = keyframeTimes.getInt(i); + for (int i = 0; i < activeScene.getKeyframeCount(); i++) { + int keyframeTime = activeScene.getKeyframeTime(i); if (keyframeTime > clickedAtTime) break; @@ -129,16 +126,15 @@ public class PonderProgressBar extends AbstractSimiWidget { } else { hoverIndex = -2; } - IntList keyframeTimes = activeScene.keyframeTimes; if (hoverIndex == -1) drawKeyframe(ms, activeScene, true, 0, 0, hoverStartColor, hoverEndColor, 8); - else if (hoverIndex == keyframeTimes.size()) - drawKeyframe(ms, activeScene, true, activeScene.totalTime, width + 4, hoverStartColor, hoverEndColor, 8); + else if (hoverIndex == activeScene.getKeyframeCount()) + drawKeyframe(ms, activeScene, true, activeScene.getTotalTime(), width + 4, hoverStartColor, hoverEndColor, 8); - for (int i = 0; i < keyframeTimes.size(); i++) { - int keyframeTime = keyframeTimes.getInt(i); - int keyframePos = (int) (((float) keyframeTime) / ((float) activeScene.totalTime) * (width + 4)); + for (int i = 0; i < activeScene.getKeyframeCount(); i++) { + int keyframeTime = activeScene.getKeyframeTime(i); + int keyframePos = (int) (((float) keyframeTime) / ((float) activeScene.getTotalTime()) * (width + 4)); boolean selected = i == hoverIndex; int startColor = selected ? hoverStartColor : idleStartColor; @@ -159,7 +155,7 @@ public class PonderProgressBar extends AbstractSimiWidget { ms.translate(0, 0, 100); String text; int offset; - if (activeScene.currentTime < keyframeTime) { + if (activeScene.getCurrentTime() < keyframeTime) { text = ">"; offset = -1 - font.width(text); } else { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagIndexScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagIndexScreen.java similarity index 96% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagIndexScreen.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagIndexScreen.java index 1419479ec..7fa8479c3 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagIndexScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagIndexScreen.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder.ui; import java.util.List; import java.util.Optional; @@ -14,12 +14,9 @@ import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.element.BoxElement; import com.simibubi.create.foundation.gui.element.GuiGameElement; import com.simibubi.create.foundation.item.TooltipHelper; -import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; import com.simibubi.create.foundation.ponder.PonderLocalization; import com.simibubi.create.foundation.ponder.PonderRegistry; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.ui.LayoutHelper; -import com.simibubi.create.foundation.ponder.ui.PonderButton; +import com.simibubi.create.foundation.ponder.PonderTag; import com.simibubi.create.foundation.utility.FontHelper; import com.simibubi.create.foundation.utility.Lang; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagScreen.java similarity index 96% rename from src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagScreen.java index ea24bf7bb..123ad260e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagScreen.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder.content; +package com.simibubi.create.foundation.ponder.ui; import java.util.ArrayList; import java.util.List; @@ -12,13 +12,10 @@ import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.element.BoxElement; -import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; +import com.simibubi.create.foundation.ponder.PonderChapter; import com.simibubi.create.foundation.ponder.PonderLocalization; import com.simibubi.create.foundation.ponder.PonderRegistry; -import com.simibubi.create.foundation.ponder.PonderUI; -import com.simibubi.create.foundation.ponder.ui.ChapterLabel; -import com.simibubi.create.foundation.ponder.ui.LayoutHelper; -import com.simibubi.create.foundation.ponder.ui.PonderButton; +import com.simibubi.create.foundation.ponder.PonderTag; import com.simibubi.create.foundation.utility.FontHelper; import com.simibubi.create.foundation.utility.Lang; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java similarity index 95% rename from src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java rename to src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java index b7ee89ab2..35a7da83d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java @@ -1,4 +1,4 @@ -package com.simibubi.create.foundation.ponder; +package com.simibubi.create.foundation.ponder.ui; import static com.simibubi.create.foundation.ponder.PonderLocalization.LANG_PREFIX; @@ -22,14 +22,16 @@ import com.simibubi.create.foundation.gui.Theme; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.element.BoxElement; import com.simibubi.create.foundation.gui.element.GuiGameElement; +import com.simibubi.create.foundation.ponder.PonderChapter; +import com.simibubi.create.foundation.ponder.PonderRegistry; +import com.simibubi.create.foundation.ponder.PonderScene; import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform; +import com.simibubi.create.foundation.ponder.PonderStoryBoardEntry; +import com.simibubi.create.foundation.ponder.PonderTag; +import com.simibubi.create.foundation.ponder.PonderWorld; import com.simibubi.create.foundation.ponder.content.DebugScenes; -import com.simibubi.create.foundation.ponder.content.PonderChapter; import com.simibubi.create.foundation.ponder.content.PonderIndex; -import com.simibubi.create.foundation.ponder.content.PonderTag; -import com.simibubi.create.foundation.ponder.content.PonderTagScreen; -import com.simibubi.create.foundation.ponder.elements.TextWindowElement; -import com.simibubi.create.foundation.ponder.ui.PonderButton; +import com.simibubi.create.foundation.ponder.element.TextWindowElement; import com.simibubi.create.foundation.render.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Couple; @@ -130,7 +132,7 @@ public class PonderUI extends NavigatableSimiScreen { } PonderUI(List scenes) { - ResourceLocation component = scenes.get(0).component; + ResourceLocation component = scenes.get(0).getComponent(); if (ForgeRegistries.ITEMS.containsKey(component)) stack = new ItemStack(ForgeRegistries.ITEMS.getValue(component)); else @@ -269,7 +271,7 @@ public class PonderUI extends NavigatableSimiScreen { if (referredToByTag != null) { for (int i = 0; i < scenes.size(); i++) { PonderScene ponderScene = scenes.get(i); - if (!ponderScene.tags.contains(referredToByTag)) + if (!ponderScene.getTags().contains(referredToByTag)) continue; if (i == index) break; @@ -311,7 +313,7 @@ public class PonderUI extends NavigatableSimiScreen { } else extendedTickTimer--; - if (activeScene.currentTime == activeScene.totalTime - 1) + if (activeScene.getCurrentTime() == activeScene.getTotalTime() - 1) finishingFlashWarmup = 30; if (finishingFlashWarmup > 0) { finishingFlashWarmup--; @@ -329,7 +331,7 @@ public class PonderUI extends NavigatableSimiScreen { } public void seekToTime(int time) { - if (getActiveScene().currentTime > time) + if (getActiveScene().getCurrentTime() > time) replay(); getActiveScene().seekToTime(time); @@ -366,7 +368,7 @@ public class PonderUI extends NavigatableSimiScreen { PonderScene scene = scenes.get(index); if (hasShiftDown()) { - List list = PonderRegistry.ALL.get(scene.component); + List list = PonderRegistry.ALL.get(scene.getComponent()); PonderStoryBoardEntry sb = list.get(index); StructureTemplate activeTemplate = PonderRegistry.loadSchematic(sb.getSchematicLocation()); PonderWorld world = new PonderWorld(BlockPos.ZERO, Minecraft.getInstance().level); @@ -435,9 +437,9 @@ public class PonderUI extends NavigatableSimiScreen { ms.pushPose(); // ms.translate(0, 0, -800); - story.transform.updateScreenParams(width, height, slide); - story.transform.apply(ms, partialTicks, false); - story.transform.updateSceneRVE(partialTicks); + story.getTransform().updateScreenParams(width, height, slide); + story.getTransform().apply(ms, partialTicks, false); + story.getTransform().updateSceneRVE(partialTicks); story.renderScene(buffer, ms, partialTicks); buffer.draw(); @@ -449,7 +451,7 @@ public class PonderUI extends NavigatableSimiScreen { RenderSystem.enableCull(); RenderSystem.enableDepthTest(); ms.pushPose(); - ms.translate(story.basePlateOffsetX, 0, story.basePlateOffsetZ); + ms.translate(story.getBasePlateOffsetX(), 0, story.getBasePlateOffsetZ()); UIRenderHelper.flipForGuiRender(ms); float flash = finishingFlash.getValue(partialTicks) * .9f; @@ -460,20 +462,20 @@ public class PonderUI extends NavigatableSimiScreen { flash = 1 - flash; for (int f = 0; f < 4; f++) { - ms.translate(story.basePlateSize, 0, 0); + ms.translate(story.getBasePlateSize(), 0, 0); ms.pushPose(); ms.translate(0, 0, -1 / 1024f); if (flash > 0) { ms.pushPose(); ms.scale(1, .5f + flash * .75f, 1); GuiUtils.drawGradientRect(ms.last() - .pose(), 0, 0, -1, -story.basePlateSize, 0, 0x00_c6ffc9, + .pose(), 0, 0, -1, -story.getBasePlateSize(), 0, 0x00_c6ffc9, new Color(0xaa_c6ffc9).scaleAlpha(alpha).getRGB()); ms.popPose(); } ms.translate(0, 0, 2 / 1024f); GuiUtils.drawGradientRect(ms.last() - .pose(), 0, 0, 0, -story.basePlateSize, 4, 0x66_000000, 0x00_000000); + .pose(), 0, 0, 0, -story.getBasePlateSize(), 4, 0x66_000000, 0x00_000000); ms.popPose(); ms.mulPose(Vector3f.YP.rotationDegrees(-90)); } @@ -680,7 +682,7 @@ public class PonderUI extends NavigatableSimiScreen { right.dim(); // Tags - List sceneTags = activeScene.tags; + List sceneTags = activeScene.getTags(); boolean highlightAll = sceneTags.contains(PonderTag.Highlight.ALL); double s = Minecraft.getInstance() .getWindow() diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java index 059ac689a..dec20e4b0 100644 --- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java @@ -4,7 +4,6 @@ import com.jozufozu.flywheel.util.BufferBuilderReader; import com.jozufozu.flywheel.util.transform.Rotate; import com.jozufozu.flywheel.util.transform.Scale; import com.jozufozu.flywheel.util.transform.TStack; -import com.jozufozu.flywheel.util.transform.TransformStack; import com.jozufozu.flywheel.util.transform.Translate; import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/SidedFilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/SidedFilteringBehaviour.java index be678d142..2f12902c9 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/SidedFilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/SidedFilteringBehaviour.java @@ -16,10 +16,10 @@ import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants.NBT; public class SidedFilteringBehaviour extends FilteringBehaviour { @@ -74,7 +74,7 @@ public class SidedFilteringBehaviour extends FilteringBehaviour { @Override public void read(CompoundTag nbt, boolean clientPacket) { - NBTHelper.iterateCompoundList(nbt.getList("Filters", NBT.TAG_COMPOUND), compound -> { + NBTHelper.iterateCompoundList(nbt.getList("Filters", Tag.TAG_COMPOUND), compound -> { Direction face = Direction.from3DDataValue(compound.getInt("Side")); if (sidedFilters.containsKey(face)) sidedFilters.get(face) diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java index d11a87499..1b237343e 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; -import net.minecraftforge.common.util.Constants.NBT; +import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -181,7 +181,7 @@ public class SmartFluidTankBehaviour extends TileEntityBehaviour { public void read(CompoundTag nbt, boolean clientPacket) { super.read(nbt, clientPacket); MutableInt index = new MutableInt(0); - NBTHelper.iterateCompoundList(nbt.getList(getType().getName() + "Tanks", NBT.TAG_COMPOUND), c -> { + NBTHelper.iterateCompoundList(nbt.getList(getType().getName() + "Tanks", Tag.TAG_COMPOUND), c -> { if (index.intValue() >= tanks.length) return; tanks[index.intValue()].readNBT(c, clientPacket); diff --git a/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java b/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java index 2b22b2fe6..9742d9b7e 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java +++ b/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java @@ -1,7 +1,7 @@ package com.simibubi.create.foundation.utility; -import com.simibubi.create.foundation.ponder.PonderUI; import com.simibubi.create.foundation.ponder.PonderWorld; +import com.simibubi.create.foundation.ponder.ui.PonderUI; import com.simibubi.create.foundation.utility.worldWrappers.WrappedClientWorld; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java b/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java index 6ca4cb548..3951317c2 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java @@ -15,7 +15,6 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.AABB; -import net.minecraftforge.common.util.Constants.NBT; public class NBTHelper { @@ -27,7 +26,7 @@ public class NBTHelper { T[] enumConstants = enumClass.getEnumConstants(); if (enumConstants == null) throw new IllegalArgumentException("Non-Enum class passed to readEnum: " + enumClass.getName()); - if (nbt.contains(key, NBT.TAG_STRING)) { + if (nbt.contains(key, Tag.TAG_STRING)) { String name = nbt.getString(key); for (T t : enumConstants) { if (t.name() diff --git a/src/main/java/com/simibubi/create/foundation/utility/NBTProcessors.java b/src/main/java/com/simibubi/create/foundation/utility/NBTProcessors.java index 1ec9af8d2..acb3a6a46 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/NBTProcessors.java +++ b/src/main/java/com/simibubi/create/foundation/utility/NBTProcessors.java @@ -17,7 +17,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.SpawnerBlockEntity; -import net.minecraftforge.common.util.Constants; public final class NBTProcessors { @@ -41,17 +40,17 @@ public final class NBTProcessors { return data; }); addProcessor(BlockEntityType.LECTERN, data -> { - if (!data.contains("Book", Constants.NBT.TAG_COMPOUND)) + if (!data.contains("Book", Tag.TAG_COMPOUND)) return data; CompoundTag book = data.getCompound("Book"); - if (!book.contains("tag", Constants.NBT.TAG_COMPOUND)) + if (!book.contains("tag", Tag.TAG_COMPOUND)) return data; CompoundTag tag = book.getCompound("tag"); - if (!tag.contains("pages", Constants.NBT.TAG_LIST)) + if (!tag.contains("pages", Tag.TAG_LIST)) return data; - ListTag pages = tag.getList("pages", Constants.NBT.TAG_STRING); + ListTag pages = tag.getList("pages", Tag.TAG_STRING); for (Tag inbt : pages) { if (textComponentHasClickEvent(inbt.getAsString())) diff --git a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java index 795015692..92946bc88 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java @@ -23,7 +23,6 @@ import net.minecraft.world.phys.Vec3; public class VecHelper { - public static final Vector3f ZERO_3F = new Vector3f(0, 0, 0); public static final Vec3 CENTER_OF_ORIGIN = new Vec3(.5, .5, .5); public static Vec3 rotate(Vec3 vec, Vec3 rotationVec) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 1625480c8..83163a0a7 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -18,7 +18,7 @@ Technology that empowers the player.''' [[dependencies.create]] modId="forge" mandatory=true - versionRange="[37.0.0,)" + versionRange="[37.0.121,)" ordering="NONE" side="BOTH" diff --git a/src/main/resources/create.mixins.json b/src/main/resources/create.mixins.json index 63f484c4d..e5eb552f7 100644 --- a/src/main/resources/create.mixins.json +++ b/src/main/resources/create.mixins.json @@ -5,11 +5,10 @@ "compatibilityLevel": "JAVA_16", "refmap": "create.refmap.json", "mixins": [ - "CustomItemUseEffectsMixin", - "PlayerListMixin" + "CustomItemUseEffectsMixin" ], "client": [ - "BreakProgressMixin", + "DestroyProgressMixin", "EntityContraptionInteractionMixin", "FixNormalScalingMixin", "HeavyBootsOnPlayerMixin",