From 924da17677e2f15f3a1ec5d56d7f08b54bd63767 Mon Sep 17 00:00:00 2001 From: TexTrue <3140846162@qq.com> Date: Wed, 4 Oct 2023 11:24:44 +0800 Subject: [PATCH] port to `port_lib_version = 2.1.1142+1.20-entity-refactor` --- build.gradle | 8 +++- gradle.properties | 4 +- .../api/behaviour/BlockSpoutingBehaviour.java | 2 +- .../api/connectivity/ConnectivityHandler.java | 2 +- .../compat/botania/ApothecaryFilling.java | 2 +- .../compat/emi/CreateEmiAnimations.java | 2 +- .../create/compat/emi/CreateEmiPlugin.java | 2 +- .../emi/EmiSequencedAssemblySubCategory.java | 2 +- .../compat/emi/recipes/CreateEmiRecipe.java | 2 +- .../compat/emi/recipes/SpoutEmiRecipe.java | 2 +- .../jei/PotionFluidSubtypeInterpreter.java | 2 +- .../compat/jei/category/BasinCategory.java | 2 +- .../jei/category/CreateRecipeCategory.java | 2 +- .../jei/category/ItemDrainCategory.java | 2 +- .../compat/jei/category/SpoutCategory.java | 2 +- .../animations/AnimatedItemDrain.java | 2 +- .../category/animations/AnimatedSpout.java | 2 +- .../rei/PotionFluidSubtypeInterpreter.java | 2 +- .../compat/rei/category/BasinCategory.java | 2 +- .../rei/category/CreateRecipeCategory.java | 2 +- .../rei/category/ItemDrainCategory.java | 2 +- .../compat/rei/category/SpoutCategory.java | 2 +- .../animations/AnimatedItemDrain.java | 2 +- .../category/animations/AnimatedSpout.java | 2 +- .../compat/tconstruct/SpoutCasting.java | 2 +- .../AbstractContraptionEntity.java | 4 +- .../content/contraptions/Contraption.java | 2 +- .../contraptions/MountedFluidStorage.java | 2 +- .../contraptions/MountedStorageManager.java | 2 +- .../actors/plough/PloughBlock.java | 2 +- .../contraptions/actors/seat/SeatEntity.java | 7 ++-- .../contraptions/glue/SuperGlueEntity.java | 4 +- .../sync/ContraptionFluidPacket.java | 2 +- .../equipment/armor/BacktankBlock.java | 3 +- .../equipment/blueprint/BlueprintEntity.java | 9 +++-- .../equipment/clipboard/ClipboardBlock.java | 2 +- .../extendoGrip/ExtendoGripItem.java | 20 ++++------ .../goggles/IHaveGoggleInformation.java | 2 +- .../BuiltinPotatoProjectileTypes.java | 9 ++--- .../potatoCannon/PotatoProjectileEntity.java | 5 ++- .../equipment/sandPaper/SandPaperItem.java | 6 ++- .../equipment/toolbox/ToolboxBlock.java | 5 ++- .../create/content/fluids/FlowSource.java | 2 +- .../create/content/fluids/FluidFX.java | 2 +- .../create/content/fluids/FluidNetwork.java | 2 +- .../create/content/fluids/FluidReactions.java | 2 +- .../fluids/FluidTransportBehaviour.java | 2 +- .../create/content/fluids/OpenEndedPipe.java | 2 +- .../create/content/fluids/PipeConnection.java | 2 +- .../fluids/drain/ItemDrainBlockEntity.java | 2 +- .../fluids/drain/ItemDrainRenderer.java | 2 +- .../hosePulley/HosePulleyBlockEntity.java | 2 +- .../hosePulley/HosePulleyFluidHandler.java | 2 +- .../fluids/particle/BasinFluidParticle.java | 2 +- .../fluids/particle/FluidParticleData.java | 2 +- .../fluids/particle/FluidStackParticle.java | 2 +- .../pipes/SmartFluidPipeBlockEntity.java | 2 +- .../TransparentStraightPipeRenderer.java | 2 +- .../fluids/pipes/VanillaFluidTargets.java | 2 +- .../pipes/valve/FluidValveBlockEntity.java | 2 +- .../content/fluids/potion/PotionFluid.java | 2 +- .../fluids/potion/PotionFluidHandler.java | 2 +- .../fluids/potion/PotionMixingRecipes.java | 2 +- .../content/fluids/spout/FillingBySpout.java | 2 +- .../fluids/spout/SpoutBlockEntity.java | 2 +- .../content/fluids/spout/SpoutRenderer.java | 2 +- .../content/fluids/tank/BoilerData.java | 2 +- .../tank/CreativeFluidTankBlockEntity.java | 8 +++- .../content/fluids/tank/FluidTankBlock.java | 2 +- .../fluids/tank/FluidTankBlockEntity.java | 2 +- .../content/fluids/tank/FluidTankItem.java | 2 +- .../fluids/tank/FluidTankRenderer.java | 2 +- .../fluids/transfer/EmptyingRecipe.java | 2 +- .../fluids/transfer/FillingRecipe.java | 2 +- .../transfer/FluidDrainingBehaviour.java | 2 +- .../transfer/FluidManipulationBehaviour.java | 4 +- .../fluids/transfer/FluidSplashPacket.java | 2 +- .../fluids/transfer/GenericItemEmptying.java | 2 +- .../fluids/transfer/GenericItemFilling.java | 2 +- .../kinetics/deployer/DeployerFakePlayer.java | 15 ++++---- .../kinetics/deployer/DeployerHandler.java | 6 +-- .../content/logistics/filter/FilterItem.java | 2 +- .../processing/basin/BasinBlockEntity.java | 2 +- .../content/processing/basin/BasinRecipe.java | 2 +- .../processing/basin/BasinRenderer.java | 2 +- .../processing/burner/BlazeBurnerBlock.java | 3 +- .../processing/recipe/ProcessingRecipe.java | 2 +- .../recipe/ProcessingRecipeBuilder.java | 2 +- .../recipe/ProcessingRecipeSerializer.java | 2 +- .../source/FluidAmountDisplaySource.java | 2 +- .../source/FluidListDisplaySource.java | 2 +- .../content/redstone/link/LinkHandler.java | 3 +- .../ThresholdSwitchBlockEntity.java | 2 +- .../trains/entity/CarriageContraption.java | 2 +- .../create/content/trains/entity/Train.java | 2 +- .../condition/FluidThresholdCondition.java | 2 +- .../advancement/AdvancementBehaviour.java | 3 +- .../IMultiBlockEntityContainer.java | 2 +- .../behaviour/ValueSettingsInputHandler.java | 4 +- .../filtering/FilteringBehaviour.java | 2 +- .../fluid/SmartFluidTankBehaviour.java | 2 +- .../inventory/TankManipulationBehaviour.java | 2 +- .../scrollValue/ScrollValueBehaviour.java | 4 +- .../foundation/events/ClientEvents.java | 2 +- .../foundation/events/CommonEvents.java | 37 +++++++++---------- .../foundation/fluid/CombinedTankWrapper.java | 2 +- .../create/foundation/fluid/FluidHelper.java | 2 +- .../foundation/fluid/FluidIngredient.java | 2 +- .../foundation/fluid/FluidRenderer.java | 2 +- .../foundation/fluid/SmartFluidTank.java | 2 +- .../gui/element/GuiGameElement.java | 2 +- .../ponder/FabricPonderProcessing.java | 2 +- .../create/foundation/utility/Lang.java | 2 +- .../infrastructure/command/PonderCommand.java | 3 +- .../gametest/CreateGameTestHelper.java | 2 +- .../gametest/tests/TestContraptions.java | 2 +- .../gametest/tests/TestFluids.java | 2 +- .../ponder/scenes/fluid/DrainScenes.java | 2 +- .../fluid/FluidMovementActorScenes.java | 2 +- .../ponder/scenes/fluid/FluidTankScenes.java | 2 +- .../ponder/scenes/fluid/HosePulleyScenes.java | 2 +- .../ponder/scenes/fluid/PipeScenes.java | 2 +- .../ponder/scenes/fluid/SpoutScenes.java | 2 +- 123 files changed, 197 insertions(+), 177 deletions(-) diff --git a/build.gradle b/build.gradle index 54e733f91b..4ed10ed0fb 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,13 @@ repositories { maven { url = "https://maven.parchmentmc.org" } // Parchment maven { url = "https://maven.fabricmc.net/" } // FAPI, Loader maven { url = "https://mvn.devos.one/snapshots/" } // Registrate, Porting Lib, Forge Tags, Milk Lib - maven { url = "https://jitpack.io/" } // for Porting Lib: Mixin Extras, Fabric ASM + maven { + url = "https://jitpack.io" + content { + includeGroup("com.github.Chocohead") + includeGroup("com.github.llamalad7.mixinextras") + } + } // for Porting Lib: Mixin Extras, Fabric ASM maven { url = "https://cursemaven.com" } // Forge Config API Port maven { url = "https://maven.tterrag.com/" } // Flywheel maven { url = "https://maven.shedaniel.me/" } // REI and deps diff --git a/gradle.properties b/gradle.properties index 4ef39033ed..722db98a5f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,9 +32,9 @@ reach_entity_attributes_version = 2.4.0 registrate_version = 1.3.62-MC1.20.1 milk_lib_version = 1.2.60 -port_lib_version = 2.1.1127+1.20 +port_lib_version = 2.1.1142+1.20-entity-refactor # adding a module also requires adding a dependency to the FMJ -port_lib_modules = accessors,base,entity,extensions,fake_players,networking,obj_loader,tags,transfer,models,tool_actions,client_events,brewing +port_lib_modules = accessors,base,entity,extensions,networking,obj_loader,tags,transfer,models,tool_actions,client_events,brewing night_config_version = 3.6.3 jsr305_version = 3.0.2 diff --git a/src/main/java/com/simibubi/create/api/behaviour/BlockSpoutingBehaviour.java b/src/main/java/com/simibubi/create/api/behaviour/BlockSpoutingBehaviour.java index 4f8a32cdc6..8e078dd987 100644 --- a/src/main/java/com/simibubi/create/api/behaviour/BlockSpoutingBehaviour.java +++ b/src/main/java/com/simibubi/create/api/behaviour/BlockSpoutingBehaviour.java @@ -7,7 +7,7 @@ import com.simibubi.create.Create; import com.simibubi.create.compat.tconstruct.SpoutCasting; import com.simibubi.create.content.fluids.spout.SpoutBlockEntity; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; diff --git a/src/main/java/com/simibubi/create/api/connectivity/ConnectivityHandler.java b/src/main/java/com/simibubi/create/api/connectivity/ConnectivityHandler.java index fda3a1e09a..4b217cbef1 100644 --- a/src/main/java/com/simibubi/create/api/connectivity/ConnectivityHandler.java +++ b/src/main/java/com/simibubi/create/api/connectivity/ConnectivityHandler.java @@ -19,7 +19,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.BlockGetter; diff --git a/src/main/java/com/simibubi/create/compat/botania/ApothecaryFilling.java b/src/main/java/com/simibubi/create/compat/botania/ApothecaryFilling.java index ceee38f2cc..926257ffb2 100644 --- a/src/main/java/com/simibubi/create/compat/botania/ApothecaryFilling.java +++ b/src/main/java/com/simibubi/create/compat/botania/ApothecaryFilling.java @@ -6,7 +6,7 @@ import com.simibubi.create.foundation.utility.RegisteredObjects; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.core.BlockPos; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/compat/emi/CreateEmiAnimations.java b/src/main/java/com/simibubi/create/compat/emi/CreateEmiAnimations.java index 174f620630..70c310db96 100644 --- a/src/main/java/com/simibubi/create/compat/emi/CreateEmiAnimations.java +++ b/src/main/java/com/simibubi/create/compat/emi/CreateEmiAnimations.java @@ -24,7 +24,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder; import dev.emi.emi.api.widget.WidgetHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; diff --git a/src/main/java/com/simibubi/create/compat/emi/CreateEmiPlugin.java b/src/main/java/com/simibubi/create/compat/emi/CreateEmiPlugin.java index aa2dfd2a96..fb585fbc0d 100644 --- a/src/main/java/com/simibubi/create/compat/emi/CreateEmiPlugin.java +++ b/src/main/java/com/simibubi/create/compat/emi/CreateEmiPlugin.java @@ -76,7 +76,7 @@ import dev.emi.emi.api.stack.EmiStack; import dev.emi.emi.api.widget.Bounds; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; diff --git a/src/main/java/com/simibubi/create/compat/emi/EmiSequencedAssemblySubCategory.java b/src/main/java/com/simibubi/create/compat/emi/EmiSequencedAssemblySubCategory.java index 22d04e1e49..a9728025bf 100644 --- a/src/main/java/com/simibubi/create/compat/emi/EmiSequencedAssemblySubCategory.java +++ b/src/main/java/com/simibubi/create/compat/emi/EmiSequencedAssemblySubCategory.java @@ -14,7 +14,7 @@ import dev.emi.emi.api.stack.EmiIngredient; import dev.emi.emi.api.stack.EmiStack; import dev.emi.emi.api.widget.WidgetHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/simibubi/create/compat/emi/recipes/CreateEmiRecipe.java b/src/main/java/com/simibubi/create/compat/emi/recipes/CreateEmiRecipe.java index 016687211d..3230aa4121 100644 --- a/src/main/java/com/simibubi/create/compat/emi/recipes/CreateEmiRecipe.java +++ b/src/main/java/com/simibubi/create/compat/emi/recipes/CreateEmiRecipe.java @@ -27,7 +27,7 @@ import dev.emi.emi.api.widget.SlotWidget; import dev.emi.emi.api.widget.TextureWidget; import dev.emi.emi.api.widget.WidgetHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/compat/emi/recipes/SpoutEmiRecipe.java b/src/main/java/com/simibubi/create/compat/emi/recipes/SpoutEmiRecipe.java index 27fbcf1d6f..db29720eac 100644 --- a/src/main/java/com/simibubi/create/compat/emi/recipes/SpoutEmiRecipe.java +++ b/src/main/java/com/simibubi/create/compat/emi/recipes/SpoutEmiRecipe.java @@ -8,7 +8,7 @@ import com.simibubi.create.foundation.gui.AllGuiTextures; import dev.emi.emi.api.widget.WidgetHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; public class SpoutEmiRecipe extends CreateEmiRecipe { diff --git a/src/main/java/com/simibubi/create/compat/jei/PotionFluidSubtypeInterpreter.java b/src/main/java/com/simibubi/create/compat/jei/PotionFluidSubtypeInterpreter.java index 5929c2cde6..ffcfd19a68 100644 --- a/src/main/java/com/simibubi/create/compat/jei/PotionFluidSubtypeInterpreter.java +++ b/src/main/java/com/simibubi/create/compat/jei/PotionFluidSubtypeInterpreter.java @@ -5,7 +5,7 @@ import com.simibubi.create.content.fluids.potion.PotionFluid.BottleType; import com.simibubi.create.foundation.utility.NBTHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import mezz.jei.api.fabric.ingredients.fluids.IJeiFluidIngredient; import mezz.jei.api.ingredients.subtypes.IIngredientSubtypeInterpreter; import mezz.jei.api.ingredients.subtypes.UidContext; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java index eb10de3b41..f7c907a4d7 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java @@ -5,7 +5,7 @@ import javax.annotation.ParametersAreNonnullByDefault; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import mezz.jei.api.fabric.constants.FabricTypes; import org.apache.commons.lang3.mutable.MutableInt; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java index a54a1366e1..1a82381b00 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java @@ -16,7 +16,7 @@ import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidTextUtil; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import mezz.jei.api.fabric.constants.FabricTypes; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ItemDrainCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ItemDrainCategory.java index 840f6240a5..ad3f42845e 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ItemDrainCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ItemDrainCategory.java @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.item.ItemHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.fabric.constants.FabricTypes; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java index efa4a4ad2a..421e38b139 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java @@ -19,7 +19,7 @@ import com.simibubi.create.foundation.item.ItemHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.fabric.constants.FabricTypes; import mezz.jei.api.fabric.ingredients.fluids.IJeiFluidIngredient; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedItemDrain.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedItemDrain.java index 8e26be4ff7..e964b68c2f 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedItemDrain.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedItemDrain.java @@ -7,7 +7,7 @@ import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.gui.UIRenderHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java index 647a263ee4..848e6ce875 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java @@ -12,7 +12,7 @@ import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; diff --git a/src/main/java/com/simibubi/create/compat/rei/PotionFluidSubtypeInterpreter.java b/src/main/java/com/simibubi/create/compat/rei/PotionFluidSubtypeInterpreter.java index e359083cac..f30c04f541 100644 --- a/src/main/java/com/simibubi/create/compat/rei/PotionFluidSubtypeInterpreter.java +++ b/src/main/java/com/simibubi/create/compat/rei/PotionFluidSubtypeInterpreter.java @@ -5,7 +5,7 @@ import com.simibubi.create.content.fluids.potion.PotionFluid.BottleType; import com.simibubi.create.foundation.utility.NBTHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.item.alchemy.Potion; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/BasinCategory.java b/src/main/java/com/simibubi/create/compat/rei/category/BasinCategory.java index 6a400be95d..5e8d02a00b 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/BasinCategory.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/BasinCategory.java @@ -18,7 +18,7 @@ import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Pair; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Slot; import me.shedaniel.rei.api.client.gui.widgets.Widget; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/CreateRecipeCategory.java b/src/main/java/com/simibubi/create/compat/rei/category/CreateRecipeCategory.java index 36c7aca18c..46116b8ad8 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/CreateRecipeCategory.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/CreateRecipeCategory.java @@ -17,7 +17,7 @@ import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidTextUtil; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import me.shedaniel.math.Point; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/ItemDrainCategory.java b/src/main/java/com/simibubi/create/compat/rei/category/ItemDrainCategory.java index b40aed8e57..954e75c4a7 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/ItemDrainCategory.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/ItemDrainCategory.java @@ -19,7 +19,7 @@ import com.simibubi.create.foundation.item.ItemHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Slot; import me.shedaniel.rei.api.client.gui.widgets.Widget; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/SpoutCategory.java b/src/main/java/com/simibubi/create/compat/rei/category/SpoutCategory.java index d5d74da6d6..85719beecf 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/SpoutCategory.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/SpoutCategory.java @@ -18,7 +18,7 @@ import com.simibubi.create.foundation.item.ItemHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.widgets.Slot; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedItemDrain.java b/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedItemDrain.java index 4f92c7c35d..dd226cf06e 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedItemDrain.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedItemDrain.java @@ -6,7 +6,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.gui.UIRenderHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; diff --git a/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedSpout.java b/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedSpout.java index e92ff04e8f..9d92f0004f 100644 --- a/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedSpout.java +++ b/src/main/java/com/simibubi/create/compat/rei/category/animations/AnimatedSpout.java @@ -11,7 +11,7 @@ import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; diff --git a/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java b/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java index f2ea25853e..9e4d83d80c 100644 --- a/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java +++ b/src/main/java/com/simibubi/create/compat/tconstruct/SpoutCasting.java @@ -7,7 +7,7 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/content/contraptions/AbstractContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/AbstractContraptionEntity.java index a5c12b8448..07be15bbc3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/AbstractContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/AbstractContraptionEntity.java @@ -10,6 +10,7 @@ import com.simibubi.create.foundation.utility.AdventureUtil; +import io.github.fabricators_of_create.porting_lib.entity.IEntityAdditionalSpawnData; import io.github.fabricators_of_create.porting_lib.mixin.accessors.common.accessor.EntityAccessor; import io.github.fabricators_of_create.porting_lib.util.EnvExecutor; @@ -42,7 +43,6 @@ import com.simibubi.create.foundation.mixin.accessor.ServerLevelAccessor; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.entity.ExtraSpawnDataEntity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -84,7 +84,7 @@ import org.jetbrains.annotations.Nullable; -public abstract class AbstractContraptionEntity extends Entity implements ExtraSpawnDataEntity { +public abstract class AbstractContraptionEntity extends Entity implements IEntityAdditionalSpawnData { private static final EntityDataAccessor STALLED = SynchedEntityData.defineId(AbstractContraptionEntity.class, EntityDataSerializers.BOOLEAN); diff --git a/src/main/java/com/simibubi/create/content/contraptions/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/Contraption.java index 5f919155ed..9f3a0478c3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/Contraption.java @@ -84,7 +84,7 @@ import com.simibubi.create.foundation.utility.UniqueLinkedList; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.StickinessUtil; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/contraptions/MountedFluidStorage.java b/src/main/java/com/simibubi/create/content/contraptions/MountedFluidStorage.java index cb17ccd257..45537119fd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/MountedFluidStorage.java +++ b/src/main/java/com/simibubi/create/content/contraptions/MountedFluidStorage.java @@ -10,7 +10,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/content/contraptions/MountedStorageManager.java b/src/main/java/com/simibubi/create/content/contraptions/MountedStorageManager.java index 4f4dee8a46..dd4c2b9ed0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/MountedStorageManager.java +++ b/src/main/java/com/simibubi/create/content/contraptions/MountedStorageManager.java @@ -18,7 +18,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandler; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/contraptions/actors/plough/PloughBlock.java b/src/main/java/com/simibubi/create/content/contraptions/actors/plough/PloughBlock.java index acfaba3342..404ad31806 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/actors/plough/PloughBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/actors/plough/PloughBlock.java @@ -5,7 +5,7 @@ import com.mojang.authlib.GameProfile; import com.simibubi.create.content.contraptions.actors.AttachedActorBlock; -import io.github.fabricators_of_create.porting_lib.fake_players.FakePlayer; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.server.level.ServerLevel; public class PloughBlock extends AttachedActorBlock { diff --git a/src/main/java/com/simibubi/create/content/contraptions/actors/seat/SeatEntity.java b/src/main/java/com/simibubi/create/content/contraptions/actors/seat/SeatEntity.java index e438955d33..c56dc00979 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/actors/seat/SeatEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/actors/seat/SeatEntity.java @@ -2,7 +2,8 @@ import com.simibubi.create.AllEntityTypes; -import io.github.fabricators_of_create.porting_lib.entity.ExtraSpawnDataEntity; +import io.github.fabricators_of_create.porting_lib.entity.IEntityAdditionalSpawnData; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.minecraft.client.renderer.culling.Frustum; import net.minecraft.client.renderer.entity.EntityRenderer; @@ -30,7 +31,7 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; -public class SeatEntity extends Entity implements ExtraSpawnDataEntity { +public class SeatEntity extends Entity implements IEntityAdditionalSpawnData { public SeatEntity(EntityType p_i48580_1_, Level p_i48580_2_) { super(p_i48580_1_, p_i48580_2_); @@ -99,7 +100,7 @@ public void tick() { protected boolean canRide(Entity entity) { // Fake Players (tested with deployers) have a BUNCH of weird issues, don't let // them ride seats - return !(entity instanceof Player player && player.isFake()); + return !(entity instanceof Player player && player instanceof FakePlayer); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/glue/SuperGlueEntity.java b/src/main/java/com/simibubi/create/content/contraptions/glue/SuperGlueEntity.java index 2ec21bbaad..be64ea3f6e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/glue/SuperGlueEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/glue/SuperGlueEntity.java @@ -18,7 +18,7 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.entity.ExtraSpawnDataEntity; +import io.github.fabricators_of_create.porting_lib.entity.IEntityAdditionalSpawnData; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -56,7 +56,7 @@ import net.minecraft.world.phys.Vec3; public class SuperGlueEntity extends Entity - implements ExtraSpawnDataEntity, ISpecialEntityItemRequirement { + implements IEntityAdditionalSpawnData, ISpecialEntityItemRequirement { public static AABB span(BlockPos startPos, BlockPos endPos) { return new AABB(startPos, endPos).expandTowards(1, 1, 1); diff --git a/src/main/java/com/simibubi/create/content/contraptions/sync/ContraptionFluidPacket.java b/src/main/java/com/simibubi/create/content/contraptions/sync/ContraptionFluidPacket.java index 84ecbb4926..fe3d06dd66 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/sync/ContraptionFluidPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/sync/ContraptionFluidPacket.java @@ -2,7 +2,7 @@ import com.simibubi.create.content.contraptions.AbstractContraptionEntity; import com.simibubi.create.foundation.networking.SimplePacketBase; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java b/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java index 4a83c39c9f..1ba9429f21 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java @@ -8,6 +8,7 @@ import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; import com.simibubi.create.foundation.block.IBE; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -123,7 +124,7 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player BlockHitResult hit) { if (player == null) return InteractionResult.PASS; - if (player.isFake()) + if (player instanceof FakePlayer) return InteractionResult.PASS; if (player.isShiftKeyDown()) return InteractionResult.PASS; diff --git a/src/main/java/com/simibubi/create/content/equipment/blueprint/BlueprintEntity.java b/src/main/java/com/simibubi/create/content/equipment/blueprint/BlueprintEntity.java index 71d932f0de..5a289c0129 100644 --- a/src/main/java/com/simibubi/create/content/equipment/blueprint/BlueprintEntity.java +++ b/src/main/java/com/simibubi/create/content/equipment/blueprint/BlueprintEntity.java @@ -6,6 +6,10 @@ import javax.annotation.Nullable; +import io.github.fabricators_of_create.porting_lib.entity.IEntityAdditionalSpawnData; + +import net.fabricmc.fabric.api.entity.FakePlayer; + import org.apache.commons.lang3.Validate; import com.simibubi.create.AllEntityTypes; @@ -21,7 +25,6 @@ import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.fabric.ReachUtil; -import io.github.fabricators_of_create.porting_lib.entity.ExtraSpawnDataEntity; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandler; import io.github.fabricators_of_create.porting_lib.util.NetworkHooks; @@ -73,7 +76,7 @@ import net.minecraft.world.phys.Vec3; public class BlueprintEntity extends HangingEntity - implements ExtraSpawnDataEntity, ISpecialEntityItemRequirement, ISyncPersistentData, IInteractionChecker { + implements IEntityAdditionalSpawnData, ISpecialEntityItemRequirement, ISyncPersistentData, IInteractionChecker { protected int size; protected Direction verticalOrientation; @@ -340,7 +343,7 @@ public void readSpawnData(FriendlyByteBuf additionalData) { @Override public InteractionResult interactAt(Player player, Vec3 vec, InteractionHand hand) { - if (player.isFake()) + if (player instanceof FakePlayer) return InteractionResult.PASS; boolean holdingWrench = AllItems.WRENCH.isIn(player.getItemInHand(hand)); diff --git a/src/main/java/com/simibubi/create/content/equipment/clipboard/ClipboardBlock.java b/src/main/java/com/simibubi/create/content/equipment/clipboard/ClipboardBlock.java index f464268e71..3f9c9164a3 100644 --- a/src/main/java/com/simibubi/create/content/equipment/clipboard/ClipboardBlock.java +++ b/src/main/java/com/simibubi/create/content/equipment/clipboard/ClipboardBlock.java @@ -10,6 +10,7 @@ import com.simibubi.create.foundation.block.ProperWaterloggedBlock; import com.simibubi.create.foundation.gui.ScreenOpener; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -36,7 +37,6 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -import io.github.fabricators_of_create.porting_lib.fake_players.FakePlayer; import io.github.fabricators_of_create.porting_lib.util.EnvExecutor; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/equipment/extendoGrip/ExtendoGripItem.java b/src/main/java/com/simibubi/create/content/equipment/extendoGrip/ExtendoGripItem.java index ecc8346284..c9b036545b 100644 --- a/src/main/java/com/simibubi/create/content/equipment/extendoGrip/ExtendoGripItem.java +++ b/src/main/java/com/simibubi/create/content/equipment/extendoGrip/ExtendoGripItem.java @@ -12,14 +12,8 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.equipment.armor.BacktankUtil; import com.simibubi.create.foundation.advancement.AllAdvancements; -import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.entity.events.living.LivingEntityDamageEvents.HurtEvent; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.client.player.LocalPlayer; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.InteractionHand; import net.minecraft.world.damagesource.DamageSource; @@ -157,16 +151,16 @@ private static int maxUses() { return AllConfigs.server().equipment.maxExtendoGripActions.get(); } - public static void bufferLivingAttackEvent(HurtEvent event) { + public static float bufferLivingAttackEvent(DamageSource damageSource, LivingEntity damage, float amount) { // Workaround for removed patch to get the attacking entity. - lastActiveDamageSource = event.damageSource; + lastActiveDamageSource = damageSource; - Entity trueSource = event.damageSource.getEntity(); - if (trueSource instanceof Player) - findAndDamageExtendoGrip((Player) trueSource); - } + if (damage instanceof Player) + findAndDamageExtendoGrip((Player) damage); + return amount; + } - public static double attacksByExtendoGripHaveMoreKnockback(LivingEntity attacked, double strength) { + public static double attacksByExtendoGripHaveMoreKnockback(double strength, Player player) { if (lastActiveDamageSource == null) return strength; Entity entity = lastActiveDamageSource.getDirectEntity(); diff --git a/src/main/java/com/simibubi/create/content/equipment/goggles/IHaveGoggleInformation.java b/src/main/java/com/simibubi/create/content/equipment/goggles/IHaveGoggleInformation.java index ccc6769c15..0872bd50ea 100644 --- a/src/main/java/com/simibubi/create/content/equipment/goggles/IHaveGoggleInformation.java +++ b/src/main/java/com/simibubi/create/content/equipment/goggles/IHaveGoggleInformation.java @@ -9,7 +9,7 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidTextUtil; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/BuiltinPotatoProjectileTypes.java b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/BuiltinPotatoProjectileTypes.java index 64588f6beb..7273f05441 100644 --- a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/BuiltinPotatoProjectileTypes.java +++ b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/BuiltinPotatoProjectileTypes.java @@ -15,9 +15,8 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.common.util.IPlantable; -import io.github.fabricators_of_create.porting_lib.entity.events.EntityMoveEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.EntityMoveEvents.EntityTeleportEvent; -import io.github.fabricators_of_create.porting_lib.fake_players.FakePlayer; +import io.github.fabricators_of_create.porting_lib.entity.events.EntityEvents; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; @@ -409,8 +408,8 @@ private static Predicate chorusTeleport(double teleportDiameter double teleportZ = entityZ + (livingEntity.getRandom() .nextDouble() - 0.5D) * teleportDiameter; - EntityTeleportEvent event = new EntityTeleportEvent(livingEntity, teleportX, teleportY, teleportZ); - EntityMoveEvents.TELEPORT.invoker().onTeleport(event); + EntityEvents.Teleport.EntityTeleportEvent event = new EntityEvents.Teleport.EntityTeleportEvent(livingEntity, teleportX, teleportY, teleportZ); + EntityEvents.TELEPORT.invoker().onTeleport(event); if (event.isCanceled()) return false; if (livingEntity.randomTeleport(teleportX, teleportY, teleportZ, true)) { diff --git a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java index 0936fde522..145d0da9c8 100644 --- a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java +++ b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java @@ -6,7 +6,8 @@ import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.particle.AirParticleData; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.entity.ExtraSpawnDataEntity; + +import io.github.fabricators_of_create.porting_lib.entity.IEntityAdditionalSpawnData; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemHandlerHelper; import io.github.fabricators_of_create.porting_lib.util.NBTSerializer; @@ -42,7 +43,7 @@ import org.jetbrains.annotations.NotNull; -public class PotatoProjectileEntity extends AbstractHurtingProjectile implements ExtraSpawnDataEntity { +public class PotatoProjectileEntity extends AbstractHurtingProjectile implements IEntityAdditionalSpawnData { protected PotatoCannonProjectileType type; protected ItemStack stack = ItemStack.EMPTY; diff --git a/src/main/java/com/simibubi/create/content/equipment/sandPaper/SandPaperItem.java b/src/main/java/com/simibubi/create/content/equipment/sandPaper/SandPaperItem.java index 79f7ab77ff..084f385237 100644 --- a/src/main/java/com/simibubi/create/content/equipment/sandPaper/SandPaperItem.java +++ b/src/main/java/com/simibubi/create/content/equipment/sandPaper/SandPaperItem.java @@ -13,7 +13,9 @@ import io.github.fabricators_of_create.porting_lib.mixin.accessors.common.accessor.AxeItemAccessor; import io.github.fabricators_of_create.porting_lib.tool.ToolAction; import io.github.fabricators_of_create.porting_lib.tool.ToolActions; +import io.github.fabricators_of_create.porting_lib.tool.addons.ToolActionItem; import io.github.fabricators_of_create.porting_lib.util.NBTSerializer; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ItemParticleOption; @@ -44,7 +46,7 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -public class SandPaperItem extends Item implements CustomUseEffectsItem { +public class SandPaperItem extends Item implements CustomUseEffectsItem, ToolActionItem { public SandPaperItem(Properties properties) { super(properties.defaultDurability(8)); @@ -136,7 +138,7 @@ public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity en } if (!polished.isEmpty()) { - if (player.isFake()) { + if (player instanceof FakePlayer) { player.drop(polished, false, false); } else { player.getInventory() diff --git a/src/main/java/com/simibubi/create/content/equipment/toolbox/ToolboxBlock.java b/src/main/java/com/simibubi/create/content/equipment/toolbox/ToolboxBlock.java index 986a455476..942c5dd006 100644 --- a/src/main/java/com/simibubi/create/content/equipment/toolbox/ToolboxBlock.java +++ b/src/main/java/com/simibubi/create/content/equipment/toolbox/ToolboxBlock.java @@ -12,6 +12,7 @@ import io.github.fabricators_of_create.porting_lib.util.NetworkHooks; import io.github.fabricators_of_create.porting_lib.util.TagUtil; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -87,7 +88,7 @@ public void onRemove(BlockState state, Level world, BlockPos pos, BlockState new @Override public void attack(BlockState state, Level world, BlockPos pos, Player player) { - if (player.isFake()) + if (player instanceof FakePlayer) return; if (world.isClientSide) return; @@ -148,7 +149,7 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player return InteractionResult.SUCCESS; } - if (player.isFake()) + if (player instanceof FakePlayer) return InteractionResult.PASS; if (world.isClientSide) return InteractionResult.SUCCESS; diff --git a/src/main/java/com/simibubi/create/content/fluids/FlowSource.java b/src/main/java/com/simibubi/create/content/fluids/FlowSource.java index c52779dd0d..e2f4268659 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FlowSource.java +++ b/src/main/java/com/simibubi/create/content/fluids/FlowSource.java @@ -7,7 +7,7 @@ import com.simibubi.create.foundation.utility.BlockFace; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.StorageProvider; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/fluids/FluidFX.java b/src/main/java/com/simibubi/create/content/fluids/FluidFX.java index 06bac17f88..dccd49e326 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FluidFX.java +++ b/src/main/java/com/simibubi/create/content/fluids/FluidFX.java @@ -4,7 +4,7 @@ import com.simibubi.create.content.fluids.particle.FluidParticleData; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/content/fluids/FluidNetwork.java b/src/main/java/com/simibubi/create/content/fluids/FluidNetwork.java index 8063afd6fa..77dc7662a5 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FluidNetwork.java +++ b/src/main/java/com/simibubi/create/content/fluids/FluidNetwork.java @@ -20,7 +20,7 @@ import com.simibubi.create.foundation.utility.Pair; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; diff --git a/src/main/java/com/simibubi/create/content/fluids/FluidReactions.java b/src/main/java/com/simibubi/create/content/fluids/FluidReactions.java index dd0ff38c4a..d0405f9757 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FluidReactions.java +++ b/src/main/java/com/simibubi/create/content/fluids/FluidReactions.java @@ -5,7 +5,7 @@ import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.utility.BlockHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.tags.FluidTags; diff --git a/src/main/java/com/simibubi/create/content/fluids/FluidTransportBehaviour.java b/src/main/java/com/simibubi/create/content/fluids/FluidTransportBehaviour.java index 3ddfc54b9d..187c042fc6 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FluidTransportBehaviour.java +++ b/src/main/java/com/simibubi/create/content/fluids/FluidTransportBehaviour.java @@ -16,7 +16,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.WorldAttached; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java b/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java index 90a1969cf5..dd336ca1bc 100644 --- a/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java +++ b/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java @@ -18,7 +18,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.callbacks.TransactionCallback; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.tropheusj.milk.Milk; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/content/fluids/PipeConnection.java b/src/main/java/com/simibubi/create/content/fluids/PipeConnection.java index 873aae1bbb..0d154d1b8a 100644 --- a/src/main/java/com/simibubi/create/content/fluids/PipeConnection.java +++ b/src/main/java/com/simibubi/create/content/fluids/PipeConnection.java @@ -10,7 +10,7 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import com.tterrag.registrate.fabric.EnvExecutor; import net.fabricmc.api.EnvType; diff --git a/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainBlockEntity.java index 6b0b094042..119f241047 100644 --- a/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainBlockEntity.java @@ -21,7 +21,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemHandlerHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; diff --git a/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainRenderer.java b/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainRenderer.java index f9647095a7..252d5c79ad 100644 --- a/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainRenderer.java +++ b/src/main/java/com/simibubi/create/content/fluids/drain/ItemDrainRenderer.java @@ -13,7 +13,7 @@ import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer; import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; diff --git a/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyBlockEntity.java index a21214a78c..7629b269a4 100644 --- a/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyBlockEntity.java @@ -14,7 +14,7 @@ import com.simibubi.create.foundation.utility.ServerSpeedProvider; import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyFluidHandler.java b/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyFluidHandler.java index 34e95aba9e..32657d21a9 100644 --- a/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyFluidHandler.java +++ b/src/main/java/com/simibubi/create/content/fluids/hosePulley/HosePulleyFluidHandler.java @@ -7,7 +7,7 @@ import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.fluid.SmartFluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.StoragePreconditions; diff --git a/src/main/java/com/simibubi/create/content/fluids/particle/BasinFluidParticle.java b/src/main/java/com/simibubi/create/content/fluids/particle/BasinFluidParticle.java index 43e4ce3618..141917f12c 100644 --- a/src/main/java/com/simibubi/create/content/fluids/particle/BasinFluidParticle.java +++ b/src/main/java/com/simibubi/create/content/fluids/particle/BasinFluidParticle.java @@ -6,7 +6,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.content.processing.basin.BasinBlockEntity; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; diff --git a/src/main/java/com/simibubi/create/content/fluids/particle/FluidParticleData.java b/src/main/java/com/simibubi/create/content/fluids/particle/FluidParticleData.java index 05403601f2..f2654c544f 100644 --- a/src/main/java/com/simibubi/create/content/fluids/particle/FluidParticleData.java +++ b/src/main/java/com/simibubi/create/content/fluids/particle/FluidParticleData.java @@ -8,7 +8,7 @@ import com.simibubi.create.foundation.particle.ICustomParticleData; import com.simibubi.create.foundation.utility.RegisteredObjects; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/fluids/particle/FluidStackParticle.java b/src/main/java/com/simibubi/create/content/fluids/particle/FluidStackParticle.java index f54f79bfda..4bcc85e612 100644 --- a/src/main/java/com/simibubi/create/content/fluids/particle/FluidStackParticle.java +++ b/src/main/java/com/simibubi/create/content/fluids/particle/FluidStackParticle.java @@ -3,7 +3,7 @@ import com.simibubi.create.AllParticleTypes; import com.simibubi.create.content.fluids.potion.PotionFluid; import com.simibubi.create.foundation.utility.Color; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.client.fluid.FluidVariantRenderHandler; import net.fabricmc.fabric.api.transfer.v1.client.fluid.FluidVariantRendering; diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/SmartFluidPipeBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/pipes/SmartFluidPipeBlockEntity.java index bab5d968a1..c8194393aa 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/SmartFluidPipeBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/SmartFluidPipeBlockEntity.java @@ -16,7 +16,7 @@ import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/TransparentStraightPipeRenderer.java b/src/main/java/com/simibubi/create/content/fluids/pipes/TransparentStraightPipeRenderer.java index 6bc632ae67..b4a2ed0982 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/TransparentStraightPipeRenderer.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/TransparentStraightPipeRenderer.java @@ -8,7 +8,7 @@ import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java b/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java index 61217ae1bc..540b996555 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java @@ -4,7 +4,7 @@ import com.simibubi.create.AllFluids; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/valve/FluidValveBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/pipes/valve/FluidValveBlockEntity.java index a323542689..c7a7885cd8 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/valve/FluidValveBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/valve/FluidValveBlockEntity.java @@ -13,7 +13,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java index 4878cbeefb..313ac9b229 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java @@ -7,7 +7,7 @@ import com.simibubi.create.content.fluids.VirtualFluid; import com.simibubi.create.foundation.utility.RegisteredObjects; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java index aa8a23916a..318c37211c 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java @@ -11,7 +11,7 @@ import com.simibubi.create.foundation.utility.Components; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.Pair; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java index a16cd86a2f..b49b5cd4d8 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java @@ -20,7 +20,7 @@ import io.github.fabricators_of_create.porting_lib.brewing.IBrewingRecipe; import io.github.fabricators_of_create.porting_lib.mixin.accessors.common.accessor.PotionBrewing$MixAccessor; import io.github.fabricators_of_create.porting_lib.mixin.accessors.common.accessor.PotionBrewingAccessor; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.registry.FabricBrewingRecipeRegistry; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.core.Registry; diff --git a/src/main/java/com/simibubi/create/content/fluids/spout/FillingBySpout.java b/src/main/java/com/simibubi/create/content/fluids/spout/FillingBySpout.java index ac7550051f..15ce75c32d 100644 --- a/src/main/java/com/simibubi/create/content/fluids/spout/FillingBySpout.java +++ b/src/main/java/com/simibubi/create/content/fluids/spout/FillingBySpout.java @@ -11,7 +11,7 @@ import com.simibubi.create.foundation.fluid.FluidIngredient; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandlerContainer; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.world.Container; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Recipe; diff --git a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java index f765b31066..e2081a0206 100644 --- a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java @@ -27,7 +27,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import io.github.fabricators_of_create.porting_lib.block.CustomRenderBoundingBoxBlockEntity; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutRenderer.java b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutRenderer.java index 8507d31748..d946a9eee7 100644 --- a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutRenderer.java +++ b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutRenderer.java @@ -8,7 +8,7 @@ import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer; import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.render.CachedBufferer; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; import net.minecraft.client.renderer.MultiBufferSource; diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/BoilerData.java b/src/main/java/com/simibubi/create/content/fluids/tank/BoilerData.java index 1cf8d80720..0f2e897ec5 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/BoilerData.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/BoilerData.java @@ -27,7 +27,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import joptsimple.internal.Strings; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/CreativeFluidTankBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/tank/CreativeFluidTankBlockEntity.java index 37bb2202f8..d496a05dea 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/CreativeFluidTankBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/CreativeFluidTankBlockEntity.java @@ -4,9 +4,10 @@ import java.util.function.Consumer; import com.simibubi.create.foundation.fluid.SmartFluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; +import net.fabricmc.fabric.api.transfer.v1.storage.Storage; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; @@ -29,6 +30,11 @@ public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneak return false; } + @Override + public boolean containedFluidTooltip(List tooltip, boolean isPlayerSneaking, Storage handler) { + return super.containedFluidTooltip(tooltip, isPlayerSneaking, handler); + } + public static class CreativeSmartFluidTank extends SmartFluidTank { public CreativeSmartFluidTank(long capacity, Consumer updateCallback) { diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlock.java b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlock.java index fc283d9ce9..8c1bf9130e 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlock.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlock.java @@ -17,7 +17,7 @@ import io.github.fabricators_of_create.porting_lib.block.CustomSoundTypeBlock; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlockEntity.java index 6d38ab5580..9aad0a1a0f 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankBlockEntity.java @@ -21,7 +21,7 @@ import io.github.fabricators_of_create.porting_lib.block.CustomRenderBoundingBoxBlockEntity; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributeHandler; diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankItem.java b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankItem.java index 80547c18ce..5be6871b7c 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankItem.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankItem.java @@ -6,7 +6,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.api.connectivity.ConnectivityHandler; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankRenderer.java b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankRenderer.java index 0968fab878..ec09233df3 100644 --- a/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankRenderer.java +++ b/src/main/java/com/simibubi/create/content/fluids/tank/FluidTankRenderer.java @@ -9,7 +9,7 @@ import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; import net.fabricmc.fabric.api.transfer.v1.client.fluid.FluidVariantRendering; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/EmptyingRecipe.java b/src/main/java/com/simibubi/create/content/fluids/transfer/EmptyingRecipe.java index c0401a38bd..16be703e24 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/EmptyingRecipe.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/EmptyingRecipe.java @@ -4,7 +4,7 @@ import com.simibubi.create.content.processing.recipe.ProcessingRecipe; import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder.ProcessingRecipeParams; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.world.Container; import net.minecraft.world.level.Level; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FillingRecipe.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FillingRecipe.java index 5c4e7c575d..f787a88142 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FillingRecipe.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FillingRecipe.java @@ -13,7 +13,7 @@ import com.simibubi.create.foundation.utility.Components; import com.simibubi.create.foundation.utility.Lang; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidUtil; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java index b24f16fabf..2d4a5f3fbb 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java @@ -18,7 +18,7 @@ import io.github.fabricators_of_create.porting_lib.mixin.accessors.common.accessor.LiquidBlockAccessor; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.callbacks.TransactionCallback; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidManipulationBehaviour.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidManipulationBehaviour.java index fb717b3718..d008ea0e86 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidManipulationBehaviour.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidManipulationBehaviour.java @@ -21,7 +21,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.infrastructure.config.AllConfigs; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; @@ -225,7 +225,7 @@ protected Fluid search(Fluid fluid, List frontier, Set protected void playEffect(Level world, BlockPos pos, Fluid fluid, boolean fillSound) { if (fluid == null) return; - + BlockPos splooshPos = pos == null ? blockEntity.getBlockPos() : pos; FluidStack stack = new FluidStack(fluid, 1); diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidSplashPacket.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidSplashPacket.java index 6293223cfa..046e4443ed 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidSplashPacket.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidSplashPacket.java @@ -2,7 +2,7 @@ import com.simibubi.create.content.fluids.FluidFX; import com.simibubi.create.foundation.networking.SimplePacketBase; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import com.tterrag.registrate.fabric.EnvExecutor; import net.fabricmc.api.EnvType; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemEmptying.java b/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemEmptying.java index aee5fd24b0..bb3ec95aa6 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemEmptying.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemEmptying.java @@ -9,7 +9,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandlerContainer; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemFilling.java b/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemFilling.java index c8bc599511..15128d6744 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemFilling.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/GenericItemFilling.java @@ -5,7 +5,7 @@ import com.simibubi.create.content.fluids.potion.PotionFluidHandler; import com.simibubi.create.foundation.fluid.FluidHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; diff --git a/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerFakePlayer.java b/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerFakePlayer.java index 2a1bb73f8e..19fdb3a00d 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerFakePlayer.java +++ b/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerFakePlayer.java @@ -7,9 +7,10 @@ import javax.annotation.Nullable; -import io.github.fabricators_of_create.porting_lib.entity.events.EntityEvents.EntitySizeEvent; import io.github.fabricators_of_create.porting_lib.util.UsernameCache; +import net.fabricmc.fabric.api.entity.FakePlayer; + import org.apache.commons.lang3.tuple.Pair; import com.mojang.authlib.GameProfile; @@ -17,7 +18,6 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import com.simibubi.create.infrastructure.config.CKinetics; -import io.github.fabricators_of_create.porting_lib.fake_players.FakePlayer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.core.BlockPos; @@ -27,7 +27,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; @@ -105,10 +104,12 @@ public UUID getUUID() { return owner == null ? super.getUUID() : owner; } - public static void deployerHasEyesOnHisFeet(EntitySizeEvent event) { - if (event.entity instanceof DeployerFakePlayer) - event.eyeHeight = 0; - } + public static float deployerHasEyesOnHisFeet(Entity entity, float eyeHeight) { + if (entity instanceof DeployerFakePlayer) { + eyeHeight = 0; + } + return eyeHeight; + } public static boolean deployerCollectsDropsFromKilledEntities(LivingEntity target, DamageSource source, Collection drops, int lootingLevel, boolean recentlyHit) { Entity trueSource = source.getEntity(); diff --git a/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerHandler.java b/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerHandler.java index 1126372c32..5b5845dd1c 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerHandler.java +++ b/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerHandler.java @@ -156,13 +156,13 @@ private static void activateInner(DeployerFakePlayer player, Vec3 vec, BlockPos if (!entities.isEmpty()) { Entity entity = entities.get(world.random.nextInt(entities.size())); boolean success = false; - entity.startCapturingDrops(); + entity.captureDrops(); // Use on entity if (mode == Mode.USE) { InteractionResult cancelResult = UseEntityCallback.EVENT.invoker().interact(player, world, hand, entity, new EntityHitResult(entity)); if (cancelResult == InteractionResult.FAIL) { - entity.finishCapturingDrops(); + entity.captureDrops(); return; } if (cancelResult == null || cancelResult == InteractionResult.PASS) { @@ -203,7 +203,7 @@ private static void activateInner(DeployerFakePlayer player, Vec3 vec, BlockPos success = true; } - List capturedDrops = entity.finishCapturingDrops(); + List capturedDrops = entity.captureDrops().stream().toList(); capturedDrops.forEach(e -> player.getInventory() .placeItemBackInInventory(e.getItem())); if (success) diff --git a/src/main/java/com/simibubi/create/content/logistics/filter/FilterItem.java b/src/main/java/com/simibubi/create/content/logistics/filter/FilterItem.java index 4741eead82..47f1045047 100644 --- a/src/main/java/com/simibubi/create/content/logistics/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/filter/FilterItem.java @@ -16,7 +16,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.item.ItemHandlerHelper; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandler; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.NetworkHooks; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/processing/basin/BasinBlockEntity.java b/src/main/java/com/simibubi/create/content/processing/basin/BasinBlockEntity.java index 89d20e3ea5..97c403d062 100644 --- a/src/main/java/com/simibubi/create/content/processing/basin/BasinBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/processing/basin/BasinBlockEntity.java @@ -44,7 +44,7 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidTextUtil; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import io.github.fabricators_of_create.porting_lib.util.NBTSerializer; diff --git a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java index cecd8f1830..fdc6efc893 100644 --- a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java +++ b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java @@ -23,7 +23,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.callbacks.TransactionCallback; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/processing/basin/BasinRenderer.java b/src/main/java/com/simibubi/create/content/processing/basin/BasinRenderer.java index 5dabcceea8..26a378b299 100644 --- a/src/main/java/com/simibubi/create/content/processing/basin/BasinRenderer.java +++ b/src/main/java/com/simibubi/create/content/processing/basin/BasinRenderer.java @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; diff --git a/src/main/java/com/simibubi/create/content/processing/burner/BlazeBurnerBlock.java b/src/main/java/com/simibubi/create/content/processing/burner/BlazeBurnerBlock.java index 82bdab1e46..12a2d43a0f 100644 --- a/src/main/java/com/simibubi/create/content/processing/burner/BlazeBurnerBlock.java +++ b/src/main/java/com/simibubi/create/content/processing/burner/BlazeBurnerBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.content.processing.burner; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.util.RandomSource; import javax.annotation.Nullable; @@ -145,7 +146,7 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player } boolean doNotConsume = player.isCreative(); - boolean forceOverflow = !(player.isFake()); + boolean forceOverflow = !(player instanceof FakePlayer); try (Transaction t = TransferUtil.getTransaction()) { InteractionResultHolder res = tryInsert(state, world, pos, heldItem, doNotConsume, forceOverflow, t); diff --git a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java index 87092b38d4..61fc6b4412 100644 --- a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java +++ b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java @@ -14,7 +14,7 @@ import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder.ProcessingRecipeParams; import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.recipe.IRecipeTypeInfo; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.NonNullList; diff --git a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeBuilder.java b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeBuilder.java index e0cb3c2efd..46b994eaaa 100644 --- a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeBuilder.java +++ b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeBuilder.java @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.utility.Pair; import com.tterrag.registrate.util.DataIngredient; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.recipe.v1.ingredient.CustomIngredient; import net.fabricmc.fabric.api.resource.conditions.v1.ConditionJsonProvider; import net.fabricmc.fabric.api.resource.conditions.v1.DefaultResourceConditions; diff --git a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeSerializer.java b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeSerializer.java index a7e886c753..baf67f2641 100644 --- a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeSerializer.java +++ b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipeSerializer.java @@ -8,7 +8,7 @@ import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder.ProcessingRecipeFactory; import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.fluid.FluidIngredient; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.NonNullList; diff --git a/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidAmountDisplaySource.java b/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidAmountDisplaySource.java index 63d46439a9..cdb7d8b77a 100644 --- a/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidAmountDisplaySource.java +++ b/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidAmountDisplaySource.java @@ -11,7 +11,7 @@ import com.simibubi.create.foundation.utility.Lang; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidListDisplaySource.java b/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidListDisplaySource.java index e6880b2058..b3b498db80 100644 --- a/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidListDisplaySource.java +++ b/src/main/java/com/simibubi/create/content/redstone/displayLink/source/FluidListDisplaySource.java @@ -22,7 +22,7 @@ import com.simibubi.create.foundation.utility.LongAttached; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.FluidUnit; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; diff --git a/src/main/java/com/simibubi/create/content/redstone/link/LinkHandler.java b/src/main/java/com/simibubi/create/content/redstone/link/LinkHandler.java index 670d7f226a..cc9a4f6b41 100644 --- a/src/main/java/com/simibubi/create/content/redstone/link/LinkHandler.java +++ b/src/main/java/com/simibubi/create/content/redstone/link/LinkHandler.java @@ -7,6 +7,7 @@ import com.simibubi.create.foundation.utility.AdventureUtil; import com.simibubi.create.foundation.utility.RaycastHelper; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -41,7 +42,7 @@ public static InteractionResult onBlockActivated(Player player, Level world, Int if (AllItems.WRENCH.isIn(heldItem)) return InteractionResult.PASS; - boolean fakePlayer = player.isFake(); + boolean fakePlayer = player instanceof FakePlayer; boolean fakePlayerChoice = false; if (fakePlayer) { diff --git a/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlockEntity.java b/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlockEntity.java index 60b3648649..0f4cb05d25 100644 --- a/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlockEntity.java @@ -14,7 +14,7 @@ import com.simibubi.create.foundation.utility.BlockFace; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java b/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java index 7dc9ccc199..8ffdd169d3 100644 --- a/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java +++ b/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java @@ -12,7 +12,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemStackHandler; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import org.apache.commons.lang3.tuple.Pair; diff --git a/src/main/java/com/simibubi/create/content/trains/entity/Train.java b/src/main/java/com/simibubi/create/content/trains/entity/Train.java index e8bd1992b8..ef00b59b61 100644 --- a/src/main/java/com/simibubi/create/content/trains/entity/Train.java +++ b/src/main/java/com/simibubi/create/content/trains/entity/Train.java @@ -56,7 +56,7 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.registry.FuelRegistry; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.storage.StorageUtil; diff --git a/src/main/java/com/simibubi/create/content/trains/schedule/condition/FluidThresholdCondition.java b/src/main/java/com/simibubi/create/content/trains/schedule/condition/FluidThresholdCondition.java index d43d04cd5a..00d38b4b5c 100644 --- a/src/main/java/com/simibubi/create/content/trains/schedule/condition/FluidThresholdCondition.java +++ b/src/main/java/com/simibubi/create/content/trains/schedule/condition/FluidThresholdCondition.java @@ -14,7 +14,7 @@ import com.simibubi.create.foundation.utility.Lang; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.NBTSerializer; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/foundation/advancement/AdvancementBehaviour.java b/src/main/java/com/simibubi/create/foundation/advancement/AdvancementBehaviour.java index 5fa330c29a..67f82cb2b0 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/AdvancementBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/AdvancementBehaviour.java @@ -8,6 +8,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType; import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; @@ -122,7 +123,7 @@ public static void setPlacedBy(Level worldIn, BlockPos pos, LivingEntity placer) AdvancementBehaviour behaviour = BlockEntityBehaviour.get(worldIn, pos, TYPE); if (behaviour == null) return; - if (placer instanceof ServerPlayer player && !player.isFake()) + if (placer instanceof ServerPlayer player && !(player instanceof FakePlayer)) behaviour.setPlayer(placer.getUUID()); } diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/IMultiBlockEntityContainer.java b/src/main/java/com/simibubi/create/foundation/blockEntity/IMultiBlockEntityContainer.java index 7a678ad59f..52687f19cc 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/IMultiBlockEntityContainer.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/IMultiBlockEntityContainer.java @@ -1,7 +1,7 @@ package com.simibubi.create.foundation.blockEntity; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueSettingsInputHandler.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueSettingsInputHandler.java index 693759da53..1dc5192e81 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueSettingsInputHandler.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/ValueSettingsInputHandler.java @@ -2,6 +2,8 @@ import com.simibubi.create.foundation.utility.AdventureUtil; +import net.fabricmc.fabric.api.entity.FakePlayer; + import org.apache.commons.lang3.mutable.MutableBoolean; import com.simibubi.create.AllBlocks; @@ -64,7 +66,7 @@ public static InteractionResult onBlockActivated(Player player, Level world, Int sidedSlot.fromSide(ray.getDirection()); } - boolean fakePlayer = player.isFake(); + boolean fakePlayer = player instanceof FakePlayer; if (!valueSettingsBehaviour.testHit(ray.getLocation()) && !fakePlayer) continue; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java index 6879adc80a..9a43da21bc 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java @@ -25,7 +25,7 @@ import com.simibubi.create.infrastructure.config.AllConfigs; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemHandlerHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.NBTSerializer; import net.fabricmc.fabric.api.transfer.v1.item.PlayerInventoryStorage; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/fluid/SmartFluidTankBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/fluid/SmartFluidTankBehaviour.java index a0d4cea9a2..a520595a2b 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/fluid/SmartFluidTankBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/fluid/SmartFluidTankBehaviour.java @@ -18,7 +18,7 @@ import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.LazyOptional; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/inventory/TankManipulationBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/inventory/TankManipulationBehaviour.java index 636ed13ca8..ad0cefd2b9 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/inventory/TankManipulationBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/inventory/TankManipulationBehaviour.java @@ -10,7 +10,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.util.StorageProvider; import net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollValue/ScrollValueBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollValue/ScrollValueBehaviour.java index 86b58e67ae..8b212eedbc 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollValue/ScrollValueBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/scrollValue/ScrollValueBehaviour.java @@ -17,7 +17,7 @@ import com.simibubi.create.foundation.utility.Components; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.fake_players.FakePlayer; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; @@ -183,7 +183,7 @@ public boolean onlyVisibleWithWrench() { @Override public void onShortInteract(Player player, InteractionHand hand, Direction side) { - if (player.isFake()) + if (player instanceof FakePlayer) blockEntity.getBlockState() .use(getWorld(), player, hand, new BlockHitResult(VecHelper.getCenterOf(getPos()), side, getPos(), true)); diff --git a/src/main/java/com/simibubi/create/foundation/events/ClientEvents.java b/src/main/java/com/simibubi/create/foundation/events/ClientEvents.java index 28e64f2208..74d5f97c6b 100644 --- a/src/main/java/com/simibubi/create/foundation/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/foundation/events/ClientEvents.java @@ -74,7 +74,7 @@ import io.github.fabricators_of_create.porting_lib.client_events.event.client.RenderArmCallback; import io.github.fabricators_of_create.porting_lib.entity.events.EntityMountEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.player.PlayerTickEvents; +import io.github.fabricators_of_create.porting_lib.entity.events.PlayerTickEvents; import io.github.fabricators_of_create.porting_lib.event.client.CameraSetupCallback; import io.github.fabricators_of_create.porting_lib.event.client.CameraSetupCallback.CameraInfo; import io.github.fabricators_of_create.porting_lib.event.client.ClientWorldEvents; diff --git a/src/main/java/com/simibubi/create/foundation/events/CommonEvents.java b/src/main/java/com/simibubi/create/foundation/events/CommonEvents.java index 7f3064f422..ae365d72e9 100644 --- a/src/main/java/com/simibubi/create/foundation/events/CommonEvents.java +++ b/src/main/java/com/simibubi/create/foundation/events/CommonEvents.java @@ -2,16 +2,15 @@ import java.util.concurrent.Executor; -import io.github.fabricators_of_create.porting_lib.entity.events.AdditionalEntityTrackingEvents; import io.github.fabricators_of_create.porting_lib.entity.events.EntityDataEvents; import io.github.fabricators_of_create.porting_lib.entity.events.EntityEvents; import io.github.fabricators_of_create.porting_lib.entity.events.EntityMountEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.EntityMoveEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.EntityMoveEvents.ChunkSectionChangeContext; -import io.github.fabricators_of_create.porting_lib.entity.events.living.LivingEntityDamageEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.living.LivingEntityEvents; -import io.github.fabricators_of_create.porting_lib.entity.events.living.LivingEntityLootEvents; +import io.github.fabricators_of_create.porting_lib.entity.events.LivingEntityEvents; + +import io.github.fabricators_of_create.porting_lib.entity.events.MobEntitySetTargetCallback; + +import io.github.fabricators_of_create.porting_lib.entity.events.ProjectileImpactCallback; import org.jetbrains.annotations.Nullable; @@ -149,8 +148,8 @@ public static void registerCommands(CommandDispatcher dispat AllCommands.register(dispatcher); } - public static void onEntityEnterSection(ChunkSectionChangeContext ctx) { - CarriageEntityHandler.onEntityEnterSection(ctx.entity(), ctx.oldPackedPos(), ctx.newPackedPos()); + public static void onEntityEnterSection(Entity entity, long packedOldPos, long packedNewPos) { + CarriageEntityHandler.onEntityEnterSection(entity, packedOldPos, packedNewPos); } public static void addReloadListeners() { @@ -222,8 +221,8 @@ public static void register() { ServerPlayConnectionEvents.DISCONNECT.register(CommonEvents::playerLoggedOut); AttackEntityCallback.EVENT.register(CommonEvents::onEntityAttackedByPlayer); CommandRegistrationCallback.EVENT.register(CommonEvents::registerCommands); - AdditionalEntityTrackingEvents.AFTER_START_TRACKING.register(CommonEvents::startTracking); - EntityMoveEvents.CHUNK_SECTION_CHANGE.register(CommonEvents::onEntityEnterSection); + EntityEvents.START_TRACKING_TAIL.register(CommonEvents::startTracking); + EntityEvents.ENTERING_SECTION.register(CommonEvents::onEntityEnterSection); LivingEntityEvents.TICK.register(CommonEvents::onUpdateLivingEntity); ServerPlayConnectionEvents.JOIN.register(CommonEvents::playerLoggedIn); ServerLifecycleEvents.SYNC_DATA_PACK_CONTENTS.register(CommonEvents::onDatapackSync); @@ -250,22 +249,22 @@ public static void register() { AttackBlockCallback.EVENT.register(ZapperInteractionHandler::leftClickingBlocksWithTheZapperSelectsTheBlock); UseEntityCallback.EVENT.register(ScheduleItemEntityInteraction::interactWithConductor); ServerTickEvents.END_WORLD_TICK.register(HauntedBellPulser::hauntedBellCreatesPulse); - LivingEntityEvents.SET_TARGET.register(DeployerFakePlayer::entitiesDontRetaliate); + MobEntitySetTargetCallback.EVENT.register(DeployerFakePlayer::entitiesDontRetaliate); EntityMountEvents.MOUNT.register(CouplingHandler::preventEntitiesFromMoutingOccupiedCart); - LivingEntityLootEvents.EXPERIENCE_DROP.register(DeployerFakePlayer::deployerKillsDoNotSpawnXP); - LivingEntityDamageEvents.HURT.register(ExtendoGripItem::bufferLivingAttackEvent); - LivingEntityDamageEvents.KNOCKBACK_STRENGTH.register(ExtendoGripItem::attacksByExtendoGripHaveMoreKnockback); + LivingEntityEvents.EXPERIENCE_DROP.register(DeployerFakePlayer::deployerKillsDoNotSpawnXP); + LivingEntityEvents.HURT.register(ExtendoGripItem::bufferLivingAttackEvent); + LivingEntityEvents.KNOCKBACK_STRENGTH.register(ExtendoGripItem::attacksByExtendoGripHaveMoreKnockback); LivingEntityEvents.TICK.register(ExtendoGripItem::holdingExtendoGripIncreasesRange); LivingEntityEvents.TICK.register(DivingBootsItem::accellerateDescentUnderwater); LivingEntityEvents.TICK.register(DivingHelmetItem::breatheUnderwater); - LivingEntityLootEvents.DROPS.register(CrushingWheelBlockEntity::handleCrushedMobDrops); - LivingEntityLootEvents.LOOTING_LEVEL.register(CrushingWheelBlockEntity::crushingIsFortunate); - LivingEntityLootEvents.DROPS.register(DeployerFakePlayer::deployerCollectsDropsFromKilledEntities); + LivingEntityEvents.DROPS.register(CrushingWheelBlockEntity::handleCrushedMobDrops); + LivingEntityEvents.LOOTING_LEVEL.register(CrushingWheelBlockEntity::crushingIsFortunate); + LivingEntityEvents.DROPS.register(DeployerFakePlayer::deployerCollectsDropsFromKilledEntities); ServerEntityEvents.EQUIPMENT_CHANGE.register(NetheriteDivingHandler::onLivingEquipmentChange); - EntityEvents.SIZE.register(DeployerFakePlayer::deployerHasEyesOnHisFeet); + EntityEvents.EYE_HEIGHT.register(DeployerFakePlayer::deployerHasEyesOnHisFeet); BlockEvents.AFTER_PLACE.register(SymmetryHandler::onBlockPlaced); BlockEvents.AFTER_PLACE.register(SuperGlueHandler::glueListensForBlockPlacement); - EntityEvents.PROJECTILE_IMPACT.register(BlazeBurnerHandler::onThrowableImpact); + ProjectileImpactCallback.EVENT.register(BlazeBurnerHandler::onThrowableImpact); EntityDataEvents.LOAD.register(ExtendoGripItem::addReachToJoiningPlayersHoldingExtendo); PlayerBlockBreakEvents.BEFORE.register(SymmetryHandler::onBlockDestroyed); } diff --git a/src/main/java/com/simibubi/create/foundation/fluid/CombinedTankWrapper.java b/src/main/java/com/simibubi/create/foundation/fluid/CombinedTankWrapper.java index 36d91b33e6..55e80d559e 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/CombinedTankWrapper.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/CombinedTankWrapper.java @@ -1,7 +1,7 @@ package com.simibubi.create.foundation.fluid; import com.simibubi.create.foundation.utility.Iterate; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; import net.fabricmc.fabric.api.transfer.v1.storage.base.CombinedStorage; diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java index d6e35156bd..9218bf37b6 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java @@ -13,7 +13,7 @@ import com.simibubi.create.foundation.utility.RegisteredObjects; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java index 82194d4048..a9305906e4 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java @@ -15,7 +15,7 @@ import com.google.gson.JsonSyntaxException; import com.simibubi.create.foundation.utility.RegisteredObjects; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.minecraft.core.Holder; 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 22178d1b67..c61aea23d5 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java @@ -7,7 +7,7 @@ import com.simibubi.create.foundation.render.RenderTypes; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Iterate; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java b/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java index b574a18e57..742b0b380d 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java @@ -3,7 +3,7 @@ import java.util.function.Consumer; import io.github.fabricators_of_create.porting_lib.transfer.callbacks.TransactionCallback; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.fabricators_of_create.porting_lib.transfer.fluid.FluidTank; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; 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 e8967bc5c6..e7cd73bbd7 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 @@ -19,7 +19,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import io.github.fabricators_of_create.porting_lib.models.virtual.FixedColorTintingBakedModel; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/FabricPonderProcessing.java b/src/main/java/com/simibubi/create/foundation/ponder/FabricPonderProcessing.java index 150eea7745..edbcf571e5 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/FabricPonderProcessing.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/FabricPonderProcessing.java @@ -7,7 +7,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.Create; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; diff --git a/src/main/java/com/simibubi/create/foundation/utility/Lang.java b/src/main/java/com/simibubi/create/foundation/utility/Lang.java index af38ac5c58..8771de4d46 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/Lang.java +++ b/src/main/java/com/simibubi/create/foundation/utility/Lang.java @@ -6,7 +6,7 @@ import com.simibubi.create.Create; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/com/simibubi/create/infrastructure/command/PonderCommand.java b/src/main/java/com/simibubi/create/infrastructure/command/PonderCommand.java index 615dd346ba..264575ef36 100644 --- a/src/main/java/com/simibubi/create/infrastructure/command/PonderCommand.java +++ b/src/main/java/com/simibubi/create/infrastructure/command/PonderCommand.java @@ -9,6 +9,7 @@ import com.simibubi.create.AllPackets; import com.simibubi.create.foundation.ponder.PonderRegistry; +import net.fabricmc.fabric.api.entity.FakePlayer; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.commands.SharedSuggestionProvider; @@ -42,7 +43,7 @@ private static int openScene(String sceneId, ServerPlayer player) { private static int openScene(String sceneId, Collection players) { for (ServerPlayer player : players) { - if (player.isFake()) + if (player instanceof FakePlayer) continue; AllPackets.getChannel().sendToClient(new SConfigureConfigPacket(SConfigureConfigPacket.Actions.openPonder.name(), sceneId), player); diff --git a/src/main/java/com/simibubi/create/infrastructure/gametest/CreateGameTestHelper.java b/src/main/java/com/simibubi/create/infrastructure/gametest/CreateGameTestHelper.java index 491f39e0a0..bac99f3630 100644 --- a/src/main/java/com/simibubi/create/infrastructure/gametest/CreateGameTestHelper.java +++ b/src/main/java/com/simibubi/create/infrastructure/gametest/CreateGameTestHelper.java @@ -30,7 +30,7 @@ import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; import io.github.fabricators_of_create.porting_lib.transfer.item.ItemHandlerHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import it.unimi.dsi.fastutil.objects.Object2LongArrayMap; import it.unimi.dsi.fastutil.objects.Object2LongMap; import it.unimi.dsi.fastutil.objects.Object2LongMap.Entry; diff --git a/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestContraptions.java b/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestContraptions.java index d347404be4..aba466a366 100644 --- a/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestContraptions.java +++ b/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestContraptions.java @@ -16,7 +16,7 @@ import com.simibubi.create.infrastructure.gametest.CreateGameTestHelper; import com.simibubi.create.infrastructure.gametest.GameTestGroup; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import it.unimi.dsi.fastutil.objects.Object2LongMap; import org.apache.commons.lang3.mutable.MutableInt; diff --git a/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestFluids.java b/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestFluids.java index 3535e28219..c30fd871b1 100644 --- a/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestFluids.java +++ b/src/main/java/com/simibubi/create/infrastructure/gametest/tests/TestFluids.java @@ -18,7 +18,7 @@ import com.simibubi.create.infrastructure.gametest.GameTestGroup; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/DrainScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/DrainScenes.java index 753e8d92cd..2b824ee33e 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/DrainScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/DrainScenes.java @@ -10,7 +10,7 @@ import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidMovementActorScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidMovementActorScenes.java index 50e12751e4..2bfb315f80 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidMovementActorScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidMovementActorScenes.java @@ -14,7 +14,7 @@ import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidTankScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidTankScenes.java index c5dc703ace..16f1e7f468 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidTankScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/FluidTankScenes.java @@ -24,7 +24,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/HosePulleyScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/HosePulleyScenes.java index a1b2bbe84b..de598e8a56 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/HosePulleyScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/HosePulleyScenes.java @@ -15,7 +15,7 @@ import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/PipeScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/PipeScenes.java index 27a478afb6..330b792ec3 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/PipeScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/PipeScenes.java @@ -23,7 +23,7 @@ import com.simibubi.create.foundation.ponder.element.WorldSectionElement; import com.simibubi.create.foundation.utility.Pointing; import io.github.fabricators_of_create.porting_lib.transfer.TransferUtil; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import io.github.tropheusj.milk.Milk; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; diff --git a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/SpoutScenes.java b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/SpoutScenes.java index 231136955d..584ef8964a 100644 --- a/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/SpoutScenes.java +++ b/src/main/java/com/simibubi/create/infrastructure/ponder/scenes/fluid/SpoutScenes.java @@ -17,7 +17,7 @@ import com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter; import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.minecraft.core.BlockPos;