From 3fb6d01ade66a8f3a029c8c4b787f1a8dc8246bc Mon Sep 17 00:00:00 2001 From: trinsdar <30245301+Trinsdar@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:22:28 -0400 Subject: [PATCH] prep work to update to arch loom 1.3 --- TesseractAPI | 2 +- build.gradle | 6 +-- common/build.gradle | 1 - common/gradle.properties | 1 - .../muramasa/antimatter/AntimatterAPI.java | 12 +++--- .../antimatter/AntimatterProperties.java | 2 +- .../main/java/muramasa/antimatter/Data.java | 16 ++----- .../muramasa/antimatter/MaterialDataInit.java | 5 +-- .../antimatter/behaviour/IAddInformation.java | 2 - .../antimatter/block/AntimatterItemBlock.java | 8 ++-- .../antimatter/block/BlockMaterialType.java | 3 +- .../muramasa/antimatter/block/BlockStone.java | 2 - .../antimatter/block/BlockStoneSlab.java | 2 +- .../antimatter/block/BlockStoneStair.java | 5 +-- .../antimatter/block/BlockStorage.java | 6 +-- .../antimatter/block/BlockSurfaceRock.java | 2 - .../capability/ComponentHandler.java | 17 ++++---- .../antimatter/capability/CoverHandler.java | 8 ++-- .../antimatter/capability/EnergyHandler.java | 2 - .../antimatter/capability/FluidHandler.java | 13 +++--- .../capability/FluidHandlerSnapshot.java | 4 +- .../antimatter/capability/Holder.java | 2 +- .../capability/IComponentHandler.java | 3 +- .../antimatter/capability/ICoverHandler.java | 3 +- .../capability/IInteractHandler.java | 3 +- .../capability/InteractHandler.java | 7 ++- .../capability/energy/ItemEnergyHandler.java | 1 - .../fluid/FluidHandlerNullSideWrapper.java | 1 - .../fluid/FluidHandlerSidedWrapper.java | 9 ++-- .../capability/fluid/FluidTank.java | 6 +-- .../capability/fluid/FluidTanks.java | 5 +-- .../fluid/PipeFluidHandlerSidedWrapper.java | 2 - .../capability/item/CombinedInvWrapper.java | 11 +++-- .../item/FakeTrackedItemHandler.java | 7 ++- .../capability/item/ITrackedHandler.java | 9 ++-- .../capability/item/ItemStackHandler.java | 17 ++++---- .../item/MultiTrackedItemHandler.java | 9 ++-- .../capability/item/ROCombinedInvWrapper.java | 11 +++-- .../item/SidedCombinedInvWrapper.java | 9 ++-- .../capability/item/TrackedItemHandler.java | 17 ++++---- .../machine/HatchComponentHandler.java | 8 ++-- .../machine/MachineCoverHandler.java | 8 ++-- .../machine/MachineEnergyHandler.java | 2 - .../machine/MachineFluidHandler.java | 9 ++-- .../machine/MachineItemHandler.java | 12 ++---- .../machine/MachineRecipeHandler.java | 5 +-- .../machine/MultiMachineEnergyHandler.java | 1 - .../machine/MultiMachineFluidHandler.java | 6 +-- .../antimatter/capability/rf/RFHandler.java | 4 -- .../antimatter/client/ClientData.java | 5 ++- .../antimatter/client/IAntimatterModel.java | 1 - .../antimatter/client/ModelUtils.java | 15 ++++--- .../antimatter/client/RenderHelper.java | 2 - .../client/baked/AttachableBakedModel.java | 12 +++--- .../client/baked/BakedMachineSide.java | 8 ++-- .../client/baked/CoverBakedModel.java | 10 ++--- .../client/baked/CoveredBakedModel.java | 10 ++--- .../client/baked/GroupedBakedModel.java | 8 ++-- .../client/baked/IAntimatterBakedModel.java | 8 ++-- .../client/baked/ListBakedModel.java | 2 +- .../client/baked/MachineBakedModel.java | 4 +- .../client/baked/ProxyBakedModel.java | 6 +-- .../dynamic/DynamicTextureProvider.java | 6 +-- .../client/dynamic/DynamicTexturers.java | 4 -- .../client/model/AntimatterGroupedModel.java | 1 - .../client/model/IModelConfiguration.java | 3 +- .../antimatter/client/model/ISimpleModel.java | 8 ++-- .../client/model/loader/BlockBenchLoader.java | 3 -- .../model/loader/DefaultModelLoader.java | 5 +-- .../model/loader/DynamicModelLoader.java | 1 - .../client/scene/TrackedDummyWorld.java | 18 ++++---- .../client/scene/WorldSceneRenderer.java | 2 +- .../antimatter/client/tesr/MachineTESR.java | 6 +-- .../antimatter/common/event/CommonEvents.java | 1 - .../muramasa/antimatter/cover/BaseCover.java | 11 +++-- .../muramasa/antimatter/cover/CoverDebug.java | 3 +- .../antimatter/cover/CoverDynamo.java | 3 +- .../antimatter/cover/CoverEnergy.java | 3 +- .../antimatter/cover/CoverFactory.java | 2 +- .../antimatter/cover/CoverFilter.java | 2 +- .../muramasa/antimatter/cover/CoverInput.java | 3 +- .../antimatter/cover/CoverMaterial.java | 3 +- .../antimatter/cover/CoverMuffler.java | 2 +- .../antimatter/cover/CoverOutput.java | 4 +- .../antimatter/cover/CoverTintable.java | 3 +- .../muramasa/antimatter/cover/ICover.java | 8 ++-- .../data/AntimatterMaterialTypes.java | 6 ++- .../antimatter/data/AntimatterStoneTypes.java | 1 - .../datagen/AntimatterDynamics.java | 3 -- .../antimatter/datagen/DynamicDataPack.java | 8 +--- .../AntimatterCookingRecipeBuilder.java | 2 +- .../builder/AntimatterItemModelBuilder.java | 1 - .../builder/AntimatterModelBuilder.java | 1 - .../AntimatterShapedRecipeBuilder.java | 3 +- .../AntimatterShapelessRecipeBuilder.java | 2 +- .../datagen/builder/AntimatterTagBuilder.java | 4 -- .../datagen/builder/DynamicConfigBuilder.java | 2 +- .../datagen/json/JAntimatterModel.java | 1 - .../antimatter/datagen/json/JModel.java | 9 +--- .../datagen/loaders/MaterialRecipes.java | 12 +----- .../antimatter/datagen/loaders/Pipes.java | 2 +- .../antimatter/datagen/loaders/Tools.java | 9 +--- .../AntimatterAdvancementProvider.java | 6 +-- .../AntimatterBlockLootProvider.java | 10 +---- .../AntimatterBlockStateProvider.java | 38 +++------------- .../providers/AntimatterBlockTagProvider.java | 6 +-- .../AntimatterItemModelProvider.java | 1 - .../providers/AntimatterItemTagProvider.java | 1 - .../providers/AntimatterLanguageProvider.java | 9 +--- .../providers/AntimatterRecipeProvider.java | 1 - .../antimatter/dynamic/BlockDynamic.java | 2 +- .../antimatter/dynamic/DynamicBakedModel.java | 6 +-- .../antimatter/dynamic/ModelConfig.java | 8 ++-- .../antimatter/dynamic/ModelConfigRandom.java | 6 +-- .../antimatter/event/MaterialEvent.java | 8 +--- .../antimatter/event/ProvidersEvent.java | 2 - .../antimatter/event/WorldGenEvent.java | 2 - .../antimatter/example/ExampleItem.java | 1 - .../java/muramasa/antimatter/gui/GuiData.java | 1 - .../muramasa/antimatter/gui/GuiInstance.java | 8 +--- .../muramasa/antimatter/gui/ICanSyncData.java | 6 +-- .../muramasa/antimatter/gui/MenuHandler.java | 4 -- .../java/muramasa/antimatter/gui/Widget.java | 15 ++----- .../gui/container/AntimatterContainer.java | 2 - .../gui/container/ContainerCover.java | 2 - .../muramasa/antimatter/gui/core/RTree.java | 9 +--- .../gui/screen/ScreenBasicMachine.java | 2 - .../antimatter/gui/screen/ScreenCover.java | 2 - .../antimatter/gui/slot/AbstractSlot.java | 11 +++-- .../antimatter/gui/slot/SlotEnergy.java | 4 +- .../antimatter/gui/slot/SlotFake.java | 12 +++--- .../antimatter/gui/slot/SlotFakeFluid.java | 4 +- .../antimatter/gui/slot/SlotOutput.java | 4 +- .../gui/widget/BackgroundWidget.java | 1 + .../antimatter/gui/widget/ButtonWidget.java | 5 +-- .../gui/widget/CycleButtonWidget.java | 4 +- .../gui/widget/FluidSlotWidget.java | 3 -- .../antimatter/gui/widget/IOWidget.java | 4 -- .../antimatter/gui/widget/WidgetGroup.java | 6 +-- .../ct/AntimatterCraftTweaker.java | 7 +-- .../integration/jei/AntimatterJEIPlugin.java | 14 +++--- .../category/MultiMachineInfoCategory.java | 24 +++++------ .../jei/category/MultiMachineInfoPage.java | 11 ++--- .../jei/category/RecipeMapCategory.java | 1 - .../extension/JEIMaterialRecipeExtension.java | 6 +-- .../jeirei/renderer/IInfoRenderer.java | 1 + .../integration/kubejs/AMCreationEvent.java | 6 +-- .../integration/kubejs/AMWorldEvent.java | 2 - .../integration/kubejs/AntimatterKubeJS.java | 2 - .../integration/kubejs/KubeJSRegistrar.java | 6 ++- .../rei/AntimatterREIClientPlugin.java | 6 ++- .../antimatter/integration/rei/REIUtils.java | 2 - .../rei/category/RecipeMapCategory.java | 1 - .../rei/category/RecipeMapDisplay.java | 15 +------ .../extension/REIMaterialRecipeExtension.java | 7 +-- .../integration/top/EnergyInfoProvider.java | 1 - .../top/MultiblockInfoProvider.java | 7 +-- .../integration/top/RecipeInfoProvider.java | 6 +-- .../antimatter/item/CoverMaterialItem.java | 2 +- .../antimatter/item/DebugScannerItem.java | 6 +-- .../muramasa/antimatter/item/ItemBattery.java | 9 ++-- .../antimatter/item/ItemFluidCell.java | 7 ++- .../item/ItemMultiTextureBattery.java | 6 --- .../antimatter/machine/BlockMachine.java | 6 +-- .../antimatter/machine/ITooltipInfo.java | 2 +- .../machine/types/BasicMachine.java | 7 --- .../machine/types/BasicMultiMachine.java | 7 --- .../machine/types/GeneratorMachine.java | 5 +-- .../antimatter/machine/types/Machine.java | 7 +-- .../antimatter/machine/types/TankMachine.java | 6 +-- .../antimatter/material/MaterialItem.java | 14 +++--- .../antimatter/material/MaterialType.java | 1 + .../material/MaterialTypeBlock.java | 1 - .../material/tags/DoubleMaterialTag.java | 1 - .../mixin/GrindstoneContainerMixin.java | 4 +- .../antimatter/mixin/HopperBlockMixin.java | 1 - .../antimatter/mixin/IceBlockMixin.java | 3 +- .../antimatter/mixin/ItemStackMixin.java | 3 -- .../mixin/RepairItemRecipeMixin.java | 1 - .../mixin/SimpleReloadInstanceMixin.java | 7 --- .../antimatter/mixin/TagLoaderMixin.java | 2 - .../network/packets/CoverGuiEventPacket.java | 1 - .../packets/ServerboundGuiSyncPacket.java | 3 -- .../network/packets/TileGuiEventPacket.java | 7 --- .../antimatter/ore/BlockMaterialStone.java | 3 +- .../muramasa/antimatter/ore/BlockOre.java | 6 +-- .../antimatter/ore/BlockOreStone.java | 1 - .../muramasa/antimatter/pipe/BlockCable.java | 3 +- .../antimatter/pipe/BlockFluidPipe.java | 7 +-- .../antimatter/pipe/BlockHeatPipe.java | 4 +- .../muramasa/antimatter/pipe/BlockPipe.java | 12 ++---- .../antimatter/pipe/FluidPipeTicker.java | 1 - .../antimatter/pipe/PipeItemBlock.java | 5 +-- .../antimatter/pipe/types/HeatPipe.java | 3 -- .../antimatter/proxy/ClientHandler.java | 5 +-- .../muramasa/antimatter/recipe/IRecipe.java | 6 +-- .../muramasa/antimatter/recipe/Recipe.java | 18 ++++---- .../antimatter/recipe/RecipeBuilders.java | 18 ++------ .../antimatter/recipe/RecipeUtil.java | 3 -- .../container/ContainerItemShapedRecipe.java | 3 -- .../ContainerItemShapelessRecipe.java | 2 - .../recipe/ingredient/MapTagIngredient.java | 5 --- .../recipe/ingredient/PropertyIngredient.java | 12 ++---- .../recipe/ingredient/RecipeIngredient.java | 13 +----- .../ingredient/SpecialIngredientWrapper.java | 5 +-- .../ingredient/test/NameIngredient.java | 2 +- .../antimatter/recipe/map/IRecipeMap.java | 12 +++--- .../antimatter/recipe/map/RecipeBuilder.java | 7 +-- .../antimatter/recipe/map/RecipeMap.java | 22 +++++----- .../recipe/material/MaterialRecipe.java | 7 ++- .../recipe/material/MaterialSerializer.java | 2 +- .../AntimatterRecipeSerializer.java | 2 +- .../registration/IColorHandler.java | 3 +- .../antimatter/structure/FakeTileElement.java | 2 - .../antimatter/structure/Structure.java | 11 ++--- .../structure/StructureBuilder.java | 3 -- .../antimatter/structure/StructureCache.java | 6 +-- .../antimatter/structure/StructureHandle.java | 3 +- .../antimatter/tile/TileEntityBase.java | 5 +-- .../antimatter/tile/TileEntityFakeBlock.java | 6 +-- .../antimatter/tile/TileEntityMachine.java | 18 +++----- .../antimatter/tile/TileEntityStorage.java | 4 -- .../antimatter/tile/TileEntityTank.java | 3 +- .../multi/TileEntityBasicMultiMachine.java | 8 ++-- .../tile/multi/TileEntityHatch.java | 4 -- .../tile/multi/TileEntityMultiMachine.java | 6 +-- .../tile/pipe/TileEntityFluidPipe.java | 2 +- .../antimatter/tile/pipe/TileEntityPipe.java | 2 +- .../single/TileEntityInfiniteStorage.java | 1 - .../tile/single/TileEntityTransformer.java | 2 - .../antimatter/tool/AntimatterItemTier.java | 4 +- .../antimatter/tool/AntimatterToolType.java | 2 +- .../antimatter/tool/IAbstractToolMethods.java | 13 ------ .../antimatter/tool/IAntimatterArmor.java | 8 +--- .../antimatter/tool/IAntimatterTool.java | 7 ++- .../antimatter/tool/MaterialSword.java | 19 +++----- .../antimatter/tool/MaterialTool.java | 21 ++++----- .../tool/armor/AntimatterArmorType.java | 2 +- .../antimatter/tool/armor/MaterialArmor.java | 8 +--- .../tool/behaviour/BehaviourTorchPlacing.java | 3 +- .../tool/behaviour/BehaviourTreeFelling.java | 6 +-- .../antimatter/util/AntimatterCapUtils.java | 2 - .../util/AntimatterPlatformUtils.java | 4 +- .../muramasa/antimatter/util/LazyHolder.java | 2 +- .../antimatter/util/NonNullSupplier.java | 4 +- .../antimatter/util/RotationHelper.java | 2 +- .../muramasa/antimatter/util/TagUtils.java | 4 -- .../java/muramasa/antimatter/util/Utils.java | 12 +++--- .../java/muramasa/antimatter/util/int3.java | 13 +++--- .../AntimatterConfiguredFeatures.java | 4 -- .../worldgen/AntimatterWorldGenerator.java | 8 ++-- .../antimatter/worldgen/StoneLayerOre.java | 2 - .../antimatter/worldgen/WorldGenHelper.java | 2 +- .../worldgen/feature/FeatureVanillaOres.java | 1 - .../worldgen/object/WorldGenStoneLayer.java | 6 +-- .../object/WorldGenStoneLayerBuilder.java | 3 +- .../smallore/WorldGenSmallOreBuilder.java | 2 +- .../vanillaore/WorldGenVanillaOre.java | 1 - .../vanillaore/WorldGenVanillaOreBuilder.java | 4 +- .../worldgen/vein/WorldGenVeinLayer.java | 6 --- .../vein/WorldGenVeinLayerBuilder.java | 9 +--- .../worldgen/vein/old/WorldGenVein.java | 2 +- .../vein/old/WorldGenVeinBuilder.java | 2 +- .../vein/old/WorldGenVeinVariantBuilder.java | 2 +- .../WorldGenVeinVariantMaterialBuilder.java | 3 +- fabric/build.gradle | 20 ++++----- fabric/gradle.properties | 2 + .../client/fabric/AntimatterClientImpl.java | 2 - .../client/fabric/ModelUtilsImpl.java | 15 ++----- .../loader/fabric/ModelLoaderWrapper.java | 2 - .../antimatter/fabric/AntimatterAPIImpl.java | 6 --- .../antimatter/fabric/AntimatterImpl.java | 5 --- .../antimatter/fabric/LootTableExtension.java | 1 - .../fabric/FluidAttributesVariantWrapper.java | 1 - .../megane/AntimatterMeganeModule.java | 6 +-- .../provider/MachineEnergyProvider.java | 2 +- .../provider/MachineProgressProvider.java | 2 +- .../kubejs/fabric/AntimatterKubeJSImpl.java | 7 --- .../mixin/fabric/LootTableMixin.java | 3 -- .../mixin/fabric/LootTablesMixin.java | 1 - .../mixin/fabric/RecipeIngredientMixin.java | 1 - .../client/IAntimatterBakedModelMixin.java | 5 +-- .../fabric/AntimatterRegistration.java | 11 +---- .../behaviour/fabric/BehaviourUtilImpl.java | 1 - .../fabric/AntimatterPlatformUtilsImpl.java | 2 +- .../antimatter/util/fabric/UtilsImpl.java | 1 - .../fabric/AntimatterFabricWorldgen.java | 8 +--- .../resources/antimatter-fabric.mixins.json | 4 +- forge/build.gradle | 7 +-- .../capability/forge/AntimatterCaps.java | 2 - .../client/event/forge/ClientEventsForge.java | 43 ------------------- .../client/forge/ModelUtilsImpl.java | 8 ++-- .../common/event/forge/ForgeCommonEvents.java | 43 ------------------- .../common/event/forge/ModCommonEvents.java | 2 - .../event/forge/AntimatterProvidersEvent.java | 3 -- .../event/forge/AntimatterWorldGenEvent.java | 3 -- .../fluid/forge/FluidUtilsImpl.java | 2 - .../antimatter/forge/AntimatterAPIImpl.java | 5 --- .../antimatter/forge/AntimatterImpl.java | 6 +-- .../antimatter/gui/forge/MenuHandlerImpl.java | 1 - .../ct/forge/CrafttweakerUtilsImpl.java | 1 - .../jei/forge/AntimatterJEIPluginImpl.java | 1 - .../mixin/forge/CapabilityManagerMixin.java | 1 - .../forge/ContainerShapedSerializerMixin.java | 2 - .../mixin/forge/MaterialSerializerMixin.java | 3 -- .../mixin/forge/PropertyIngredientMixin.java | 1 - .../mixin/forge/RecipeIngredientMixin.java | 1 - .../mixin/forge/TileEntityFakeBlockMixin.java | 1 - .../mixin/forge/TileEntityMachineMixin.java | 3 -- .../mixin/forge/TileEntityPipeMixin.java | 1 - .../client/IAntimatterBakedModelMixin.java | 9 ++-- .../recipe/forge/RecipeUtilImpl.java | 2 - .../forge/AntimatterRegistration.java | 14 +----- .../behaviour/forge/BehaviourUtilImpl.java | 2 - .../util/forge/AntimatterCapUtilsImpl.java | 2 - .../forge/AntimatterPlatformUtilsImpl.java | 15 +++---- .../forge/AntimatterPreLaunchUtilImpl.java | 1 - .../antimatter/util/forge/UtilsImpl.java | 3 -- gradle/wrapper/gradle-wrapper.properties | 2 +- 319 files changed, 534 insertions(+), 1263 deletions(-) rename {common/src/main/java/muramasa/antimatter/integration => fabric/src/main/java/muramasa/antimatter/integration/fabric}/megane/AntimatterMeganeModule.java (75%) rename {common/src/main/java/muramasa/antimatter/integration => fabric/src/main/java/muramasa/antimatter/integration/fabric}/megane/provider/MachineEnergyProvider.java (89%) rename {common/src/main/java/muramasa/antimatter/integration => fabric/src/main/java/muramasa/antimatter/integration/fabric}/megane/provider/MachineProgressProvider.java (95%) diff --git a/TesseractAPI b/TesseractAPI index 2dcd6b930..601e0771c 160000 --- a/TesseractAPI +++ b/TesseractAPI @@ -1 +1 @@ -Subproject commit 2dcd6b930dc4ca4a5aa3bab864156a94f484e99b +Subproject commit 601e0771c05de86e045f779fcc018bedc06b37ef diff --git a/build.gradle b/build.gradle index dcc211763..afeaf32e4 100644 --- a/build.gradle +++ b/build.gradle @@ -91,17 +91,17 @@ subprojects{ shadowJar { configurations = [project.configurations.shadowCommon] - classifier "dev-shadow" + archiveClassifier.set "dev-shadow" } remapJar { input.set shadowJar.archiveFile dependsOn shadowJar - classifier null + archiveClassifier.set null } jar { - classifier "dev" + archiveClassifier.set "dev" } components.java { diff --git a/common/build.gradle b/common/build.gradle index 0db56630f..b94c69fdf 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -38,7 +38,6 @@ dependencies{ modImplementation("com.gtnewhorizon.structurelib:structurelib-common:${project.structurelib_version}-${project.minecraft_version}") modImplementation("net.minecraftforge:forgeconfigapiport-fabric:3.2.4") modCompileOnly("curse.maven:the-one-probe-fabric-581847:${project.top_fabric_file}") - modCompileOnly "lol.bai.megane:megane-reborn-energy:${project.megane_version}" modImplementation("earth.terrarium:botarium-common-1.18.2:${project.botarium_version}") modImplementation "com.teamresourceful.resourcefullib:resourcefullib-common-1.18.2:${project.resourcefullib_version}" diff --git a/common/gradle.properties b/common/gradle.properties index b839413d4..5fe258496 100644 --- a/common/gradle.properties +++ b/common/gradle.properties @@ -1,4 +1,3 @@ mod_version=0.2-rc46 ct_fabric_fluid_support_hash=1.0.1 top_fabric_file=3877300 -megane_version=7.7.2 diff --git a/common/src/main/java/muramasa/antimatter/AntimatterAPI.java b/common/src/main/java/muramasa/antimatter/AntimatterAPI.java index 93e878231..ed979e346 100644 --- a/common/src/main/java/muramasa/antimatter/AntimatterAPI.java +++ b/common/src/main/java/muramasa/antimatter/AntimatterAPI.java @@ -31,9 +31,9 @@ import net.minecraft.world.level.block.state.BlockState; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.util.TriConsumer; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; import java.util.function.Consumer; import java.util.function.Supplier; @@ -172,13 +172,13 @@ public static T get(Class c, St return getInternal(c, id); } - @Nonnull + @NotNull public static T getOrDefault(Class c, String id, String domain, NonNullSupplier supplier) { Object obj = get(c, id, domain); return obj != null ? c.cast(obj) : supplier.get(); } - @Nonnull + @NotNull public static T getOrThrow(Class c, String id, String domain, Supplier supplier) { Object obj = get(c, id, domain); @@ -188,7 +188,7 @@ public static T getOrThrow(Class c, String id, String domain, throw supplier.get(); } - @Nonnull + @NotNull public static T getOrThrow(Class c, String id, Supplier supplier) { Object obj = get(c, id); @@ -274,7 +274,7 @@ private static Stream allInternal(Class c) { : new Object2ObjectArrayMap<>(map).values().stream().flatMap(t -> t.map(Stream::of, right -> right.values().stream())).map(c::cast); } - private static Stream allInternal(Class c, @Nonnull String domain) { + private static Stream allInternal(Class c, @NotNull String domain) { return allInternal(c) .filter(o -> o instanceof IAntimatterObject && ((IAntimatterObject) o).getDomain().equals(domain) || isRegistryEntry(o, domain)); diff --git a/common/src/main/java/muramasa/antimatter/AntimatterProperties.java b/common/src/main/java/muramasa/antimatter/AntimatterProperties.java index 48f681ec4..a90229655 100644 --- a/common/src/main/java/muramasa/antimatter/AntimatterProperties.java +++ b/common/src/main/java/muramasa/antimatter/AntimatterProperties.java @@ -8,8 +8,8 @@ import muramasa.antimatter.texture.Texture; import muramasa.antimatter.tile.TileEntityMachine.DynamicKey; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.function.Function; public class AntimatterProperties { diff --git a/common/src/main/java/muramasa/antimatter/Data.java b/common/src/main/java/muramasa/antimatter/Data.java index f0c644683..a8cc163d6 100644 --- a/common/src/main/java/muramasa/antimatter/Data.java +++ b/common/src/main/java/muramasa/antimatter/Data.java @@ -1,15 +1,7 @@ package muramasa.antimatter; import muramasa.antimatter.capability.IGuiHandler; -import muramasa.antimatter.cover.CoverDebug; -import muramasa.antimatter.cover.CoverDynamo; -import muramasa.antimatter.cover.CoverEnergy; -import muramasa.antimatter.cover.CoverFactory; -import muramasa.antimatter.cover.CoverHeat; -import muramasa.antimatter.cover.CoverInput; -import muramasa.antimatter.cover.CoverMuffler; -import muramasa.antimatter.cover.CoverOutput; -import muramasa.antimatter.cover.ICover; +import muramasa.antimatter.cover.*; import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.gui.ButtonOverlay; import muramasa.antimatter.gui.MenuHandlerCover; @@ -38,15 +30,15 @@ import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.PushReaction; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; - -; import static muramasa.antimatter.gui.ButtonOverlay.APAD_RIGHT; import static muramasa.antimatter.machine.MachineFlag.ENERGY; import static muramasa.antimatter.machine.MachineFlag.GUI; import static muramasa.antimatter.machine.Tier.MAX; +; + public class Data { public static final Material WRENCH_MATERIAL = new Material(MaterialColor.METAL, false, true, true, true, false, false, PushReaction.NORMAL); diff --git a/common/src/main/java/muramasa/antimatter/MaterialDataInit.java b/common/src/main/java/muramasa/antimatter/MaterialDataInit.java index 5c3b9af52..e62639d04 100644 --- a/common/src/main/java/muramasa/antimatter/MaterialDataInit.java +++ b/common/src/main/java/muramasa/antimatter/MaterialDataInit.java @@ -5,16 +5,13 @@ import muramasa.antimatter.data.AntimatterMaterials; import muramasa.antimatter.event.MaterialEvent; import muramasa.antimatter.material.MaterialTags; -import net.minecraft.data.loot.BlockLoot; import net.minecraft.world.item.Tiers; import net.minecraft.world.item.enchantment.Enchantments; import static com.google.common.collect.ImmutableMap.of; import static muramasa.antimatter.material.MaterialTags.MOLTEN; import static muramasa.antimatter.material.MaterialTags.QUARTZ_LIKE_BLOCKS; -import static net.minecraft.world.item.Tiers.GOLD; -import static net.minecraft.world.item.Tiers.IRON; -import static net.minecraft.world.item.Tiers.NETHERITE; +import static net.minecraft.world.item.Tiers.*; public class MaterialDataInit { public static void onMaterialEvent(MaterialEvent event){ diff --git a/common/src/main/java/muramasa/antimatter/behaviour/IAddInformation.java b/common/src/main/java/muramasa/antimatter/behaviour/IAddInformation.java index 36e736738..ba67d21df 100644 --- a/common/src/main/java/muramasa/antimatter/behaviour/IAddInformation.java +++ b/common/src/main/java/muramasa/antimatter/behaviour/IAddInformation.java @@ -1,10 +1,8 @@ package muramasa.antimatter.behaviour; import net.minecraft.network.chat.Component; -import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.item.context.UseOnContext; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/block/AntimatterItemBlock.java b/common/src/main/java/muramasa/antimatter/block/AntimatterItemBlock.java index 317ad1127..403561aa1 100644 --- a/common/src/main/java/muramasa/antimatter/block/AntimatterItemBlock.java +++ b/common/src/main/java/muramasa/antimatter/block/AntimatterItemBlock.java @@ -5,11 +5,9 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; public class AntimatterItemBlock extends BlockItem { @@ -17,9 +15,9 @@ public AntimatterItemBlock(Block block) { super(block, new Properties().tab(block instanceof IItemBlockProvider ? ((IItemBlockProvider) block).getItemGroup() : Ref.TAB_BLOCKS)); } - @Nonnull + @NotNull @Override - public Component getName(@Nonnull ItemStack stack) { + public Component getName(@NotNull ItemStack stack) { return getBlock() instanceof IItemBlockProvider ? ((IItemBlockProvider) getBlock()).getDisplayName(stack) : new TranslatableComponent(stack.getDescriptionId()); } } diff --git a/common/src/main/java/muramasa/antimatter/block/BlockMaterialType.java b/common/src/main/java/muramasa/antimatter/block/BlockMaterialType.java index ec4cabf89..2d49014b6 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockMaterialType.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockMaterialType.java @@ -9,8 +9,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public class BlockMaterialType extends BlockBasic implements IColorHandler { diff --git a/common/src/main/java/muramasa/antimatter/block/BlockStone.java b/common/src/main/java/muramasa/antimatter/block/BlockStone.java index 07506692c..60ff0a6f9 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockStone.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockStone.java @@ -1,11 +1,9 @@ package muramasa.antimatter.block; -import muramasa.antimatter.datagen.providers.AntimatterBlockStateProvider; import muramasa.antimatter.ore.CobbleStoneType; import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.registration.ISharedAntimatterObject; import muramasa.antimatter.texture.Texture; -import net.minecraft.world.level.block.Block; public class BlockStone extends BlockBasic implements ISharedAntimatterObject { diff --git a/common/src/main/java/muramasa/antimatter/block/BlockStoneSlab.java b/common/src/main/java/muramasa/antimatter/block/BlockStoneSlab.java index a00f33a22..ff1fb1dfa 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockStoneSlab.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockStoneSlab.java @@ -4,7 +4,6 @@ import muramasa.antimatter.data.AntimatterStoneTypes; import muramasa.antimatter.datagen.builder.AntimatterBlockModelBuilder; import muramasa.antimatter.datagen.builder.VariantBlockStateBuilder.VariantBuilder; -import net.minecraft.resources.ResourceLocation; import muramasa.antimatter.datagen.providers.AntimatterBlockStateProvider; import muramasa.antimatter.ore.CobbleStoneType; import muramasa.antimatter.ore.StoneType; @@ -12,6 +11,7 @@ import muramasa.antimatter.registration.ISharedAntimatterObject; import muramasa.antimatter.registration.ITextureProvider; import muramasa.antimatter.texture.Texture; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SlabBlock; import net.minecraft.world.level.block.state.properties.SlabType; diff --git a/common/src/main/java/muramasa/antimatter/block/BlockStoneStair.java b/common/src/main/java/muramasa/antimatter/block/BlockStoneStair.java index 27ce6e3d5..3bbd6e948 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockStoneStair.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockStoneStair.java @@ -17,10 +17,7 @@ import net.minecraft.world.level.block.state.properties.Half; import net.minecraft.world.level.block.state.properties.StairsShape; -import static net.minecraft.core.Direction.EAST; -import static net.minecraft.core.Direction.NORTH; -import static net.minecraft.core.Direction.SOUTH; -import static net.minecraft.core.Direction.WEST; +import static net.minecraft.core.Direction.*; import static net.minecraft.world.level.block.state.properties.StairsShape.STRAIGHT; public class BlockStoneStair extends StairBlock implements ISharedAntimatterObject, ITextureProvider, IModelProvider { diff --git a/common/src/main/java/muramasa/antimatter/block/BlockStorage.java b/common/src/main/java/muramasa/antimatter/block/BlockStorage.java index 2d8ce1b77..8e9b61c10 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockStorage.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockStorage.java @@ -14,9 +14,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; @@ -26,9 +24,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; - -import javax.annotation.Nullable; -import java.util.Map; +import org.jetbrains.annotations.Nullable; public class BlockStorage extends BlockMaterialType implements IItemBlockProvider, ISharedAntimatterObject { diff --git a/common/src/main/java/muramasa/antimatter/block/BlockSurfaceRock.java b/common/src/main/java/muramasa/antimatter/block/BlockSurfaceRock.java index 48d3b372b..db6b831ee 100644 --- a/common/src/main/java/muramasa/antimatter/block/BlockSurfaceRock.java +++ b/common/src/main/java/muramasa/antimatter/block/BlockSurfaceRock.java @@ -1,7 +1,6 @@ package muramasa.antimatter.block; import com.google.common.collect.ImmutableMap; -import muramasa.antimatter.Data; import muramasa.antimatter.Ref; import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.datagen.builder.AntimatterBlockModelBuilder; @@ -18,7 +17,6 @@ import muramasa.antimatter.util.Utils; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.Containers; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; diff --git a/common/src/main/java/muramasa/antimatter/capability/ComponentHandler.java b/common/src/main/java/muramasa/antimatter/capability/ComponentHandler.java index fe056d78a..98372bade 100644 --- a/common/src/main/java/muramasa/antimatter/capability/ComponentHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/ComponentHandler.java @@ -10,7 +10,6 @@ import muramasa.antimatter.tile.multi.TileEntityMultiMachine; import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.Collection; import java.util.Optional; import java.util.Set; @@ -33,13 +32,13 @@ public ComponentHandler(String componentId, T componentTile) { this(componentId, componentId, componentTile); } - @Nonnull + @NotNull @Override public String getId() { return componentId; } - @Nonnull + @NotNull @Override public T getTile() { return componentTile; @@ -50,31 +49,31 @@ public T getTile() { return idForHandlers; } - @Nonnull + @NotNull @Override public Optional> getItemHandler() { return componentTile instanceof TileEntityMachine machine ? machine.itemHandler.map(h -> h) : Optional.empty(); } - @Nonnull + @NotNull @Override public Optional> getFluidHandler() { return componentTile instanceof TileEntityMachine machine ? machine.fluidHandler.map(f -> f) : Optional.empty(); } - @Nonnull + @NotNull @Override public Optional> getEnergyHandler() { return componentTile instanceof TileEntityMachine machine ? machine.energyHandler.map(e -> e) : Optional.empty(); } @Override - public void onStructureFormed(@Nonnull TileEntityMultiMachine controllerTile) { + public void onStructureFormed(@NotNull TileEntityMultiMachine controllerTile) { this.controllers.add(controllerTile); } @Override - public void onStructureInvalidated(@Nonnull TileEntityMultiMachine controllerTile) { + public void onStructureInvalidated(@NotNull TileEntityMultiMachine controllerTile) { this.controllers.remove(controllerTile); } @@ -83,7 +82,7 @@ public boolean hasLinkedController() { return StructureCache.has(getTile().getLevel(), getTile().getBlockPos()); } - @Nonnull + @NotNull @Override public Collection> getControllers() { return controllers; diff --git a/common/src/main/java/muramasa/antimatter/capability/CoverHandler.java b/common/src/main/java/muramasa/antimatter/capability/CoverHandler.java index 9a3b09f09..c99251842 100644 --- a/common/src/main/java/muramasa/antimatter/capability/CoverHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/CoverHandler.java @@ -22,9 +22,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; import java.util.stream.Collectors; @@ -53,7 +53,7 @@ public DynamicTexturer getTexturer(Direction dir) { } @Override - public boolean set(Direction side, @Nonnull ICover newCover, boolean sync) { + public boolean set(Direction side, @NotNull ICover newCover, boolean sync) { if (!validCovers.contains(newCover.getLoc())) return false; ICover old = covers.getOrDefault(side, ICover.empty); return set(side, old, newCover, sync); @@ -195,7 +195,7 @@ public boolean hasCover(Class clazz) { } @Override - public boolean isValid(@Nonnull Direction side, @Nonnull ICover replacement) { + public boolean isValid(@NotNull Direction side, @NotNull ICover replacement) { return (get(side).isEmpty() || replacement.isEqual(ICover.empty)) && validCovers.contains(replacement.getId()); } diff --git a/common/src/main/java/muramasa/antimatter/capability/EnergyHandler.java b/common/src/main/java/muramasa/antimatter/capability/EnergyHandler.java index 114712daa..c2b8c4677 100644 --- a/common/src/main/java/muramasa/antimatter/capability/EnergyHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/EnergyHandler.java @@ -4,9 +4,7 @@ import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import tesseract.api.gt.GTConsumer; -import tesseract.api.gt.GTTransaction; import tesseract.api.gt.IEnergyHandler; -import tesseract.api.gt.IGTNode; public class EnergyHandler implements IEnergyHandler { diff --git a/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java b/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java index d63d3d1b6..45ee36474 100644 --- a/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java @@ -3,7 +3,6 @@ import earth.terrarium.botarium.common.fluid.base.FluidContainer; import earth.terrarium.botarium.common.fluid.base.FluidHolder; import earth.terrarium.botarium.common.fluid.base.FluidSnapshot; -import earth.terrarium.botarium.common.fluid.impl.SimpleFluidSnapshot; import earth.terrarium.botarium.common.fluid.utils.FluidHooks; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.capability.fluid.FluidTank; @@ -16,11 +15,11 @@ import net.minecraft.nbt.Tag; import net.minecraft.util.Mth; import net.minecraft.world.level.material.Fluids; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.api.fluid.IFluidNode; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; public abstract class FluidHandler implements IMachineHandler, IFluidNode { @@ -72,7 +71,7 @@ public int getSize() { return this.tanks.values().stream().mapToInt(FluidTanks::getSize).sum(); } - @Nonnull + @NotNull @Override public FluidHolder getFluidInTank(int tank) { return getTank(tank).getStoredFluid(); @@ -120,7 +119,7 @@ public long getTankCapacity(int tank) { } @Override - public boolean isFluidValid(int tank, @Nonnull FluidHolder stack) { + public boolean isFluidValid(int tank, @NotNull FluidHolder stack) { return getTank(tank).isFluidValid(stack); } @@ -180,7 +179,7 @@ public FluidHolder extractFluid(long toExtract, boolean simulate) { * @param simulate execute/simulate * @return the drained stack */ - @Nonnull + @NotNull @Override public FluidHolder drainInput(FluidHolder stack, boolean simulate) { if (getInputTanks() != null) { @@ -215,7 +214,7 @@ public void onMachineEvent(IMachineEvent event, Object... data) { /** * Helpers **/ - @Nonnull + @NotNull public FluidHolder[] getInputs() { FluidTanks tanks = getInputTanks(); return tanks == null ? new FluidHolder[0] : tanks.getFluids().toArray(FluidHolder[]::new); diff --git a/common/src/main/java/muramasa/antimatter/capability/FluidHandlerSnapshot.java b/common/src/main/java/muramasa/antimatter/capability/FluidHandlerSnapshot.java index f2098eedb..2cc456766 100644 --- a/common/src/main/java/muramasa/antimatter/capability/FluidHandlerSnapshot.java +++ b/common/src/main/java/muramasa/antimatter/capability/FluidHandlerSnapshot.java @@ -4,9 +4,9 @@ import earth.terrarium.botarium.common.fluid.base.FluidHolder; import earth.terrarium.botarium.common.fluid.base.FluidSnapshot; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; -import muramasa.antimatter.capability.FluidHandler; -import java.util.*; +import java.util.EnumMap; +import java.util.Map; public class FluidHandlerSnapshot implements FluidSnapshot { EnumMap> map = new EnumMap<>(FluidHandler.FluidDirection.class); diff --git a/common/src/main/java/muramasa/antimatter/capability/Holder.java b/common/src/main/java/muramasa/antimatter/capability/Holder.java index d2c6dee4d..ed4425f86 100644 --- a/common/src/main/java/muramasa/antimatter/capability/Holder.java +++ b/common/src/main/java/muramasa/antimatter/capability/Holder.java @@ -4,8 +4,8 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.Ref; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.HashSet; import java.util.List; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/capability/IComponentHandler.java b/common/src/main/java/muramasa/antimatter/capability/IComponentHandler.java index 754576ee3..0c38b61d6 100644 --- a/common/src/main/java/muramasa/antimatter/capability/IComponentHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/IComponentHandler.java @@ -9,11 +9,10 @@ import tesseract.TesseractCapUtils; import tesseract.api.heat.IHeatHandler; -import javax.annotation.ParametersAreNonnullByDefault; import java.util.Collection; import java.util.Optional; -@ParametersAreNonnullByDefault +//@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public interface IComponentHandler { diff --git a/common/src/main/java/muramasa/antimatter/capability/ICoverHandler.java b/common/src/main/java/muramasa/antimatter/capability/ICoverHandler.java index 50941c303..3ce5adddd 100644 --- a/common/src/main/java/muramasa/antimatter/capability/ICoverHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/ICoverHandler.java @@ -9,8 +9,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public interface ICoverHandler extends Serializable { diff --git a/common/src/main/java/muramasa/antimatter/capability/IInteractHandler.java b/common/src/main/java/muramasa/antimatter/capability/IInteractHandler.java index e15f2f509..e74b47568 100644 --- a/common/src/main/java/muramasa/antimatter/capability/IInteractHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/IInteractHandler.java @@ -5,8 +5,7 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.entity.BlockEntity; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public interface IInteractHandler { diff --git a/common/src/main/java/muramasa/antimatter/capability/InteractHandler.java b/common/src/main/java/muramasa/antimatter/capability/InteractHandler.java index fcfd2bc84..5014da0a4 100644 --- a/common/src/main/java/muramasa/antimatter/capability/InteractHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/InteractHandler.java @@ -5,9 +5,8 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.entity.BlockEntity; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class InteractHandler implements IInteractHandler { @@ -22,7 +21,7 @@ public boolean onInteract(Player player, InteractionHand hand, Direction side, @ return false; } - @Nonnull + @NotNull @Override public T getTile() { if (tile == null) throw new NullPointerException("InteractHandler cannot have a null tile"); diff --git a/common/src/main/java/muramasa/antimatter/capability/energy/ItemEnergyHandler.java b/common/src/main/java/muramasa/antimatter/capability/energy/ItemEnergyHandler.java index c87ee96d5..349ca0c26 100644 --- a/common/src/main/java/muramasa/antimatter/capability/energy/ItemEnergyHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/energy/ItemEnergyHandler.java @@ -6,7 +6,6 @@ import net.minecraft.nbt.CompoundTag; import org.jetbrains.annotations.NotNull; import tesseract.api.context.TesseractItemContext; -import tesseract.api.gt.GTTransaction; import tesseract.api.gt.IEnergyHandlerItem; /** diff --git a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerNullSideWrapper.java b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerNullSideWrapper.java index 6c5ba3db1..af34fca51 100644 --- a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerNullSideWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerNullSideWrapper.java @@ -9,7 +9,6 @@ import net.minecraft.nbt.CompoundTag; import tesseract.api.fluid.IFluidNode; -import javax.annotation.Nonnull; import java.util.List; public class FluidHandlerNullSideWrapper implements IFluidNode { diff --git a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerSidedWrapper.java b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerSidedWrapper.java index f5e51ff30..e018c2664 100644 --- a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerSidedWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidHandlerSidedWrapper.java @@ -5,13 +5,12 @@ import earth.terrarium.botarium.common.fluid.base.FluidSnapshot; import earth.terrarium.botarium.common.fluid.utils.FluidHooks; import muramasa.antimatter.capability.CoverHandler; -import muramasa.antimatter.capability.FluidHandler; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import org.jetbrains.annotations.NotNull; import tesseract.api.fluid.FluidContainerHandler; import tesseract.api.fluid.IFluidNode; -import javax.annotation.Nonnull; import java.util.List; public class FluidHandlerSidedWrapper implements IFluidNode, FluidContainerHandler { @@ -40,7 +39,7 @@ public FluidContainer copy() { return new FluidHandlerSidedWrapper(fluidHandler, coverHandler, side); } - @Nonnull + @NotNull @Override public FluidHolder getFluidInTank(int tank) { return fluidHandler.getFluidInTank(tank); @@ -66,7 +65,7 @@ public long extractFromSlot(FluidHolder fluidHolder, FluidHolder toInsert, Runna } @Override - public boolean isFluidValid(int tank, @Nonnull FluidHolder stack) { + public boolean isFluidValid(int tank, @NotNull FluidHolder stack) { return fluidHandler.isFluidValid(tank, stack); } @@ -92,7 +91,7 @@ public long insertFluid(FluidHolder resource, boolean simulate) { return fluidHandler.insertFluid(resource, simulate); } - @Nonnull + @NotNull @Override public FluidHolder extractFluid(FluidHolder resource, boolean simulate) { if (coverHandler != null && coverHandler.get(side).blocksOutput(FluidContainer.class, side)) { diff --git a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTank.java b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTank.java index d24bf8f81..d46f2ccee 100644 --- a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTank.java +++ b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTank.java @@ -8,16 +8,16 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Mth; import net.minecraft.world.level.material.Fluids; +import org.jetbrains.annotations.NotNull; import tesseract.api.fluid.FluidContainerHandler; -import javax.annotation.Nonnull; import java.util.List; import java.util.Objects; import java.util.function.Predicate; public class FluidTank implements FluidContainer, FluidContainerHandler { protected Predicate validator; - @Nonnull + @NotNull protected FluidHolder storedFluid = FluidHooks.emptyFluid(); protected long capacity; public FluidTank(long capacity) @@ -49,7 +49,7 @@ public long getCapacity() { return capacity; } - @Nonnull + @NotNull public FluidHolder getStoredFluid() { return storedFluid; } diff --git a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTanks.java b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTanks.java index 855b7e3a1..727ab91a1 100644 --- a/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTanks.java +++ b/common/src/main/java/muramasa/antimatter/capability/fluid/FluidTanks.java @@ -19,7 +19,6 @@ import tesseract.TesseractGraphWrappers; import tesseract.api.fluid.FluidContainerHandler; -import javax.annotation.Nonnull; import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -131,7 +130,7 @@ public FluidContainer copy() { return null; } - @Nonnull + @NotNull public FluidHolder getFluidInTank(int tank) { return this.tanks[tank].getStoredFluid(); } @@ -173,7 +172,7 @@ public FluidSnapshot createSnapshot() { return new SimpleFluidSnapshot(this); } - public boolean isFluidValid(int tank, @Nonnull FluidHolder stack) { + public boolean isFluidValid(int tank, @NotNull FluidHolder stack) { return this.tanks[tank].isFluidValid(stack); } diff --git a/common/src/main/java/muramasa/antimatter/capability/fluid/PipeFluidHandlerSidedWrapper.java b/common/src/main/java/muramasa/antimatter/capability/fluid/PipeFluidHandlerSidedWrapper.java index f2e3f70ec..18a4beb45 100644 --- a/common/src/main/java/muramasa/antimatter/capability/fluid/PipeFluidHandlerSidedWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/fluid/PipeFluidHandlerSidedWrapper.java @@ -3,12 +3,10 @@ import earth.terrarium.botarium.common.fluid.base.FluidContainer; import earth.terrarium.botarium.common.fluid.base.FluidHolder; import earth.terrarium.botarium.common.fluid.utils.FluidHooks; -import muramasa.antimatter.capability.CoverHandler; import muramasa.antimatter.capability.FluidHandler; import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; import net.minecraft.core.Direction; import org.jetbrains.annotations.NotNull; -import tesseract.api.fluid.IFluidNode; public class PipeFluidHandlerSidedWrapper extends FluidHandlerSidedWrapper{ TileEntityFluidPipe pipe; diff --git a/common/src/main/java/muramasa/antimatter/capability/item/CombinedInvWrapper.java b/common/src/main/java/muramasa/antimatter/capability/item/CombinedInvWrapper.java index f0b4751d6..b0e7145dc 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/CombinedInvWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/CombinedInvWrapper.java @@ -2,10 +2,9 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; - public class CombinedInvWrapper implements ExtendedItemContainer { protected final ExtendedItemContainer[] itemHandler; // the handlers @@ -59,8 +58,8 @@ protected int getSlotFromIndex(int slot, int index) } @Override - @Nonnull - public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) + @NotNull + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { int index = getIndexForSlot(slot); ExtendedItemContainer handler = getHandlerFromIndex(index); @@ -69,7 +68,7 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate } @Override - @Nonnull + @NotNull public ItemStack extractItem(int slot, int amount, boolean simulate) { int index = getIndexForSlot(slot); @@ -88,7 +87,7 @@ public int getSlotLimit(int slot) } @Override - public boolean canPlaceItem(int slot, @Nonnull ItemStack stack) + public boolean canPlaceItem(int slot, @NotNull ItemStack stack) { int index = getIndexForSlot(slot); ExtendedItemContainer handler = getHandlerFromIndex(index); diff --git a/common/src/main/java/muramasa/antimatter/capability/item/FakeTrackedItemHandler.java b/common/src/main/java/muramasa/antimatter/capability/item/FakeTrackedItemHandler.java index 56cda557a..df10f6897 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/FakeTrackedItemHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/FakeTrackedItemHandler.java @@ -2,10 +2,9 @@ import muramasa.antimatter.capability.IGuiHandler; import muramasa.antimatter.machine.event.ContentEvent; -import muramasa.antimatter.tile.TileEntityMachine; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.function.BiPredicate; public class FakeTrackedItemHandler extends TrackedItemHandler { @@ -13,7 +12,7 @@ public FakeTrackedItemHandler(T tile, int size, boolean output, boolean input, B super(tile, size, output, input, validator, contentEvent); } - @Nonnull + @NotNull @Override public ItemStack extractFromInput(int slot, int amount, boolean simulate) { super.extractFromInput(slot, amount, simulate); @@ -21,7 +20,7 @@ public ItemStack extractFromInput(int slot, int amount, boolean simulate) { } @Override - public void setItem(int slot, @Nonnull ItemStack stack) { + public void setItem(int slot, @NotNull ItemStack stack) { super.setItem(slot, stack.copy()); } } diff --git a/common/src/main/java/muramasa/antimatter/capability/item/ITrackedHandler.java b/common/src/main/java/muramasa/antimatter/capability/item/ITrackedHandler.java index caa07ffd9..5346d0a23 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/ITrackedHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/ITrackedHandler.java @@ -1,14 +1,13 @@ package muramasa.antimatter.capability.item; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; - public interface ITrackedHandler extends ExtendedItemContainer { - @Nonnull - ItemStack insertOutputItem(int slot, @Nonnull ItemStack stack, boolean simulate); + @NotNull + ItemStack insertOutputItem(int slot, @NotNull ItemStack stack, boolean simulate); - @Nonnull + @NotNull ItemStack extractFromInput(int slot, int amount, boolean simulate); } diff --git a/common/src/main/java/muramasa/antimatter/capability/item/ItemStackHandler.java b/common/src/main/java/muramasa/antimatter/capability/item/ItemStackHandler.java index 81e8cdad7..86de60f31 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/ItemStackHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/ItemStackHandler.java @@ -5,12 +5,11 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ContainerItemHandler; import tesseract.api.item.ExtendedItemContainer; import tesseract.util.ItemHandlerUtils; -import javax.annotation.Nonnull; - public class ItemStackHandler implements ExtendedItemContainer, ContainerItemHandler { protected NonNullList stacks; @@ -31,7 +30,7 @@ public void setSize(int size) { } @Override - public void setItem(int slot, @Nonnull ItemStack stack) { + public void setItem(int slot, @NotNull ItemStack stack) { this.validateSlotIndex(slot); this.stacks.set(slot, stack); this.onContentsChanged(slot); @@ -42,7 +41,7 @@ public int getContainerSize() { return this.stacks.size(); } - @Nonnull + @NotNull @Override public ItemStack getItem(int slot) { this.validateSlotIndex(slot); @@ -54,9 +53,9 @@ public ExtendedItemContainer getContainer() { return this; } - @Nonnull + @NotNull @Override - public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { if (stack.isEmpty()) { return ItemStack.EMPTY; } else if (!this.canPlaceItem(slot, stack)) { @@ -92,7 +91,7 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate } } - @Nonnull + @NotNull @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { if (amount == 0) { @@ -129,12 +128,12 @@ public int getSlotLimit(int slot) { return 64; } - protected int getStackLimit(int slot, @Nonnull ItemStack stack) { + protected int getStackLimit(int slot, @NotNull ItemStack stack) { return Math.min(this.getSlotLimit(slot), stack.getMaxStackSize()); } @Override - public boolean canPlaceItem(int slot, @Nonnull ItemStack stack) { + public boolean canPlaceItem(int slot, @NotNull ItemStack stack) { return true; } diff --git a/common/src/main/java/muramasa/antimatter/capability/item/MultiTrackedItemHandler.java b/common/src/main/java/muramasa/antimatter/capability/item/MultiTrackedItemHandler.java index 47bcadfbb..061b06e98 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/MultiTrackedItemHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/MultiTrackedItemHandler.java @@ -2,26 +2,25 @@ import muramasa.antimatter.capability.machine.MachineItemHandler; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; - public class MultiTrackedItemHandler extends CombinedInvWrapper implements ITrackedHandler { public MultiTrackedItemHandler(ExtendedItemContainer... itemHandler) { super(itemHandler); } - @Nonnull + @NotNull @Override - public ItemStack insertOutputItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + public ItemStack insertOutputItem(int slot, @NotNull ItemStack stack, boolean simulate) { int index = getIndexForSlot(slot); ExtendedItemContainer handler = getHandlerFromIndex(index); slot = getSlotFromIndex(slot, index); return MachineItemHandler.insertIntoOutput(handler, slot, stack, simulate); } - @Nonnull + @NotNull @Override public ItemStack extractFromInput(int slot, int amount, boolean simulate) { int index = getIndexForSlot(slot); diff --git a/common/src/main/java/muramasa/antimatter/capability/item/ROCombinedInvWrapper.java b/common/src/main/java/muramasa/antimatter/capability/item/ROCombinedInvWrapper.java index 90fbda8f8..9d79dff81 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/ROCombinedInvWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/ROCombinedInvWrapper.java @@ -2,30 +2,29 @@ import net.minecraft.core.Direction; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; import tesseract.api.item.IItemNode; -import javax.annotation.Nonnull; - public class ROCombinedInvWrapper extends CombinedInvWrapper implements IItemNode { public ROCombinedInvWrapper(ExtendedItemContainer... itemHandler) { super(itemHandler); } - @Nonnull + @NotNull @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { return super.extractItem(slot, amount, true); } - @Nonnull + @NotNull @Override - public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { return stack; } @Override - public void setItem(int slot, @Nonnull ItemStack stack) { + public void setItem(int slot, @NotNull ItemStack stack) { } @Override diff --git a/common/src/main/java/muramasa/antimatter/capability/item/SidedCombinedInvWrapper.java b/common/src/main/java/muramasa/antimatter/capability/item/SidedCombinedInvWrapper.java index 1386a00cd..f77699326 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/SidedCombinedInvWrapper.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/SidedCombinedInvWrapper.java @@ -3,11 +3,10 @@ import muramasa.antimatter.capability.CoverHandler; import net.minecraft.core.Direction; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; import tesseract.api.item.IItemNode; -import javax.annotation.Nonnull; - public class SidedCombinedInvWrapper extends CombinedInvWrapper implements IItemNode { Direction side; CoverHandler coverHandler; @@ -18,9 +17,9 @@ public SidedCombinedInvWrapper(Direction side, CoverHandler coverHandler, Ext this.coverHandler = coverHandler; } - @Nonnull + @NotNull @Override - public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { if (coverHandler != null) { if (coverHandler.get(side).blocksInput(ExtendedItemContainer.class, side)) { return stack; @@ -32,7 +31,7 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate return super.insertItem(slot, stack, simulate); } - @Nonnull + @NotNull @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { if (coverHandler != null && coverHandler.get(side).blocksOutput(ExtendedItemContainer.class, side)) diff --git a/common/src/main/java/muramasa/antimatter/capability/item/TrackedItemHandler.java b/common/src/main/java/muramasa/antimatter/capability/item/TrackedItemHandler.java index 5ffd81809..0eb63d143 100644 --- a/common/src/main/java/muramasa/antimatter/capability/item/TrackedItemHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/item/TrackedItemHandler.java @@ -1,14 +1,13 @@ package muramasa.antimatter.capability.item; import muramasa.antimatter.capability.IGuiHandler; -import muramasa.antimatter.capability.IMachineHandler; import muramasa.antimatter.cover.ICover; import muramasa.antimatter.machine.event.ContentEvent; import muramasa.antimatter.tile.TileEntityMachine; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.function.BiPredicate; public class TrackedItemHandler extends ItemStackHandler implements ITrackedHandler { @@ -52,9 +51,9 @@ public void onContentsChanged(int slot) { } - @Nonnull + @NotNull @Override - public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { if (!input) return stack; boolean validate = validator.test(tile, stack); @@ -66,12 +65,12 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate return super.insertItem(slot, stack, simulate); } - @Nonnull - public ItemStack insertOutputItem(int slot, @Nonnull ItemStack stack, boolean simulate) { + @NotNull + public ItemStack insertOutputItem(int slot, @NotNull ItemStack stack, boolean simulate) { return super.insertItem(slot, stack, simulate); } - @Nonnull + @NotNull @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { if (!output) @@ -79,7 +78,7 @@ public ItemStack extractItem(int slot, int amount, boolean simulate) { return super.extractItem(slot, amount, simulate); } - @Nonnull + @NotNull public ItemStack extractFromInput(int slot, int amount, boolean simulate) { return super.extractItem(slot, amount, simulate); } @@ -92,7 +91,7 @@ public CompoundTag serialize(CompoundTag nbt) { } @Override - public boolean canPlaceItem(int slot, @Nonnull ItemStack stack) { + public boolean canPlaceItem(int slot, @NotNull ItemStack stack) { return true;//validator.test(tile, stack); } } diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/HatchComponentHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/HatchComponentHandler.java index 1fdb78230..d9371965d 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/HatchComponentHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/HatchComponentHandler.java @@ -1,11 +1,9 @@ package muramasa.antimatter.capability.machine; import muramasa.antimatter.capability.ComponentHandler; -import muramasa.antimatter.machine.types.HatchMachine; import muramasa.antimatter.tile.multi.TileEntityHatch; import muramasa.antimatter.tile.multi.TileEntityMultiMachine; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; public class HatchComponentHandler> extends ComponentHandler { @@ -14,12 +12,12 @@ public HatchComponentHandler(T componentTile) { } @Override - public void onStructureFormed(@Nonnull TileEntityMultiMachine controllerTile) { + public void onStructureFormed(@NotNull TileEntityMultiMachine controllerTile) { super.onStructureFormed(controllerTile); } @Override - public void onStructureInvalidated(@Nonnull TileEntityMultiMachine controllerTile) { + public void onStructureInvalidated(@NotNull TileEntityMultiMachine controllerTile) { super.onStructureInvalidated(controllerTile); } diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MachineCoverHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MachineCoverHandler.java index 020f988fd..bb72c6540 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MachineCoverHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MachineCoverHandler.java @@ -13,9 +13,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.Optional; @@ -71,7 +71,7 @@ protected boolean canRemoveCover(ICover cover) { } @Override - public boolean onInteract(@Nonnull Player player, @Nonnull InteractionHand hand, @Nonnull Direction side, @Nullable AntimatterToolType type) { + public boolean onInteract(@NotNull Player player, @NotNull InteractionHand hand, @NotNull Direction side, @Nullable AntimatterToolType type) { return super.onInteract(player, hand, side, type); } @@ -81,7 +81,7 @@ public void onMachineEvent(IMachineEvent event, Object... data) { } @Override - public boolean isValid(@Nonnull Direction side, @Nonnull ICover replacement) { + public boolean isValid(@NotNull Direction side, @NotNull ICover replacement) { if (!validCovers.contains(replacement.getLoc())) return false; if (side == getOutputFacing()) return false; return (get(side).isEmpty() && !replacement.isEmpty()) || super.isValid(side, replacement); diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MachineEnergyHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MachineEnergyHandler.java index 688076720..f71105500 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MachineEnergyHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MachineEnergyHandler.java @@ -19,10 +19,8 @@ import net.minecraft.world.level.Explosion; import net.minecraft.world.level.block.entity.BlockEntity; import tesseract.TesseractCapUtils; -import tesseract.api.gt.GTTransaction; import tesseract.api.gt.IEnergyHandler; import tesseract.api.gt.IEnergyHandlerItem; -import tesseract.api.gt.IGTNode; import java.util.List; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MachineFluidHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MachineFluidHandler.java index e4c4f8897..0c4d66159 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MachineFluidHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MachineFluidHandler.java @@ -10,7 +10,6 @@ import muramasa.antimatter.capability.fluid.FluidHandlerNullSideWrapper; import muramasa.antimatter.capability.fluid.FluidHandlerSidedWrapper; import muramasa.antimatter.capability.fluid.FluidTanks; -import muramasa.antimatter.cover.CoverOutput; import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.machine.event.ContentEvent; @@ -23,9 +22,9 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.material.Fluid; +import org.jetbrains.annotations.NotNull; import tesseract.FluidPlatformUtils; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -183,7 +182,7 @@ public int getTankForTag(TagKey tag, int min) { return -1; } - @Nonnull + @NotNull public FluidHolder consumeTaggedInput(TagKey input, long amount, boolean simulate) { FluidTanks inputs = getInputTanks(); if (inputs == null) { @@ -194,7 +193,7 @@ public FluidHolder consumeTaggedInput(TagKey input, long amount, boolean return inputs.extractFluid(FluidHooks.newFluidHolder(inputs.getFluidInTank(id).getFluid(), amount, null), simulate); } - @Nonnull + @NotNull public List consumeAndReturnInputs(List inputs, boolean simulate) { if (getInputTanks() == null) { return Collections.emptyList(); @@ -279,7 +278,7 @@ public int getTankAmount() { return MachineFluidHandler.this.getSize(); } - @Nonnull + @NotNull @Override public FluidHolder getFluidInTank(int tank) { return MachineFluidHandler.this.getFluidInTank(tank); diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MachineItemHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MachineItemHandler.java index 172cb34ce..f4c0372fa 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MachineItemHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MachineItemHandler.java @@ -12,11 +12,7 @@ import it.unimi.dsi.fastutil.objects.ObjectObjectImmutablePair; import muramasa.antimatter.capability.Dispatch; import muramasa.antimatter.capability.IMachineHandler; -import muramasa.antimatter.capability.item.FakeTrackedItemHandler; -import muramasa.antimatter.capability.item.ITrackedHandler; -import muramasa.antimatter.capability.item.ROCombinedInvWrapper; -import muramasa.antimatter.capability.item.SidedCombinedInvWrapper; -import muramasa.antimatter.capability.item.TrackedItemHandler; +import muramasa.antimatter.capability.item.*; import muramasa.antimatter.gui.SlotData; import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.recipe.IRecipe; @@ -27,11 +23,11 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.NotNull; import tesseract.TesseractCapUtils; import tesseract.api.gt.IEnergyHandlerItem; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.Map; @@ -108,7 +104,7 @@ public void onRemove() { } - public static ItemStack insertIntoOutput(ExtendedItemContainer handler, int slot, @Nonnull ItemStack stack, boolean simulate) { + public static ItemStack insertIntoOutput(ExtendedItemContainer handler, int slot, @NotNull ItemStack stack, boolean simulate) { if (handler instanceof ITrackedHandler trackedHandler) { return trackedHandler.insertOutputItem(slot, stack, simulate); } @@ -161,7 +157,7 @@ public int getCellCount() { return getCellInputHandler().getContainerSize(); } - @Nonnull + @NotNull public ItemStack[] getInputs() { return getInputList().toArray(new ItemStack[0]); } diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MachineRecipeHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MachineRecipeHandler.java index e729a1727..bcc0afef0 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MachineRecipeHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MachineRecipeHandler.java @@ -5,7 +5,6 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.Ref; import muramasa.antimatter.capability.Dispatch; -import muramasa.antimatter.capability.EnergyHandler; import muramasa.antimatter.capability.IMachineHandler; import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.machine.MachineFlag; @@ -26,11 +25,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundSource; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractGraphWrappers; -import tesseract.api.gt.GTTransaction; -import tesseract.api.gt.IEnergyHandler; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineEnergyHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineEnergyHandler.java index 24274177b..bb5e40f07 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineEnergyHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineEnergyHandler.java @@ -2,7 +2,6 @@ import muramasa.antimatter.machine.Tier; import muramasa.antimatter.tile.multi.TileEntityMultiMachine; -import tesseract.api.gt.GTTransaction; import tesseract.api.gt.IEnergyHandler; import tesseract.api.gt.IGTNode; diff --git a/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineFluidHandler.java b/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineFluidHandler.java index 0755f8aeb..24a2d4b24 100644 --- a/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineFluidHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/machine/MultiMachineFluidHandler.java @@ -8,9 +8,9 @@ import muramasa.antimatter.capability.IComponentHandler; import muramasa.antimatter.capability.fluid.FluidTanks; import muramasa.antimatter.tile.multi.TileEntityMultiMachine; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.EnumMap; import java.util.Optional; @@ -97,7 +97,7 @@ public int getSize() { return Arrays.stream(inputs).mapToInt(MachineFluidHandler::getSize).sum() + Arrays.stream(outputs).mapToInt(MachineFluidHandler::getSize).sum(); } - @Nonnull + @NotNull @Override public FluidHolder getFluidInTank(int tank) { if (tank < INPUT_END) diff --git a/common/src/main/java/muramasa/antimatter/capability/rf/RFHandler.java b/common/src/main/java/muramasa/antimatter/capability/rf/RFHandler.java index f258f14fd..27ea8b27f 100644 --- a/common/src/main/java/muramasa/antimatter/capability/rf/RFHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/rf/RFHandler.java @@ -1,14 +1,10 @@ package muramasa.antimatter.capability.rf; import earth.terrarium.botarium.common.energy.base.EnergySnapshot; -import earth.terrarium.botarium.util.Updatable; import muramasa.antimatter.Ref; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Mth; -import net.minecraft.world.level.block.entity.BlockEntity; -import tesseract.api.gt.GTConsumer; -import tesseract.api.gt.GTTransaction; import tesseract.api.rf.IRFNode; diff --git a/common/src/main/java/muramasa/antimatter/client/ClientData.java b/common/src/main/java/muramasa/antimatter/client/ClientData.java index e8fa3d56b..ce56e4be5 100644 --- a/common/src/main/java/muramasa/antimatter/client/ClientData.java +++ b/common/src/main/java/muramasa/antimatter/client/ClientData.java @@ -2,7 +2,10 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.gui.container.*; +import muramasa.antimatter.gui.container.ContainerBasicMachine; +import muramasa.antimatter.gui.container.ContainerCover; +import muramasa.antimatter.gui.container.ContainerMachine; +import muramasa.antimatter.gui.container.ContainerMultiMachine; import muramasa.antimatter.gui.screen.*; import net.minecraft.client.gui.screens.MenuScreens; diff --git a/common/src/main/java/muramasa/antimatter/client/IAntimatterModel.java b/common/src/main/java/muramasa/antimatter/client/IAntimatterModel.java index 95899c191..02aa5110b 100644 --- a/common/src/main/java/muramasa/antimatter/client/IAntimatterModel.java +++ b/common/src/main/java/muramasa/antimatter/client/IAntimatterModel.java @@ -10,7 +10,6 @@ import net.minecraft.resources.ResourceLocation; import java.util.Collection; -import java.util.Collections; import java.util.Set; import java.util.function.Function; diff --git a/common/src/main/java/muramasa/antimatter/client/ModelUtils.java b/common/src/main/java/muramasa/antimatter/client/ModelUtils.java index 6dcf51836..2245c9b78 100644 --- a/common/src/main/java/muramasa/antimatter/client/ModelUtils.java +++ b/common/src/main/java/muramasa/antimatter/client/ModelUtils.java @@ -4,13 +4,15 @@ import com.mojang.math.Transformation; import com.mojang.math.Vector3f; import dev.architectury.injectables.annotations.ExpectPlatform; -import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.client.baked.CoverBakedModel; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockModelShaper; -import net.minecraft.client.renderer.block.model.*; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.BlockModel; +import net.minecraft.client.renderer.block.model.ItemOverrides; +import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.*; import net.minecraft.core.BlockPos; @@ -22,10 +24,9 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.EnumMap; import java.util.List; import java.util.Map; import java.util.Random; @@ -91,11 +92,11 @@ public static void setLightData(BakedQuad model, int light){ @ExpectPlatform - public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos){ + public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos){ throw new AssertionError(); } - public static List getQuadsFromBakedCover(BakedModel model, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos, Predicate> coverPredicate){ + public static List getQuadsFromBakedCover(BakedModel model, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos, Predicate> coverPredicate){ if (model instanceof CoverBakedModel coverBakedModel){ return coverBakedModel.getBlockQuads(state, side, rand, level, pos, coverPredicate); } diff --git a/common/src/main/java/muramasa/antimatter/client/RenderHelper.java b/common/src/main/java/muramasa/antimatter/client/RenderHelper.java index d6d72cb98..b739ea485 100644 --- a/common/src/main/java/muramasa/antimatter/client/RenderHelper.java +++ b/common/src/main/java/muramasa/antimatter/client/RenderHelper.java @@ -8,7 +8,6 @@ import earth.terrarium.botarium.common.fluid.base.FluidHolder; import muramasa.antimatter.Ref; import muramasa.antimatter.item.ItemBattery; -import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.mixin.client.LevelRendererAccessor; import muramasa.antimatter.mixin.client.VertexFormatAccessor; import muramasa.antimatter.pipe.PipeSize; @@ -47,7 +46,6 @@ import tesseract.api.gt.IEnergyHandlerItem; import tesseract.graph.Connectivity; -import javax.annotation.Nullable; import java.util.List; import java.util.Optional; import java.util.function.BiFunction; diff --git a/common/src/main/java/muramasa/antimatter/client/baked/AttachableBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/AttachableBakedModel.java index 12a562ab9..ad34b396d 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/AttachableBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/AttachableBakedModel.java @@ -11,9 +11,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Random; @@ -29,9 +29,9 @@ public AttachableBakedModel(TextureAtlasSprite particle, Int2ObjectOpenHashMap getQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public List getQuads(@Nullable BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { try { if (onlyGeneralQuads && side != null) return Collections.emptyList(); if (state == null) { @@ -52,7 +52,7 @@ public List getQuads(@Nullable BlockState state, @Nullable Direction } @Override - public final List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public final List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { //if (side != null) return super.getBlockQuads(state, side, rand, data); // if (side == null) return super.getBlockQuads(state, null,rand,data); //if (side == null) return super.getBlockQuads(state,null,rand,data); @@ -62,7 +62,7 @@ public final List getBlockQuads(BlockState state, @Nullable Direction return sideQuads; } - protected List attachQuadsForSide(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + protected List attachQuadsForSide(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { return Collections.emptyList(); } } diff --git a/common/src/main/java/muramasa/antimatter/client/baked/BakedMachineSide.java b/common/src/main/java/muramasa/antimatter/client/baked/BakedMachineSide.java index 0f393fe0d..ebf381b0a 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/BakedMachineSide.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/BakedMachineSide.java @@ -8,9 +8,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; import java.util.Random; @@ -21,12 +21,12 @@ public BakedMachineSide(TextureAtlasSprite p, Map models) { } @Override - public List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, BlockPos pos) { + public List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, BlockPos pos) { return ModelUtils.getQuadsFromBaked(this.models.get(""), state, side, rand, level, pos); } /*@Override - public List getItemQuads(@Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData data) { + public List getItemQuads(@Nullable Direction side, @NotNull Random rand, @NotNull IModelData data) { return this.models.get("").getQuads(null, side, rand, data); }*/ diff --git a/common/src/main/java/muramasa/antimatter/client/baked/CoverBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/CoverBakedModel.java index da59e3434..ab150e1db 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/CoverBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/CoverBakedModel.java @@ -2,7 +2,6 @@ import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.cover.ICover; -import muramasa.antimatter.util.AntimatterCapUtils; import muramasa.antimatter.util.Utils; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -10,15 +9,12 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; import java.util.function.Predicate; -import java.util.stream.Collectors; public class CoverBakedModel extends GroupedBakedModel { public CoverBakedModel(TextureAtlasSprite p, Map models) { @@ -30,7 +26,7 @@ public List getBlockQuads(BlockState state, @org.jetbrains.annotation return getBlockQuads(state, side, rand, level, pos, null); } - public List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, BlockPos pos, Predicate> predicate) { + public List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, BlockPos pos, Predicate> predicate) { if (predicate == null) return Collections.emptyList(); List quads = new ArrayList<>(); for (Map.Entry t : this.models.entrySet()) { @@ -44,7 +40,7 @@ public List getBlockQuads(BlockState state, @Nullable Direction side, }).flatMap(t -> t.getValue().getQuads(state, null, rand).stream()).collect(Collectors.toList());*/ } - @Nonnull + @NotNull public static EnumMap addCoverModelData(Direction side, ICoverHandler handler) {; EnumMap map = new EnumMap<>(Direction.class); if (handler == null) return map; diff --git a/common/src/main/java/muramasa/antimatter/client/baked/CoveredBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/CoveredBakedModel.java index 26362d3c1..0cf193aad 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/CoveredBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/CoveredBakedModel.java @@ -8,9 +8,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Random; @@ -22,13 +22,13 @@ public CoveredBakedModel(TextureAtlasSprite particle, Int2ObjectOpenHashMap attachQuadsForSide(BlockState state, @Nullable Direction side, @Nonnull Random rand, - @Nonnull BlockAndTintGetter level, BlockPos pos) { + protected List attachQuadsForSide(BlockState state, @Nullable Direction side, @NotNull Random rand, + @NotNull BlockAndTintGetter level, BlockPos pos) { return Collections.emptyList();//attachCoverQuads(new ArrayList<>(), state, side, data); } /* protected final List attachCoverQuads(List quads, BlockState state, Direction side, - @Nonnull IModelData data) { + @NotNull IModelData data) { TileEntityBase tile = data.getData(AntimatterProperties.TILE_PROPERTY); if (tile == null) return quads; diff --git a/common/src/main/java/muramasa/antimatter/client/baked/GroupedBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/GroupedBakedModel.java index 7de50bd07..c0dd2e44f 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/GroupedBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/GroupedBakedModel.java @@ -9,9 +9,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -29,7 +29,7 @@ public GroupedBakedModel(TextureAtlasSprite p, Map models) { } @Override - public List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, BlockPos pos) { + public List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, BlockPos pos) { int offset = side == null ? 6 : side.get3DDataValue(); BakedQuad[] arr = CACHE[offset]; if (arr == null) { @@ -48,7 +48,7 @@ public Iterable> customParts() { } /*@Override - public List getItemQuads(@Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData data) { + public List getItemQuads(@Nullable Direction side, @NotNull Random rand, @NotNull IModelData data) { int offset = side == null ? 6 : side.get3DDataValue(); BakedQuad[] arr = CACHE_ITEM[offset]; if (arr == null) { diff --git a/common/src/main/java/muramasa/antimatter/client/baked/IAntimatterBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/IAntimatterBakedModel.java index 13d023b78..f5693f2f9 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/IAntimatterBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/IAntimatterBakedModel.java @@ -7,17 +7,17 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Random; public interface IAntimatterBakedModel extends BakedModel { - List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos); + List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos); - default List getQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos){ + default List getQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos){ try { if (hasOnlyGeneralQuads() && side != null) return Collections.emptyList(); return state != null ? getBlockQuads(state, side, rand, level, pos) : Collections.emptyList(); //todo figure out item quads if necessary diff --git a/common/src/main/java/muramasa/antimatter/client/baked/ListBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/ListBakedModel.java index 398a90ad9..4b4d6e8ce 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/ListBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/ListBakedModel.java @@ -7,8 +7,8 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Random; diff --git a/common/src/main/java/muramasa/antimatter/client/baked/MachineBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/MachineBakedModel.java index 7adde34e5..c60e4bdd0 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/MachineBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/MachineBakedModel.java @@ -28,8 +28,8 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.Random; @@ -61,7 +61,7 @@ protected List getCoverQuads(BlockState state, Direction side, Random return list; } @Override - public List getBlockQuads(BlockState state, Direction side, Random rand, BlockAndTintGetter level, @Nonnull BlockPos pos) { + public List getBlockQuads(BlockState state, Direction side, Random rand, BlockAndTintGetter level, @NotNull BlockPos pos) { if (side == null) { return Collections.emptyList(); } diff --git a/common/src/main/java/muramasa/antimatter/client/baked/ProxyBakedModel.java b/common/src/main/java/muramasa/antimatter/client/baked/ProxyBakedModel.java index 8547687bf..cce777c9c 100644 --- a/common/src/main/java/muramasa/antimatter/client/baked/ProxyBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/baked/ProxyBakedModel.java @@ -25,9 +25,9 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; public class ProxyBakedModel extends AntimatterBakedModel { @@ -55,7 +55,7 @@ public TextureAtlasSprite getParticleIcon(BlockAndTintGetter getter, BlockPos po } @Override - public List getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, BlockPos pos) + public List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, BlockPos pos) { BlockEntity tile = level.getBlockEntity(pos); if (!(tile instanceof TileEntityFakeBlock fake) || fake.getState() == null) { diff --git a/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTextureProvider.java b/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTextureProvider.java index e8a5998b5..72530aed4 100644 --- a/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTextureProvider.java +++ b/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTextureProvider.java @@ -7,9 +7,9 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Random; import java.util.function.Function; @@ -48,7 +48,7 @@ BlockEntity getBlockEntity(){ private final Function> builder; - public DynamicTextureProvider(@Nonnull Function> builder) { + public DynamicTextureProvider(@NotNull Function> builder) { this.builder = builder; } diff --git a/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTexturers.java b/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTexturers.java index 2e1ae4e38..a43057d34 100644 --- a/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTexturers.java +++ b/common/src/main/java/muramasa/antimatter/client/dynamic/DynamicTexturers.java @@ -10,7 +10,6 @@ import muramasa.antimatter.client.ModelUtils; import muramasa.antimatter.client.RenderHelper; import muramasa.antimatter.client.SimpleModelState; -import muramasa.antimatter.client.baked.CoverBakedModel; import muramasa.antimatter.cover.ICover; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.mixin.client.BlockModelAccessor; @@ -22,14 +21,11 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.Direction; -import net.minecraft.core.Direction.Axis; import net.minecraft.core.Vec3i; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; import java.util.Collections; -import java.util.EnumMap; import java.util.List; import java.util.Map; import java.util.function.Predicate; diff --git a/common/src/main/java/muramasa/antimatter/client/model/AntimatterGroupedModel.java b/common/src/main/java/muramasa/antimatter/client/model/AntimatterGroupedModel.java index 0d5e95d7b..fbea8d730 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/AntimatterGroupedModel.java +++ b/common/src/main/java/muramasa/antimatter/client/model/AntimatterGroupedModel.java @@ -6,7 +6,6 @@ import muramasa.antimatter.client.baked.BakedMachineSide; import muramasa.antimatter.client.baked.CoverBakedModel; import muramasa.antimatter.client.baked.GroupedBakedModel; -import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.block.model.ItemOverrides; import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite; diff --git a/common/src/main/java/muramasa/antimatter/client/model/IModelConfiguration.java b/common/src/main/java/muramasa/antimatter/client/model/IModelConfiguration.java index 9d89c5b44..2ecf0bead 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/IModelConfiguration.java +++ b/common/src/main/java/muramasa/antimatter/client/model/IModelConfiguration.java @@ -4,8 +4,7 @@ import net.minecraft.client.resources.model.Material; import net.minecraft.client.resources.model.ModelState; import net.minecraft.client.resources.model.UnbakedModel; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public interface IModelConfiguration { @Nullable diff --git a/common/src/main/java/muramasa/antimatter/client/model/ISimpleModel.java b/common/src/main/java/muramasa/antimatter/client/model/ISimpleModel.java index 4e1673e71..d02f25eee 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/ISimpleModel.java +++ b/common/src/main/java/muramasa/antimatter/client/model/ISimpleModel.java @@ -1,14 +1,14 @@ package muramasa.antimatter.client.model; -import com.mojang.datafixers.util.Pair; import muramasa.antimatter.client.IAntimatterModel; import net.minecraft.client.renderer.block.model.ItemOverrides; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.*; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.client.resources.model.ModelState; import net.minecraft.resources.ResourceLocation; -import java.util.Collection; -import java.util.Set; import java.util.function.Function; public interface ISimpleModel extends IAntimatterModel { diff --git a/common/src/main/java/muramasa/antimatter/client/model/loader/BlockBenchLoader.java b/common/src/main/java/muramasa/antimatter/client/model/loader/BlockBenchLoader.java index 25879e9d8..402b1fca8 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/loader/BlockBenchLoader.java +++ b/common/src/main/java/muramasa/antimatter/client/model/loader/BlockBenchLoader.java @@ -1,17 +1,14 @@ package muramasa.antimatter.client.model.loader; -import com.google.common.collect.ImmutableMap; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.client.model.AntimatterGroupedModel; import muramasa.antimatter.client.model.VanillaProxy; import net.minecraft.client.renderer.block.model.BlockElement; -import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; diff --git a/common/src/main/java/muramasa/antimatter/client/model/loader/DefaultModelLoader.java b/common/src/main/java/muramasa/antimatter/client/model/loader/DefaultModelLoader.java index bde72d916..6c9849b85 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/loader/DefaultModelLoader.java +++ b/common/src/main/java/muramasa/antimatter/client/model/loader/DefaultModelLoader.java @@ -8,8 +8,7 @@ import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.resources.ResourceLocation; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; public class DefaultModelLoader extends AntimatterModelLoader { public DefaultModelLoader(ResourceLocation loc) { @@ -17,7 +16,7 @@ public DefaultModelLoader(ResourceLocation loc) { } @SuppressWarnings("unchecked") - @Nonnull + @NotNull @Override public AntimatterModel readModel(JsonDeserializationContext context, JsonObject json) { try { diff --git a/common/src/main/java/muramasa/antimatter/client/model/loader/DynamicModelLoader.java b/common/src/main/java/muramasa/antimatter/client/model/loader/DynamicModelLoader.java index 964e29193..5a0dcba9a 100644 --- a/common/src/main/java/muramasa/antimatter/client/model/loader/DynamicModelLoader.java +++ b/common/src/main/java/muramasa/antimatter/client/model/loader/DynamicModelLoader.java @@ -10,7 +10,6 @@ import muramasa.antimatter.dynamic.DynamicModel; import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; -import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.resources.ResourceLocation; public class DynamicModelLoader extends AntimatterModelLoader { diff --git a/common/src/main/java/muramasa/antimatter/client/scene/TrackedDummyWorld.java b/common/src/main/java/muramasa/antimatter/client/scene/TrackedDummyWorld.java index 4f6bb0e33..29da3016a 100644 --- a/common/src/main/java/muramasa/antimatter/client/scene/TrackedDummyWorld.java +++ b/common/src/main/java/muramasa/antimatter/client/scene/TrackedDummyWorld.java @@ -31,9 +31,9 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import net.minecraft.world.scores.Scoreboard; import net.minecraft.world.ticks.LevelTickAccess; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -97,21 +97,21 @@ public void setBlockEntity(BlockEntity entity) { } @Override - public boolean setBlock(@Nonnull BlockPos pos, BlockState state, int a, int b) { + public boolean setBlock(@NotNull BlockPos pos, BlockState state, int a, int b) { renderedBlocks.put(pos, new BlockInfo(state, renderedBlocks.getOrDefault(pos, BlockInfo.EMPTY).getTileEntity())); return true; } @Override - public BlockEntity getBlockEntity(@Nonnull BlockPos pos) { + public BlockEntity getBlockEntity(@NotNull BlockPos pos) { if (renderFilter != null && !renderFilter.test(pos)) return null; return proxyWorld != null ? proxyWorld.getBlockEntity(pos) : renderedBlocks.getOrDefault(pos, BlockInfo.EMPTY).getTileEntity(); } - @Nonnull + @NotNull @Override - public BlockState getBlockState(@Nonnull BlockPos pos) { + public BlockState getBlockState(@NotNull BlockPos pos) { if (renderFilter != null && !renderFilter.test(pos)) return Blocks.AIR.defaultBlockState(); //return air if not rendering this block return proxyWorld != null ? proxyWorld.getBlockState(pos) : renderedBlocks.getOrDefault(pos, BlockInfo.EMPTY).getBlockState(); @@ -159,22 +159,22 @@ public LevelLightEngine getLightEngine() { } @Override - public int getBlockTint(@Nonnull BlockPos blockPos, @Nonnull ColorResolver colorResolver) { + public int getBlockTint(@NotNull BlockPos blockPos, @NotNull ColorResolver colorResolver) { return colorResolver.getColor(BuiltinRegistries.BIOME.get(net.minecraft.world.level.biome.Biomes.PLAINS), blockPos.getX(), blockPos.getY()); } @Override - public int getBrightness(@Nonnull LightLayer lightType, @Nonnull BlockPos pos) { + public int getBrightness(@NotNull LightLayer lightType, @NotNull BlockPos pos) { return lightType == LightLayer.SKY ? 15 : 0; } @Override - public int getRawBrightness(@Nonnull BlockPos pos, int p_226659_2_) { + public int getRawBrightness(@NotNull BlockPos pos, int p_226659_2_) { return 15; } @Override - public boolean canSeeSky(@Nonnull BlockPos pos) { + public boolean canSeeSky(@NotNull BlockPos pos) { return true; } diff --git a/common/src/main/java/muramasa/antimatter/client/scene/WorldSceneRenderer.java b/common/src/main/java/muramasa/antimatter/client/scene/WorldSceneRenderer.java index 9cc1d149a..592bd6be4 100644 --- a/common/src/main/java/muramasa/antimatter/client/scene/WorldSceneRenderer.java +++ b/common/src/main/java/muramasa/antimatter/client/scene/WorldSceneRenderer.java @@ -23,9 +23,9 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; import org.lwjgl.opengl.GL11; -import javax.annotation.Nullable; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; diff --git a/common/src/main/java/muramasa/antimatter/client/tesr/MachineTESR.java b/common/src/main/java/muramasa/antimatter/client/tesr/MachineTESR.java index e9b455b44..9befbaafc 100644 --- a/common/src/main/java/muramasa/antimatter/client/tesr/MachineTESR.java +++ b/common/src/main/java/muramasa/antimatter/client/tesr/MachineTESR.java @@ -30,9 +30,9 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; +import org.jetbrains.annotations.NotNull; import tesseract.FluidPlatformUtils; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.Map; @@ -47,13 +47,13 @@ public MachineTESR(BlockEntityRendererProvider.Context context) { //Renders this tile as a TESR. @Override - public void render(@Nonnull TileEntityMachine tile, float partialTicks, @Nonnull PoseStack stack, @Nonnull MultiBufferSource buffer, int light, int overlay) { + public void render(@NotNull TileEntityMachine tile, float partialTicks, @NotNull PoseStack stack, @NotNull MultiBufferSource buffer, int light, int overlay) { if (tile.getMachineType().renderContainerLiquids()) { renderLiquids(tile, partialTicks, stack, buffer, light, overlay); } } - private void renderLiquids(@Nonnull TileEntityMachine tile, float partialTicks, @Nonnull PoseStack stack, @Nonnull MultiBufferSource buffer, int light, int overlay) { + private void renderLiquids(@NotNull TileEntityMachine tile, float partialTicks, @NotNull PoseStack stack, @NotNull MultiBufferSource buffer, int light, int overlay) { VertexConsumer builder = buffer.getBuffer(RenderType.cutout()); long t = tile.getBlockState().getSeed(tile.getBlockPos()); // net.minecraftforge.client.ForgeHooksClient.setRenderLayer(RenderType.cutout()); diff --git a/common/src/main/java/muramasa/antimatter/common/event/CommonEvents.java b/common/src/main/java/muramasa/antimatter/common/event/CommonEvents.java index a2624bc6b..d0befde3d 100644 --- a/common/src/main/java/muramasa/antimatter/common/event/CommonEvents.java +++ b/common/src/main/java/muramasa/antimatter/common/event/CommonEvents.java @@ -9,7 +9,6 @@ import muramasa.antimatter.proxy.ClientHandler; import muramasa.antimatter.registration.Side; import muramasa.antimatter.tile.pipe.TileEntityPipe; -import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.client.Minecraft; diff --git a/common/src/main/java/muramasa/antimatter/cover/BaseCover.java b/common/src/main/java/muramasa/antimatter/cover/BaseCover.java index 2ee380869..9f71b95ad 100644 --- a/common/src/main/java/muramasa/antimatter/cover/BaseCover.java +++ b/common/src/main/java/muramasa/antimatter/cover/BaseCover.java @@ -17,7 +17,6 @@ import muramasa.antimatter.gui.widget.BackgroundWidget; import muramasa.antimatter.gui.widget.CoverModeHandlerWidget; import muramasa.antimatter.gui.widget.SlotWidget; -import muramasa.antimatter.gui.widget.WidgetSupplier; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.network.packets.AbstractGuiEventPacket; import muramasa.antimatter.network.packets.CoverGuiEventPacket; @@ -29,10 +28,10 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -43,9 +42,9 @@ //The base Cover class. All cover classes extend from this. public abstract class BaseCover implements ICover, IGuiHandler.IHaveWidgets { - @Nonnull + @NotNull public final CoverFactory factory; - @Nonnull + @NotNull public final ICoverHandler handler; @Nullable public final Tier tier; @@ -73,7 +72,7 @@ public ICoverHandler source() { return handler; } - public BaseCover(@Nonnull ICoverHandler source, @Nullable Tier tier, Direction side, CoverFactory factory) { + public BaseCover(@NotNull ICoverHandler source, @Nullable Tier tier, Direction side, CoverFactory factory) { this.factory = Objects.requireNonNull(factory, "Missing factory in BaseCover"); this.handler = source; this.tier = tier; diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverDebug.java b/common/src/main/java/muramasa/antimatter/cover/CoverDebug.java index 09e3ecf35..e5f5d3c7b 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverDebug.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverDebug.java @@ -5,10 +5,9 @@ import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.machine.Tier; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; -import javax.annotation.Nullable; - public class CoverDebug extends BaseCover { public CoverDebug(ICoverHandler source, @Nullable Tier tier, Direction side, CoverFactory factory) { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverDynamo.java b/common/src/main/java/muramasa/antimatter/cover/CoverDynamo.java index fc9d59fe5..18b76e4e7 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverDynamo.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverDynamo.java @@ -4,11 +4,10 @@ import muramasa.antimatter.machine.Tier; import muramasa.antimatter.tile.TileEntityMachine; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; import tesseract.api.gt.IEnergyHandler; import tesseract.api.rf.IRFNode; -import javax.annotation.Nullable; - public class CoverDynamo extends BaseCover { public CoverDynamo(ICoverHandler source, @Nullable Tier tier, Direction side, CoverFactory factory) { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverEnergy.java b/common/src/main/java/muramasa/antimatter/cover/CoverEnergy.java index 72a9f0a87..ca9a468a1 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverEnergy.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverEnergy.java @@ -4,11 +4,10 @@ import muramasa.antimatter.machine.Tier; import muramasa.antimatter.tile.TileEntityMachine; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; import tesseract.api.gt.IEnergyHandler; import tesseract.api.rf.IRFNode; -import javax.annotation.Nullable; - public class CoverEnergy extends BaseCover { public CoverEnergy(ICoverHandler source, @Nullable Tier tier, Direction side, CoverFactory factory) { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverFactory.java b/common/src/main/java/muramasa/antimatter/cover/CoverFactory.java index d6dd15dc6..4dd2f21cf 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverFactory.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverFactory.java @@ -14,8 +14,8 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.Collections; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverFilter.java b/common/src/main/java/muramasa/antimatter/cover/CoverFilter.java index 51c4e1f18..9548c3bb1 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverFilter.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverFilter.java @@ -4,8 +4,8 @@ import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.machine.Tier; import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Collection; import java.util.Set; diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverInput.java b/common/src/main/java/muramasa/antimatter/cover/CoverInput.java index f7c1f9841..67f75f2b0 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverInput.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverInput.java @@ -4,8 +4,7 @@ import muramasa.antimatter.machine.Tier; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; //Behaves like CoverOutput in terms of refresh but no event handler. public class CoverInput extends BaseCover { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverMaterial.java b/common/src/main/java/muramasa/antimatter/cover/CoverMaterial.java index 5b0f378ae..0a1edb245 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverMaterial.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverMaterial.java @@ -5,8 +5,7 @@ import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialType; import net.minecraft.core.Direction; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public abstract class CoverMaterial extends BaseCover { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverMuffler.java b/common/src/main/java/muramasa/antimatter/cover/CoverMuffler.java index ee507a081..6840c873a 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverMuffler.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverMuffler.java @@ -10,8 +10,8 @@ import net.minecraft.core.particles.ParticleTypes; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Random; public class CoverMuffler extends BaseCover { diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverOutput.java b/common/src/main/java/muramasa/antimatter/cover/CoverOutput.java index 94a6efdfd..874686351 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverOutput.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverOutput.java @@ -6,7 +6,6 @@ import muramasa.antimatter.gui.event.GuiEvents; import muramasa.antimatter.gui.event.IGuiEvent; import muramasa.antimatter.machine.Tier; -import muramasa.antimatter.machine.event.ContentEvent; import muramasa.antimatter.machine.event.IMachineEvent; import muramasa.antimatter.machine.event.MachineEvent; import muramasa.antimatter.tile.TileEntityFakeBlock; @@ -19,12 +18,11 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.entity.BlockEntity; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.TesseractCapUtils; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nullable; - public class CoverOutput extends CoverInput { private boolean ejectItems = false; diff --git a/common/src/main/java/muramasa/antimatter/cover/CoverTintable.java b/common/src/main/java/muramasa/antimatter/cover/CoverTintable.java index 8c7d8fdf7..62d7b9a2a 100644 --- a/common/src/main/java/muramasa/antimatter/cover/CoverTintable.java +++ b/common/src/main/java/muramasa/antimatter/cover/CoverTintable.java @@ -3,8 +3,7 @@ import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.machine.Tier; import net.minecraft.core.Direction; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public abstract class CoverTintable extends BaseCover { diff --git a/common/src/main/java/muramasa/antimatter/cover/ICover.java b/common/src/main/java/muramasa/antimatter/cover/ICover.java index 889dda496..f7fbbed7b 100644 --- a/common/src/main/java/muramasa/antimatter/cover/ICover.java +++ b/common/src/main/java/muramasa/antimatter/cover/ICover.java @@ -7,7 +7,6 @@ import muramasa.antimatter.gui.GuiData; import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.gui.event.IGuiEvent; -import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.machine.event.IMachineEvent; import muramasa.antimatter.network.packets.AbstractGuiEventPacket; @@ -33,11 +32,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; @@ -54,7 +52,7 @@ default boolean canPlace(){ return true; } - @Nonnull + @NotNull default Component getDisplayName() { return new TextComponent(Utils.underscoreToUpperCamel(this.getId())); } diff --git a/common/src/main/java/muramasa/antimatter/data/AntimatterMaterialTypes.java b/common/src/main/java/muramasa/antimatter/data/AntimatterMaterialTypes.java index 584c50a84..920166361 100644 --- a/common/src/main/java/muramasa/antimatter/data/AntimatterMaterialTypes.java +++ b/common/src/main/java/muramasa/antimatter/data/AntimatterMaterialTypes.java @@ -1,7 +1,6 @@ package muramasa.antimatter.data; import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.Ref; import muramasa.antimatter.block.BlockStorage; import muramasa.antimatter.block.BlockSurfaceRock; @@ -10,7 +9,10 @@ import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.fluid.AntimatterMaterialFluid; import muramasa.antimatter.item.CoverMaterialItem; -import muramasa.antimatter.material.*; +import muramasa.antimatter.material.MaterialItem; +import muramasa.antimatter.material.MaterialTypeBlock; +import muramasa.antimatter.material.MaterialTypeFluid; +import muramasa.antimatter.material.MaterialTypeItem; import muramasa.antimatter.ore.BlockOre; import muramasa.antimatter.ore.BlockOreStone; import muramasa.antimatter.ore.StoneType; diff --git a/common/src/main/java/muramasa/antimatter/data/AntimatterStoneTypes.java b/common/src/main/java/muramasa/antimatter/data/AntimatterStoneTypes.java index eed6acb01..27671c105 100644 --- a/common/src/main/java/muramasa/antimatter/data/AntimatterStoneTypes.java +++ b/common/src/main/java/muramasa/antimatter/data/AntimatterStoneTypes.java @@ -1,7 +1,6 @@ package muramasa.antimatter.data; import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.Ref; import muramasa.antimatter.material.Material; import muramasa.antimatter.ore.StoneType; diff --git a/common/src/main/java/muramasa/antimatter/datagen/AntimatterDynamics.java b/common/src/main/java/muramasa/antimatter/datagen/AntimatterDynamics.java index e4779510e..af9bcdba9 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/AntimatterDynamics.java +++ b/common/src/main/java/muramasa/antimatter/datagen/AntimatterDynamics.java @@ -22,7 +22,6 @@ import muramasa.antimatter.integration.kubejs.AMWorldEvent; import muramasa.antimatter.integration.kubejs.KubeJSRegistrar; import muramasa.antimatter.integration.kubejs.RecipeLoaderEventKubeJS; -import muramasa.antimatter.material.Material; import muramasa.antimatter.recipe.IRecipe; import muramasa.antimatter.recipe.Recipe; import muramasa.antimatter.recipe.loader.IRecipeRegistrate; @@ -36,11 +35,9 @@ import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import muramasa.antimatter.worldgen.StoneLayerOre; import muramasa.antimatter.worldgen.object.WorldGenStoneLayer; -import muramasa.antimatter.worldgen.object.WorldGenStoneLayerBuilder; import muramasa.antimatter.worldgen.smallore.WorldGenSmallOre; import muramasa.antimatter.worldgen.vanillaore.WorldGenVanillaOre; import muramasa.antimatter.worldgen.vein.WorldGenVeinLayer; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; import net.devtech.arrp.api.RuntimeResourcePack; import net.devtech.arrp.json.loot.JCondition; import net.devtech.arrp.json.models.JTextures; diff --git a/common/src/main/java/muramasa/antimatter/datagen/DynamicDataPack.java b/common/src/main/java/muramasa/antimatter/datagen/DynamicDataPack.java index 41e04062a..a59d9b9f7 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/DynamicDataPack.java +++ b/common/src/main/java/muramasa/antimatter/datagen/DynamicDataPack.java @@ -1,9 +1,7 @@ package muramasa.antimatter.datagen; import com.google.common.collect.Sets; -import com.google.gson.Gson; import com.google.gson.JsonObject; -import com.mojang.realmsclient.util.JsonUtils; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.objects.ObjectSet; import muramasa.antimatter.AntimatterConfig; @@ -14,10 +12,8 @@ import net.minecraft.server.packs.PackResources; import net.minecraft.server.packs.PackType; import net.minecraft.server.packs.metadata.MetadataSectionSerializer; -import net.minecraft.util.GsonHelper; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -26,7 +22,7 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -@ParametersAreNonnullByDefault +//@ParametersAreNonnullByDefault public class DynamicDataPack implements PackResources { protected static final ObjectSet SERVER_DOMAINS = new ObjectOpenHashSet<>(); diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterCookingRecipeBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterCookingRecipeBuilder.java index a2075797a..972088797 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterCookingRecipeBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterCookingRecipeBuilder.java @@ -14,8 +14,8 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.SimpleCookingSerializer; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.function.Consumer; public class AntimatterCookingRecipeBuilder { diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterItemModelBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterItemModelBuilder.java index 8de7d2e8b..0a06c3e00 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterItemModelBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterItemModelBuilder.java @@ -5,7 +5,6 @@ import muramasa.antimatter.util.AntimatterPlatformUtils; import net.devtech.arrp.json.loot.JCondition; import net.devtech.arrp.json.models.JOverride; -import net.devtech.arrp.json.models.JTextures; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.material.Fluid; import tesseract.FluidPlatformUtils; diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterModelBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterModelBuilder.java index b5741e615..34f503c2a 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterModelBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterModelBuilder.java @@ -5,7 +5,6 @@ import com.mojang.math.Vector3f; import muramasa.antimatter.datagen.json.JAntimatterModel; import muramasa.antimatter.datagen.json.JModel; -import muramasa.antimatter.texture.Texture; import net.devtech.arrp.json.models.JElement; import net.devtech.arrp.json.models.JTextures; import net.minecraft.resources.ResourceLocation; diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapedRecipeBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapedRecipeBuilder.java index 76ed11889..cedc0a2e6 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapedRecipeBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapedRecipeBuilder.java @@ -18,7 +18,6 @@ import net.minecraft.advancements.critereon.RecipeUnlockedTrigger; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; @@ -26,8 +25,8 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.ItemLike; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapelessRecipeBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapelessRecipeBuilder.java index aaec39f6b..31fecb9a2 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapelessRecipeBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterShapelessRecipeBuilder.java @@ -19,8 +19,8 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.ItemLike; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; import java.util.function.Consumer; diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterTagBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterTagBuilder.java index b2ae159f2..c57b0c00d 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterTagBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/AntimatterTagBuilder.java @@ -1,15 +1,11 @@ package muramasa.antimatter.datagen.builder; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import net.minecraft.core.Registry; -import net.minecraft.data.tags.TagsProvider; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; -import net.minecraft.util.GsonHelper; import java.util.ArrayList; import java.util.Arrays; diff --git a/common/src/main/java/muramasa/antimatter/datagen/builder/DynamicConfigBuilder.java b/common/src/main/java/muramasa/antimatter/datagen/builder/DynamicConfigBuilder.java index 0f0182a9c..d5f83dc8e 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/builder/DynamicConfigBuilder.java +++ b/common/src/main/java/muramasa/antimatter/datagen/builder/DynamicConfigBuilder.java @@ -4,8 +4,8 @@ import muramasa.antimatter.texture.Texture; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.function.Function; public class DynamicConfigBuilder { diff --git a/common/src/main/java/muramasa/antimatter/datagen/json/JAntimatterModel.java b/common/src/main/java/muramasa/antimatter/datagen/json/JAntimatterModel.java index 4cc5343fb..fefa9e07f 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/json/JAntimatterModel.java +++ b/common/src/main/java/muramasa/antimatter/datagen/json/JAntimatterModel.java @@ -8,7 +8,6 @@ import java.lang.reflect.Type; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Map; diff --git a/common/src/main/java/muramasa/antimatter/datagen/json/JModel.java b/common/src/main/java/muramasa/antimatter/datagen/json/JModel.java index 4c8f76a00..4765248eb 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/json/JModel.java +++ b/common/src/main/java/muramasa/antimatter/datagen/json/JModel.java @@ -1,14 +1,7 @@ package muramasa.antimatter.datagen.json; import net.devtech.arrp.json.loot.JCondition; -import net.devtech.arrp.json.models.JDisplay; -import net.devtech.arrp.json.models.JElement; -import net.devtech.arrp.json.models.JFace; -import net.devtech.arrp.json.models.JFaces; -import net.devtech.arrp.json.models.JOverride; -import net.devtech.arrp.json.models.JPosition; -import net.devtech.arrp.json.models.JRotation; -import net.devtech.arrp.json.models.JTextures; +import net.devtech.arrp.json.models.*; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; diff --git a/common/src/main/java/muramasa/antimatter/datagen/loaders/MaterialRecipes.java b/common/src/main/java/muramasa/antimatter/datagen/loaders/MaterialRecipes.java index e721b3ffc..2d0db182d 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/loaders/MaterialRecipes.java +++ b/common/src/main/java/muramasa/antimatter/datagen/loaders/MaterialRecipes.java @@ -1,8 +1,6 @@ package muramasa.antimatter.datagen.loaders; import com.google.common.collect.ImmutableMap; -import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.Ref; import muramasa.antimatter.data.AntimatterDefaultTools; import muramasa.antimatter.data.AntimatterMaterialTypes; @@ -13,24 +11,16 @@ import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.material.MaterialType; import muramasa.antimatter.material.MaterialTypeItem; -import muramasa.antimatter.ore.BlockOre; import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.util.TagUtils; import net.minecraft.advancements.CriterionTriggerInstance; import net.minecraft.data.recipes.FinishedRecipe; -import net.minecraft.data.recipes.SimpleCookingRecipeBuilder; -import net.minecraft.tags.TagKey; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import java.util.function.Consumer; import static com.google.common.collect.ImmutableMap.of; -import static muramasa.antimatter.data.AntimatterDefaultTools.*; -import static muramasa.antimatter.data.AntimatterMaterialTypes.*; +import static muramasa.antimatter.data.AntimatterMaterialTypes.INGOT; import static muramasa.antimatter.material.MaterialTags.*; -import static muramasa.antimatter.util.Utils.getConventionalMaterialType; -import static muramasa.antimatter.util.Utils.getConventionalStoneType; public class MaterialRecipes { public static void init(Consumer consumer, AntimatterRecipeProvider provider) { diff --git a/common/src/main/java/muramasa/antimatter/datagen/loaders/Pipes.java b/common/src/main/java/muramasa/antimatter/datagen/loaders/Pipes.java index 622c78a5d..b8be2dbbc 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/loaders/Pipes.java +++ b/common/src/main/java/muramasa/antimatter/datagen/loaders/Pipes.java @@ -16,8 +16,8 @@ import static com.google.common.collect.ImmutableMap.of; import static muramasa.antimatter.data.AntimatterDefaultTools.HAMMER; -import static muramasa.antimatter.data.AntimatterMaterialTypes.PLATE; import static muramasa.antimatter.data.AntimatterDefaultTools.WRENCH; +import static muramasa.antimatter.data.AntimatterMaterialTypes.PLATE; public class Pipes { public static void loadRecipes(Consumer consumer, AntimatterRecipeProvider provider) { diff --git a/common/src/main/java/muramasa/antimatter/datagen/loaders/Tools.java b/common/src/main/java/muramasa/antimatter/datagen/loaders/Tools.java index 9474c0f4d..342dfe432 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/loaders/Tools.java +++ b/common/src/main/java/muramasa/antimatter/datagen/loaders/Tools.java @@ -4,13 +4,8 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.data.AntimatterDefaultTools; -import muramasa.antimatter.data.AntimatterMaterialTypes; -import muramasa.antimatter.data.AntimatterMaterials; import muramasa.antimatter.datagen.providers.AntimatterRecipeProvider; -import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.recipe.ingredient.PropertyIngredient; -import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.TagUtils; import net.minecraft.advancements.CriterionTriggerInstance; @@ -21,14 +16,14 @@ import java.util.Collections; import java.util.function.Consumer; -import java.util.function.Function; import static com.google.common.collect.ImmutableMap.of; import static muramasa.antimatter.data.AntimatterDefaultTools.*; import static muramasa.antimatter.data.AntimatterMaterialTypes.*; import static muramasa.antimatter.data.AntimatterMaterials.Wood; import static muramasa.antimatter.material.MaterialTags.*; -import static muramasa.antimatter.recipe.RecipeBuilders.*; +import static muramasa.antimatter.recipe.RecipeBuilders.CROWBAR_BUILDER; +import static muramasa.antimatter.recipe.RecipeBuilders.PROBE_BUILDER; public class Tools { public static void init(Consumer consumer, AntimatterRecipeProvider provider) { diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterAdvancementProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterAdvancementProvider.java index 3b62a26c2..232caf1fd 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterAdvancementProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterAdvancementProvider.java @@ -13,8 +13,8 @@ import net.minecraft.world.level.ItemLike; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.nio.file.Path; import java.util.Arrays; import java.util.List; @@ -54,7 +54,7 @@ public void onCompletion() { } @Override - public void run(@Nonnull HashCache cache) { + public void run(@NotNull HashCache cache) { /*Path folder = this.gen.getOutputFolder(); Set locs = new ObjectOpenHashSet<>(); Consumer consumer = a -> { @@ -75,7 +75,7 @@ private Path getPath(Path path, Advancement advancement) { return path.resolve(String.join("", "data/", providerDomain, "/advancements/", advancement.getId().getPath(), ".json")); } - @Nonnull + @NotNull @Override public String getName() { return providerName; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockLootProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockLootProvider.java index 4b1424d08..84e9b1fc5 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockLootProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockLootProvider.java @@ -3,19 +3,13 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.block.BlockStone; -import muramasa.antimatter.block.BlockStoneSlab; -import muramasa.antimatter.block.BlockStoneStair; -import muramasa.antimatter.block.BlockStoneWall; -import muramasa.antimatter.block.BlockStorage; +import muramasa.antimatter.block.*; import muramasa.antimatter.data.AntimatterDefaultTools; import muramasa.antimatter.data.AntimatterMaterialTypes; -import muramasa.antimatter.data.AntimatterStoneTypes; import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.datagen.IAntimatterProvider; import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.machine.BlockMultiMachine; -import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.ore.BlockOre; import muramasa.antimatter.ore.BlockOreStone; @@ -28,14 +22,12 @@ import net.minecraft.data.HashCache; import net.minecraft.data.loot.BlockLoot; import net.minecraft.world.item.Item; -import net.minecraft.world.item.Items; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.entries.LootItem; -import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer; import net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer; import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount; import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockStateProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockStateProvider.java index 494b91c42..e453221fd 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockStateProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockStateProvider.java @@ -8,11 +8,7 @@ import muramasa.antimatter.client.AntimatterModelManager; import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.datagen.IAntimatterProvider; -import muramasa.antimatter.datagen.builder.AntimatterBlockModelBuilder; -import muramasa.antimatter.datagen.builder.IModelLocation; -import muramasa.antimatter.datagen.builder.IStateBuilder; -import muramasa.antimatter.datagen.builder.MultiPartBlockStateBuilder; -import muramasa.antimatter.datagen.builder.VariantBlockStateBuilder; +import muramasa.antimatter.datagen.builder.*; import muramasa.antimatter.datagen.builder.VariantBlockStateBuilder.VariantBuilder; import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.util.AntimatterPlatformUtils; @@ -20,33 +16,11 @@ import net.minecraft.core.Registry; import net.minecraft.data.HashCache; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.ButtonBlock; -import net.minecraft.world.level.block.CrossCollisionBlock; -import net.minecraft.world.level.block.DoorBlock; -import net.minecraft.world.level.block.FenceBlock; -import net.minecraft.world.level.block.FenceGateBlock; -import net.minecraft.world.level.block.IronBarsBlock; -import net.minecraft.world.level.block.PipeBlock; -import net.minecraft.world.level.block.PressurePlateBlock; -import net.minecraft.world.level.block.RotatedPillarBlock; -import net.minecraft.world.level.block.SlabBlock; -import net.minecraft.world.level.block.StairBlock; -import net.minecraft.world.level.block.StandingSignBlock; -import net.minecraft.world.level.block.TrapDoorBlock; -import net.minecraft.world.level.block.WallBlock; -import net.minecraft.world.level.block.WallSignBlock; +import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.AttachFace; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.DoorHingeSide; -import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; -import net.minecraft.world.level.block.state.properties.Half; -import net.minecraft.world.level.block.state.properties.Property; -import net.minecraft.world.level.block.state.properties.StairsShape; -import net.minecraft.world.level.block.state.properties.WallSide; - -import javax.annotation.Nonnull; +import net.minecraft.world.level.block.state.properties.*; +import org.jetbrains.annotations.NotNull; + import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; @@ -74,7 +48,7 @@ public void run(HashCache cache) throws IOException { } - @Nonnull + @NotNull @Override public String getName() { return providerName; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockTagProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockTagProvider.java index 3cf4ec3a3..7e2aea231 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockTagProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterBlockTagProvider.java @@ -2,11 +2,7 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.block.BlockStone; -import muramasa.antimatter.block.BlockStoneSlab; -import muramasa.antimatter.block.BlockStoneStair; -import muramasa.antimatter.block.BlockStoneWall; -import muramasa.antimatter.block.BlockStorage; +import muramasa.antimatter.block.*; import muramasa.antimatter.data.AntimatterDefaultTools; import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.data.AntimatterMaterials; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemModelProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemModelProvider.java index 8debd9ea0..3d94068e6 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemModelProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemModelProvider.java @@ -9,7 +9,6 @@ import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; import muramasa.antimatter.util.AntimatterPlatformUtils; -import net.minecraft.data.DataGenerator; import net.minecraft.data.HashCache; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemTagProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemTagProvider.java index b12f0b0bd..d65981d52 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemTagProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterItemTagProvider.java @@ -22,7 +22,6 @@ import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.TagUtils; import net.minecraft.core.Registry; -import net.minecraft.data.tags.TagsProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.Tag; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java index fd2e37a74..71ccbd3fc 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java @@ -9,12 +9,7 @@ import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.datagen.IAntimatterProvider; import muramasa.antimatter.fluid.AntimatterFluid; -import muramasa.antimatter.item.DebugScannerItem; -import muramasa.antimatter.item.ItemBasic; -import muramasa.antimatter.item.ItemBattery; -import muramasa.antimatter.item.ItemCover; -import muramasa.antimatter.item.ItemFluidCell; -import muramasa.antimatter.item.ItemMultiTextureBattery; +import muramasa.antimatter.item.*; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.material.*; @@ -24,8 +19,6 @@ import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.pipe.BlockPipe; import muramasa.antimatter.pipe.types.Cable; -import muramasa.antimatter.pipe.types.FluidPipe; -import muramasa.antimatter.pipe.types.ItemPipe; import muramasa.antimatter.recipe.map.RecipeMap; import muramasa.antimatter.registration.IAntimatterObject; import muramasa.antimatter.tool.IAntimatterArmor; diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterRecipeProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterRecipeProvider.java index fbfb765ca..0e481ece3 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterRecipeProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterRecipeProvider.java @@ -14,7 +14,6 @@ import net.minecraft.data.HashCache; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; -import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; diff --git a/common/src/main/java/muramasa/antimatter/dynamic/BlockDynamic.java b/common/src/main/java/muramasa/antimatter/dynamic/BlockDynamic.java index ba1d1f337..765eedefb 100644 --- a/common/src/main/java/muramasa/antimatter/dynamic/BlockDynamic.java +++ b/common/src/main/java/muramasa/antimatter/dynamic/BlockDynamic.java @@ -13,8 +13,8 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Random; diff --git a/common/src/main/java/muramasa/antimatter/dynamic/DynamicBakedModel.java b/common/src/main/java/muramasa/antimatter/dynamic/DynamicBakedModel.java index 9290f538f..31ee32312 100644 --- a/common/src/main/java/muramasa/antimatter/dynamic/DynamicBakedModel.java +++ b/common/src/main/java/muramasa/antimatter/dynamic/DynamicBakedModel.java @@ -10,9 +10,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -32,7 +32,7 @@ public DynamicBakedModel(TextureAtlasSprite particle, Int2ObjectOpenHashMap getBlockQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public List getBlockQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { if (!hasConfig || !(state.getBlock() instanceof BlockDynamic dynamic)) return Collections.emptyList();//bakedDefault.getQuads(state, side, rand, data); List quads = new LinkedList<>(); ModelConfig config = dynamic.getConfig(state, level, mutablePos, pos); diff --git a/common/src/main/java/muramasa/antimatter/dynamic/ModelConfig.java b/common/src/main/java/muramasa/antimatter/dynamic/ModelConfig.java index ba027231f..c0912c4c8 100644 --- a/common/src/main/java/muramasa/antimatter/dynamic/ModelConfig.java +++ b/common/src/main/java/muramasa/antimatter/dynamic/ModelConfig.java @@ -8,9 +8,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Random; @@ -44,7 +44,7 @@ public int getModelIndex() { return modelIndex; } - public List getQuads(List quads, Int2ObjectOpenHashMap bakedConfigs, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public List getQuads(List quads, Int2ObjectOpenHashMap bakedConfigs, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { BakedModel[] baked; if (side == null) { for (int i = 0; i < config.length; i++) { @@ -71,7 +71,7 @@ public List getQuads(List quads, Int2ObjectOpenHashMap quads, BakedModel[] baked, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public void addBaked(List quads, BakedModel[] baked, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { for (int j = 0; j < baked.length; j++) { quads.addAll(ModelUtils.getQuadsFromBaked(baked[j], state, side, rand, level, pos)); } diff --git a/common/src/main/java/muramasa/antimatter/dynamic/ModelConfigRandom.java b/common/src/main/java/muramasa/antimatter/dynamic/ModelConfigRandom.java index f43707907..cd45b8d40 100644 --- a/common/src/main/java/muramasa/antimatter/dynamic/ModelConfigRandom.java +++ b/common/src/main/java/muramasa/antimatter/dynamic/ModelConfigRandom.java @@ -8,9 +8,9 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Random; @@ -24,7 +24,7 @@ public ModelConfig set(BlockPos pos, int[] config) { } @Override - public List getQuads(List quads, Int2ObjectOpenHashMap bakedConfigs, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos) { + public List getQuads(List quads, Int2ObjectOpenHashMap bakedConfigs, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos) { //setModelIndex(config[rand.nextInt(config.length)]); BakedModel[] baked = bakedConfigs.get(getModelIndex()); if (baked != null) { diff --git a/common/src/main/java/muramasa/antimatter/event/MaterialEvent.java b/common/src/main/java/muramasa/antimatter/event/MaterialEvent.java index 04b0cf3df..b47757d9f 100644 --- a/common/src/main/java/muramasa/antimatter/event/MaterialEvent.java +++ b/common/src/main/java/muramasa/antimatter/event/MaterialEvent.java @@ -5,15 +5,9 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.Antimatter; import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.data.AntimatterDefaultTools; import muramasa.antimatter.data.AntimatterMaterialTypes; +import muramasa.antimatter.material.*; import muramasa.antimatter.material.data.ArmorData; -import muramasa.antimatter.material.IMaterialTag; -import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialStack; -import muramasa.antimatter.material.MaterialTags; -import muramasa.antimatter.material.MaterialTypeBlock; -import muramasa.antimatter.material.MaterialTypeItem; import muramasa.antimatter.material.data.HandleData; import muramasa.antimatter.material.data.ToolData; import muramasa.antimatter.tool.AntimatterToolType; diff --git a/common/src/main/java/muramasa/antimatter/event/ProvidersEvent.java b/common/src/main/java/muramasa/antimatter/event/ProvidersEvent.java index 6940d7a93..ed56d96b5 100644 --- a/common/src/main/java/muramasa/antimatter/event/ProvidersEvent.java +++ b/common/src/main/java/muramasa/antimatter/event/ProvidersEvent.java @@ -3,11 +3,9 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.datagen.IAntimatterProvider; import muramasa.antimatter.registration.Side; -import net.minecraft.data.DataGenerator; import java.util.Collection; import java.util.List; -import java.util.function.Function; import java.util.function.Supplier; public class ProvidersEvent { diff --git a/common/src/main/java/muramasa/antimatter/event/WorldGenEvent.java b/common/src/main/java/muramasa/antimatter/event/WorldGenEvent.java index bdb7492d8..c0f13f1f1 100644 --- a/common/src/main/java/muramasa/antimatter/event/WorldGenEvent.java +++ b/common/src/main/java/muramasa/antimatter/event/WorldGenEvent.java @@ -8,8 +8,6 @@ import muramasa.antimatter.worldgen.smallore.WorldGenSmallOre; import muramasa.antimatter.worldgen.vanillaore.WorldGenVanillaOre; import muramasa.antimatter.worldgen.vein.WorldGenVeinLayer; -import muramasa.antimatter.worldgen.vein.WorldGenVeinLayerBuilder; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; import net.minecraft.world.level.block.state.BlockState; import java.util.Arrays; diff --git a/common/src/main/java/muramasa/antimatter/example/ExampleItem.java b/common/src/main/java/muramasa/antimatter/example/ExampleItem.java index 461aa0e17..c68c8a3d7 100644 --- a/common/src/main/java/muramasa/antimatter/example/ExampleItem.java +++ b/common/src/main/java/muramasa/antimatter/example/ExampleItem.java @@ -5,7 +5,6 @@ import muramasa.antimatter.registration.IModelProvider; import muramasa.antimatter.registration.ITextureProvider; import muramasa.antimatter.texture.Texture; -import net.minecraft.world.item.Item; public class ExampleItem extends ItemBasic implements IAntimatterObject, ITextureProvider, IModelProvider { diff --git a/common/src/main/java/muramasa/antimatter/gui/GuiData.java b/common/src/main/java/muramasa/antimatter/gui/GuiData.java index 1ac59c7ab..c01c36832 100644 --- a/common/src/main/java/muramasa/antimatter/gui/GuiData.java +++ b/common/src/main/java/muramasa/antimatter/gui/GuiData.java @@ -6,7 +6,6 @@ import muramasa.antimatter.gui.slot.ISlotProvider; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.registration.IAntimatterObject; -import muramasa.antimatter.util.int2; import muramasa.antimatter.util.int4; import net.minecraft.resources.ResourceLocation; diff --git a/common/src/main/java/muramasa/antimatter/gui/GuiInstance.java b/common/src/main/java/muramasa/antimatter/gui/GuiInstance.java index 6943396c0..0ace2d918 100644 --- a/common/src/main/java/muramasa/antimatter/gui/GuiInstance.java +++ b/common/src/main/java/muramasa/antimatter/gui/GuiInstance.java @@ -23,13 +23,9 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.function.*; import java.util.stream.Stream; diff --git a/common/src/main/java/muramasa/antimatter/gui/ICanSyncData.java b/common/src/main/java/muramasa/antimatter/gui/ICanSyncData.java index 148885b0d..b87fe9cb6 100644 --- a/common/src/main/java/muramasa/antimatter/gui/ICanSyncData.java +++ b/common/src/main/java/muramasa/antimatter/gui/ICanSyncData.java @@ -5,11 +5,7 @@ import net.minecraft.world.item.ItemStack; import tesseract.FluidPlatformUtils; -import java.util.function.BiConsumer; -import java.util.function.BiFunction; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.function.Supplier; +import java.util.function.*; public interface ICanSyncData { diff --git a/common/src/main/java/muramasa/antimatter/gui/MenuHandler.java b/common/src/main/java/muramasa/antimatter/gui/MenuHandler.java index bcac1c1be..1532995df 100644 --- a/common/src/main/java/muramasa/antimatter/gui/MenuHandler.java +++ b/common/src/main/java/muramasa/antimatter/gui/MenuHandler.java @@ -5,12 +5,8 @@ import muramasa.antimatter.Ref; import muramasa.antimatter.capability.IGuiHandler; import muramasa.antimatter.gui.container.IAntimatterContainer; -import muramasa.antimatter.gui.screen.AntimatterContainerScreen; import muramasa.antimatter.registration.IAntimatterObject; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.MethodsReturnNonnullByDefault; -import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; diff --git a/common/src/main/java/muramasa/antimatter/gui/Widget.java b/common/src/main/java/muramasa/antimatter/gui/Widget.java index 4a65b341c..10d52353e 100644 --- a/common/src/main/java/muramasa/antimatter/gui/Widget.java +++ b/common/src/main/java/muramasa/antimatter/gui/Widget.java @@ -1,11 +1,7 @@ package muramasa.antimatter.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.blaze3d.vertex.*; import com.mojang.math.Matrix4f; import muramasa.antimatter.gui.widget.WidgetSupplier; import net.fabricmc.api.EnvType; @@ -13,19 +9,16 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiComponent; -import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.client.resources.sounds.SimpleSoundInstance; import net.minecraft.client.sounds.SoundManager; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.TextComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvents; -import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.function.BiFunction; @@ -45,7 +38,7 @@ public abstract class Widget implements IGuiElement { private int x, y, w, h = 0; private int realX, realY; - protected Widget(@Nonnull final GuiInstance gui, @Nullable final IGuiElement parent) { + protected Widget(@NotNull final GuiInstance gui, @Nullable final IGuiElement parent) { this.gui = gui; this.isRemote = gui.isRemote; this.parent = parent; diff --git a/common/src/main/java/muramasa/antimatter/gui/container/AntimatterContainer.java b/common/src/main/java/muramasa/antimatter/gui/container/AntimatterContainer.java index 2c64d90bd..b089a3233 100644 --- a/common/src/main/java/muramasa/antimatter/gui/container/AntimatterContainer.java +++ b/common/src/main/java/muramasa/antimatter/gui/container/AntimatterContainer.java @@ -24,8 +24,6 @@ import net.minecraft.world.item.ItemStack; import tesseract.api.item.ExtendedItemContainer; -import java.util.ArrayList; -import java.util.List; import java.util.Set; public abstract class AntimatterContainer extends AbstractContainerMenu implements IAntimatterContainer { diff --git a/common/src/main/java/muramasa/antimatter/gui/container/ContainerCover.java b/common/src/main/java/muramasa/antimatter/gui/container/ContainerCover.java index 9ed575465..7bf3f52df 100644 --- a/common/src/main/java/muramasa/antimatter/gui/container/ContainerCover.java +++ b/common/src/main/java/muramasa/antimatter/gui/container/ContainerCover.java @@ -2,12 +2,10 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import muramasa.antimatter.capability.machine.MachineItemHandler; import muramasa.antimatter.cover.ICover; import muramasa.antimatter.gui.MenuHandlerCover; import muramasa.antimatter.gui.SlotData; import muramasa.antimatter.gui.SlotType; -import muramasa.antimatter.tile.TileEntityMachine; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ContainerLevelAccess; diff --git a/common/src/main/java/muramasa/antimatter/gui/core/RTree.java b/common/src/main/java/muramasa/antimatter/gui/core/RTree.java index 5b7876171..637d6cd71 100644 --- a/common/src/main/java/muramasa/antimatter/gui/core/RTree.java +++ b/common/src/main/java/muramasa/antimatter/gui/core/RTree.java @@ -2,14 +2,7 @@ import muramasa.antimatter.gui.IGuiElement; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Queue; -import java.util.Set; +import java.util.*; /* Source: diff --git a/common/src/main/java/muramasa/antimatter/gui/screen/ScreenBasicMachine.java b/common/src/main/java/muramasa/antimatter/gui/screen/ScreenBasicMachine.java index 19e44bdda..3100e24c4 100644 --- a/common/src/main/java/muramasa/antimatter/gui/screen/ScreenBasicMachine.java +++ b/common/src/main/java/muramasa/antimatter/gui/screen/ScreenBasicMachine.java @@ -1,10 +1,8 @@ package muramasa.antimatter.gui.screen; import com.mojang.blaze3d.vertex.PoseStack; -import muramasa.antimatter.gui.ButtonOverlay; import muramasa.antimatter.gui.container.ContainerBasicMachine; import muramasa.antimatter.tile.TileEntityMachine; -import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/common/src/main/java/muramasa/antimatter/gui/screen/ScreenCover.java b/common/src/main/java/muramasa/antimatter/gui/screen/ScreenCover.java index 72bf2d040..f280024e9 100644 --- a/common/src/main/java/muramasa/antimatter/gui/screen/ScreenCover.java +++ b/common/src/main/java/muramasa/antimatter/gui/screen/ScreenCover.java @@ -1,8 +1,6 @@ package muramasa.antimatter.gui.screen; import com.mojang.blaze3d.vertex.PoseStack; -import muramasa.antimatter.cover.ICoverMode; -import muramasa.antimatter.cover.ICoverModeHandler; import muramasa.antimatter.gui.Widget; import muramasa.antimatter.gui.container.ContainerCover; import net.minecraft.client.Minecraft; diff --git a/common/src/main/java/muramasa/antimatter/gui/slot/AbstractSlot.java b/common/src/main/java/muramasa/antimatter/gui/slot/AbstractSlot.java index c9baa2a05..cbd23f9e2 100644 --- a/common/src/main/java/muramasa/antimatter/gui/slot/AbstractSlot.java +++ b/common/src/main/java/muramasa/antimatter/gui/slot/AbstractSlot.java @@ -4,13 +4,12 @@ import muramasa.antimatter.capability.item.TrackedItemHandler; import muramasa.antimatter.capability.machine.MachineItemHandler; import muramasa.antimatter.gui.SlotType; -import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; public class AbstractSlot extends Slot { protected final int index; @@ -27,7 +26,7 @@ public AbstractSlot(SlotType type, IGuiHandler tile, ExtendedItemContainer st } @Override - public void onQuickCraft(@Nonnull ItemStack oldStackIn, @Nonnull ItemStack newStackIn) { + public void onQuickCraft(@NotNull ItemStack oldStackIn, @NotNull ItemStack newStackIn) { super.onQuickCraft(oldStackIn, newStackIn); if (this.container instanceof TrackedItemHandler trackedItemHandler) { trackedItemHandler.onContentsChanged(this.index); @@ -44,7 +43,7 @@ public void setChanged() { @Override - @Nonnull + @NotNull public ItemStack remove(int amount) { return MachineItemHandler.extractFromInput(this.container, index, amount, false); } @@ -55,12 +54,12 @@ public boolean mayPickup(Player playerIn) { } @Override - public boolean mayPlace(@Nonnull ItemStack stack) { + public boolean mayPlace(@NotNull ItemStack stack) { return this.type.tester.test(this.holder, stack); } @Override - public int getMaxStackSize(@Nonnull ItemStack stack) { + public int getMaxStackSize(@NotNull ItemStack stack) { ItemStack maxAdd = stack.copy(); int maxInput = stack.getMaxStackSize(); maxAdd.setCount(maxInput); diff --git a/common/src/main/java/muramasa/antimatter/gui/slot/SlotEnergy.java b/common/src/main/java/muramasa/antimatter/gui/slot/SlotEnergy.java index 47f85f0c7..dbdd5c585 100644 --- a/common/src/main/java/muramasa/antimatter/gui/slot/SlotEnergy.java +++ b/common/src/main/java/muramasa/antimatter/gui/slot/SlotEnergy.java @@ -4,9 +4,9 @@ import muramasa.antimatter.gui.SlotType; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; public class SlotEnergy extends AbstractSlot { public SlotEnergy(SlotType type, IGuiHandler tile, ExtendedItemContainer itemHandler, int index, int xPosition, int yPosition) { @@ -19,7 +19,7 @@ public int getMaxStackSize() { } @Override - public int getMaxStackSize(@Nonnull ItemStack stack) { + public int getMaxStackSize(@NotNull ItemStack stack) { return 1; } diff --git a/common/src/main/java/muramasa/antimatter/gui/slot/SlotFake.java b/common/src/main/java/muramasa/antimatter/gui/slot/SlotFake.java index 3e292a527..3792f6d1e 100644 --- a/common/src/main/java/muramasa/antimatter/gui/slot/SlotFake.java +++ b/common/src/main/java/muramasa/antimatter/gui/slot/SlotFake.java @@ -10,9 +10,9 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ClickType; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; //TODO: Should be used on filters public class SlotFake extends AbstractSlot implements IClickableSlot { @@ -24,7 +24,7 @@ public SlotFake(SlotType type, IGuiHandler tile, ExtendedItemContainer } @Override - public boolean mayPlace(@Nonnull ItemStack stack) { + public boolean mayPlace(@NotNull ItemStack stack) { return settable; } @@ -34,7 +34,7 @@ public boolean mayPickup(Player playerIn) { } @Override - public int getMaxStackSize(@Nonnull ItemStack stack) { + public int getMaxStackSize(@NotNull ItemStack stack) { if (settable) { return 1; } @@ -42,14 +42,14 @@ public int getMaxStackSize(@Nonnull ItemStack stack) { } @Override - @Nonnull + @NotNull public ItemStack remove(int amount) { if (!settable || !(this.getContainer() instanceof FakeTrackedItemHandler)) return super.remove(amount); return MachineItemHandler.extractFromInput(this.getContainer(), index, amount, false); } @Override - public void onQuickCraft(@Nonnull ItemStack p_75220_1_, @Nonnull ItemStack p_75220_2_) { + public void onQuickCraft(@NotNull ItemStack p_75220_1_, @NotNull ItemStack p_75220_2_) { } @Override @@ -58,7 +58,7 @@ public void setChanged() { } @Override - public void set(@Nonnull ItemStack stack) { + public void set(@NotNull ItemStack stack) { super.set(stack); } diff --git a/common/src/main/java/muramasa/antimatter/gui/slot/SlotFakeFluid.java b/common/src/main/java/muramasa/antimatter/gui/slot/SlotFakeFluid.java index 346067b83..a728783ce 100644 --- a/common/src/main/java/muramasa/antimatter/gui/slot/SlotFakeFluid.java +++ b/common/src/main/java/muramasa/antimatter/gui/slot/SlotFakeFluid.java @@ -6,8 +6,8 @@ import muramasa.antimatter.gui.SlotType; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; public class SlotFakeFluid extends AbstractSlot { @@ -19,7 +19,7 @@ public SlotFakeFluid(SlotType type, IGuiHandler tile, MachineFlui } @Override - public boolean mayPlace(@Nonnull ItemStack stack) { + public boolean mayPlace(@NotNull ItemStack stack) { return false; } diff --git a/common/src/main/java/muramasa/antimatter/gui/slot/SlotOutput.java b/common/src/main/java/muramasa/antimatter/gui/slot/SlotOutput.java index 361dd926f..ea373cfc9 100644 --- a/common/src/main/java/muramasa/antimatter/gui/slot/SlotOutput.java +++ b/common/src/main/java/muramasa/antimatter/gui/slot/SlotOutput.java @@ -4,9 +4,9 @@ import muramasa.antimatter.gui.SlotType; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; public class SlotOutput extends AbstractSlot { @@ -20,7 +20,7 @@ public boolean mayPickup(Player player) { } @Override - public boolean mayPlace(@Nonnull ItemStack stack) { + public boolean mayPlace(@NotNull ItemStack stack) { return false; } } diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/BackgroundWidget.java b/common/src/main/java/muramasa/antimatter/gui/widget/BackgroundWidget.java index 977b0c581..db88c694b 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/BackgroundWidget.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/BackgroundWidget.java @@ -10,6 +10,7 @@ import net.minecraft.client.gui.GuiComponent; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.resources.ResourceLocation; + ; ; diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/ButtonWidget.java b/common/src/main/java/muramasa/antimatter/gui/widget/ButtonWidget.java index 95f7ecf47..5cb880bed 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/ButtonWidget.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/ButtonWidget.java @@ -19,14 +19,13 @@ import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundEvents; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.function.Consumer; import java.util.function.Function; public class ButtonWidget extends Widget { - @Nonnull + @NotNull protected final ButtonOverlay body; @Nullable protected String message; diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/CycleButtonWidget.java b/common/src/main/java/muramasa/antimatter/gui/widget/CycleButtonWidget.java index 6819da966..cefbd5a59 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/CycleButtonWidget.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/CycleButtonWidget.java @@ -10,7 +10,9 @@ import net.minecraft.client.gui.screens.Screen; import org.jetbrains.annotations.Nullable; -import java.util.function.*; +import java.util.function.Consumer; +import java.util.function.IntFunction; +import java.util.function.ToIntFunction; public class CycleButtonWidget extends ButtonWidget{ final ButtonOverlay[] buttons; diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/FluidSlotWidget.java b/common/src/main/java/muramasa/antimatter/gui/widget/FluidSlotWidget.java index be703252b..f4ec53aeb 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/FluidSlotWidget.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/FluidSlotWidget.java @@ -22,14 +22,11 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.world.level.block.entity.BlockEntity; import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import static muramasa.antimatter.gui.ICanSyncData.SyncDirection.SERVER_TO_CLIENT; import static muramasa.antimatter.integration.jeirei.AntimatterJEIREIPlugin.intToSuperScript; diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/IOWidget.java b/common/src/main/java/muramasa/antimatter/gui/widget/IOWidget.java index 1bf1e3fd9..bca3de74f 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/IOWidget.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/IOWidget.java @@ -3,19 +3,15 @@ import com.mojang.blaze3d.vertex.PoseStack; import muramasa.antimatter.Ref; import muramasa.antimatter.cover.CoverOutput; -import muramasa.antimatter.gui.ButtonOverlay; import muramasa.antimatter.gui.GuiInstance; import muramasa.antimatter.gui.IGuiElement; import muramasa.antimatter.gui.Widget; import muramasa.antimatter.gui.container.ContainerMachine; import muramasa.antimatter.gui.event.GuiEvents; -import muramasa.antimatter.util.int4; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraft.resources.ResourceLocation; -import javax.annotation.Nullable; - import static muramasa.antimatter.gui.ICanSyncData.SyncDirection.SERVER_TO_CLIENT; import static muramasa.antimatter.machine.MachineFlag.FLUID; import static muramasa.antimatter.machine.MachineFlag.ITEM; diff --git a/common/src/main/java/muramasa/antimatter/gui/widget/WidgetGroup.java b/common/src/main/java/muramasa/antimatter/gui/widget/WidgetGroup.java index 38370ad63..3762d91eb 100644 --- a/common/src/main/java/muramasa/antimatter/gui/widget/WidgetGroup.java +++ b/common/src/main/java/muramasa/antimatter/gui/widget/WidgetGroup.java @@ -4,16 +4,16 @@ import muramasa.antimatter.gui.GuiInstance; import muramasa.antimatter.gui.IGuiElement; import muramasa.antimatter.gui.Widget; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; public abstract class WidgetGroup extends Widget { private final List children = new ObjectArrayList<>(); - protected WidgetGroup(@Nonnull GuiInstance gui, @Nullable IGuiElement parent) { + protected WidgetGroup(@NotNull GuiInstance gui, @Nullable IGuiElement parent) { super(gui, parent); } diff --git a/common/src/main/java/muramasa/antimatter/integration/ct/AntimatterCraftTweaker.java b/common/src/main/java/muramasa/antimatter/integration/ct/AntimatterCraftTweaker.java index fbc871c2c..0c7c2bbdd 100644 --- a/common/src/main/java/muramasa/antimatter/integration/ct/AntimatterCraftTweaker.java +++ b/common/src/main/java/muramasa/antimatter/integration/ct/AntimatterCraftTweaker.java @@ -5,12 +5,7 @@ import com.blamejared.crafttweaker.api.ingredient.IIngredient; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.material.Element; -import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialType; -import muramasa.antimatter.material.MaterialTypeBlock; -import muramasa.antimatter.material.MaterialTypeItem; -import muramasa.antimatter.material.TextureSet; +import muramasa.antimatter.material.*; import net.minecraft.world.item.crafting.Ingredient; import org.openzen.zencode.java.ZenCodeType; diff --git a/common/src/main/java/muramasa/antimatter/integration/jei/AntimatterJEIPlugin.java b/common/src/main/java/muramasa/antimatter/integration/jei/AntimatterJEIPlugin.java index 0964911f6..00fb8fb48 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jei/AntimatterJEIPlugin.java +++ b/common/src/main/java/muramasa/antimatter/integration/jei/AntimatterJEIPlugin.java @@ -15,26 +15,22 @@ import mezz.jei.api.runtime.IJeiRuntime; import muramasa.antimatter.Antimatter; import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.Data; import muramasa.antimatter.Ref; -import muramasa.antimatter.block.BlockSurfaceRock; import muramasa.antimatter.fluid.AntimatterFluid; -import muramasa.antimatter.integration.jeirei.AntimatterJEIREIPlugin; import muramasa.antimatter.integration.jei.category.MultiMachineInfoCategory; import muramasa.antimatter.integration.jei.category.RecipeMapCategory; import muramasa.antimatter.integration.jei.extension.JEIMaterialRecipeExtension; +import muramasa.antimatter.integration.jeirei.AntimatterJEIREIPlugin; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialTypeItem; -import muramasa.antimatter.ore.BlockOre; import muramasa.antimatter.recipe.IRecipe; import muramasa.antimatter.recipe.Recipe; import muramasa.antimatter.recipe.map.IRecipeMap; import muramasa.antimatter.recipe.map.RecipeMap; import muramasa.antimatter.recipe.material.MaterialRecipe; import muramasa.antimatter.util.AntimatterPlatformUtils; -import muramasa.antimatter.util.Utils; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; @@ -46,8 +42,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeManager; import net.minecraft.world.level.ItemLike; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.*; import java.util.stream.Collectors; @@ -70,7 +66,7 @@ public ResourceLocation getPluginUid() { } @Override - public void onRuntimeAvailable(@Nonnull IJeiRuntime jeiRuntime) { + public void onRuntimeAvailable(@NotNull IJeiRuntime jeiRuntime) { if (AntimatterAPI.isModLoaded(Ref.MOD_REI)) return; runtime = jeiRuntime; //Remove fluid "blocks". @@ -111,7 +107,7 @@ public void registerCategories(IRecipeCategoryRegistration registry) { } @Override - public void registerRecipes(@Nonnull IRecipeRegistration registration) { + public void registerRecipes(@NotNull IRecipeRegistration registration) { if (AntimatterAPI.isModLoaded(Ref.MOD_REI)) return; if (helpers == null) helpers = registration.getJeiHelpers(); AntimatterJEIREIPlugin.getREGISTRY().forEach((id, tuple) -> { @@ -205,7 +201,7 @@ public static void addModDescriptor(List tooltip, T t) { } @Override - public void registerRecipeCatalysts(@Nonnull IRecipeCatalystRegistration registration) { + public void registerRecipeCatalysts(@NotNull IRecipeCatalystRegistration registration) { if (AntimatterAPI.isModLoaded(Ref.MOD_REI)) return; AntimatterAPI.all(Machine.class, machine -> { ((Machine)machine).getTiers().forEach(t -> { diff --git a/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoCategory.java b/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoCategory.java index 8cae514e0..6692d45c1 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoCategory.java +++ b/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoCategory.java @@ -14,8 +14,8 @@ import net.minecraft.network.chat.TextComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.List; import java.util.Set; @@ -45,58 +45,58 @@ public static void registerRecipes(IRecipeRegistration registry) { } @Override - public boolean handleClick(@Nonnull MultiMachineInfoPage recipe, double mouseX, double mouseY, int mouseButton) { + public boolean handleClick(@NotNull MultiMachineInfoPage recipe, double mouseX, double mouseY, int mouseButton) { return recipe.handleClick(mouseX, mouseY, mouseButton); } @Override - public void draw(@Nonnull MultiMachineInfoPage recipe, @Nonnull PoseStack matrixStack, double mouseX, double mouseY) { + public void draw(@NotNull MultiMachineInfoPage recipe, @NotNull PoseStack matrixStack, double mouseX, double mouseY) { recipe.drawInfo(matrixStack, (int)mouseX, (int)mouseY); } - @Nonnull + @NotNull @Override public ResourceLocation getUid() { return UID; } - @Nonnull + @NotNull @Override public Class getRecipeClass() { return MultiMachineInfoPage.class; } - @Nonnull + @NotNull @Override public Component getTitle() { return new TextComponent( "Multi Machines Title"); } - @Nonnull + @NotNull @Override public IDrawable getBackground() { return background; } - @Nonnull + @NotNull @Override public IDrawable getIcon() { return icon; } @Override - public void setIngredients(@Nonnull MultiMachineInfoPage recipe, @Nonnull IIngredients ingredients) { + public void setIngredients(@NotNull MultiMachineInfoPage recipe, @NotNull IIngredients ingredients) { recipe.setIngredients(ingredients); } - @Nonnull + @NotNull @Override - public List getTooltipStrings(@Nonnull MultiMachineInfoPage recipe, double mouseX, double mouseY) { + public List getTooltipStrings(@NotNull MultiMachineInfoPage recipe, double mouseX, double mouseY) { return recipe.getTooltipStrings(mouseX, mouseY); } @Override - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull MultiMachineInfoPage recipe, @Nonnull IIngredients ingredients) { + public void setRecipe(@NotNull IRecipeLayout recipeLayout, @NotNull MultiMachineInfoPage recipe, @NotNull IIngredients ingredients) { recipe.setRecipeLayout(recipeLayout, guiHelper); } diff --git a/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoPage.java b/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoPage.java index 30c8e75d9..abc5dbb3f 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoPage.java +++ b/common/src/main/java/muramasa/antimatter/integration/jei/category/MultiMachineInfoPage.java @@ -29,17 +29,12 @@ import net.minecraft.util.Mth; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; import org.lwjgl.opengl.GL11; -import javax.annotation.Nonnull; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; @SuppressWarnings("removal") @@ -192,7 +187,7 @@ private void resetCenter(TrackedDummyWorld world) { getCurrentRenderer().setCameraLookAt(center, zoom, Math.toRadians(rotationPitch), Math.toRadians(rotationYaw)); } - public void drawInfo(@Nonnull PoseStack matrixStack, int mouseX, int mouseY) { + public void drawInfo(@NotNull PoseStack matrixStack, int mouseX, int mouseY) { WorldSceneRenderer renderer = getCurrentRenderer(); Vector4f transform = new Vector4f(0, 0, 0, 1); transform.transform(matrixStack.last().pose()); diff --git a/common/src/main/java/muramasa/antimatter/integration/jei/category/RecipeMapCategory.java b/common/src/main/java/muramasa/antimatter/integration/jei/category/RecipeMapCategory.java index 149f306bb..16f93158a 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jei/category/RecipeMapCategory.java +++ b/common/src/main/java/muramasa/antimatter/integration/jei/category/RecipeMapCategory.java @@ -46,7 +46,6 @@ import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/integration/jei/extension/JEIMaterialRecipeExtension.java b/common/src/main/java/muramasa/antimatter/integration/jei/extension/JEIMaterialRecipeExtension.java index 844a21013..6a593a688 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jei/extension/JEIMaterialRecipeExtension.java +++ b/common/src/main/java/muramasa/antimatter/integration/jei/extension/JEIMaterialRecipeExtension.java @@ -19,11 +19,7 @@ import net.minecraft.world.item.crafting.Ingredient; import org.jetbrains.annotations.NotNull; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; import static net.minecraft.ChatFormatting.GOLD; diff --git a/common/src/main/java/muramasa/antimatter/integration/jeirei/renderer/IInfoRenderer.java b/common/src/main/java/muramasa/antimatter/integration/jeirei/renderer/IInfoRenderer.java index 4f4adb475..4ab5acf8c 100644 --- a/common/src/main/java/muramasa/antimatter/integration/jeirei/renderer/IInfoRenderer.java +++ b/common/src/main/java/muramasa/antimatter/integration/jeirei/renderer/IInfoRenderer.java @@ -5,6 +5,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; + ; ; diff --git a/common/src/main/java/muramasa/antimatter/integration/kubejs/AMCreationEvent.java b/common/src/main/java/muramasa/antimatter/integration/kubejs/AMCreationEvent.java index fb819b929..decb0b150 100644 --- a/common/src/main/java/muramasa/antimatter/integration/kubejs/AMCreationEvent.java +++ b/common/src/main/java/muramasa/antimatter/integration/kubejs/AMCreationEvent.java @@ -4,11 +4,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.material.Element; -import muramasa.antimatter.material.IMaterialTag; -import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialType; -import muramasa.antimatter.material.TextureSet; +import muramasa.antimatter.material.*; import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.util.AntimatterPlatformUtils; diff --git a/common/src/main/java/muramasa/antimatter/integration/kubejs/AMWorldEvent.java b/common/src/main/java/muramasa/antimatter/integration/kubejs/AMWorldEvent.java index 07df45699..9a1164270 100644 --- a/common/src/main/java/muramasa/antimatter/integration/kubejs/AMWorldEvent.java +++ b/common/src/main/java/muramasa/antimatter/integration/kubejs/AMWorldEvent.java @@ -11,8 +11,6 @@ import muramasa.antimatter.worldgen.object.WorldGenStoneLayerBuilder; import muramasa.antimatter.worldgen.vein.WorldGenVeinLayer; import muramasa.antimatter.worldgen.vein.WorldGenVeinLayerBuilder; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinBuilder; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; diff --git a/common/src/main/java/muramasa/antimatter/integration/kubejs/AntimatterKubeJS.java b/common/src/main/java/muramasa/antimatter/integration/kubejs/AntimatterKubeJS.java index d55b5a4ab..e2a0fcf27 100644 --- a/common/src/main/java/muramasa/antimatter/integration/kubejs/AntimatterKubeJS.java +++ b/common/src/main/java/muramasa/antimatter/integration/kubejs/AntimatterKubeJS.java @@ -5,10 +5,8 @@ import dev.latvian.mods.kubejs.recipe.RegisterRecipeHandlersEvent; import dev.latvian.mods.kubejs.script.BindingsEvent; import dev.latvian.mods.kubejs.script.ScriptType; -import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.event.MaterialEvent; -import muramasa.antimatter.registration.RegistrationEvent; import net.minecraft.resources.ResourceLocation; public class AntimatterKubeJS extends KubeJSPlugin { diff --git a/common/src/main/java/muramasa/antimatter/integration/kubejs/KubeJSRegistrar.java b/common/src/main/java/muramasa/antimatter/integration/kubejs/KubeJSRegistrar.java index 7f7e29391..e1258d33c 100644 --- a/common/src/main/java/muramasa/antimatter/integration/kubejs/KubeJSRegistrar.java +++ b/common/src/main/java/muramasa/antimatter/integration/kubejs/KubeJSRegistrar.java @@ -2,18 +2,20 @@ import dev.latvian.mods.kubejs.KubeJSPaths; import dev.latvian.mods.kubejs.server.ServerScriptManager; -import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.AntimatterMod; import muramasa.antimatter.Ref; +import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.datagen.providers.*; import muramasa.antimatter.event.ProvidersEvent; import muramasa.antimatter.registration.RegistrationEvent; import muramasa.antimatter.registration.Side; import muramasa.antimatter.util.AntimatterPlatformUtils; -;import java.nio.file.Files; +import java.nio.file.Files; import java.nio.file.LinkOption; +; + public class KubeJSRegistrar extends AntimatterMod { public KubeJSRegistrar() { if (AntimatterPlatformUtils.isFabric()){ diff --git a/common/src/main/java/muramasa/antimatter/integration/rei/AntimatterREIClientPlugin.java b/common/src/main/java/muramasa/antimatter/integration/rei/AntimatterREIClientPlugin.java index fce078db4..a97d5a19a 100644 --- a/common/src/main/java/muramasa/antimatter/integration/rei/AntimatterREIClientPlugin.java +++ b/common/src/main/java/muramasa/antimatter/integration/rei/AntimatterREIClientPlugin.java @@ -36,12 +36,14 @@ import muramasa.antimatter.recipe.map.RecipeMap; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Block; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Set; import java.util.function.Function; public class AntimatterREIClientPlugin implements REIClientPlugin { diff --git a/common/src/main/java/muramasa/antimatter/integration/rei/REIUtils.java b/common/src/main/java/muramasa/antimatter/integration/rei/REIUtils.java index 6bb86d59f..954a48256 100644 --- a/common/src/main/java/muramasa/antimatter/integration/rei/REIUtils.java +++ b/common/src/main/java/muramasa/antimatter/integration/rei/REIUtils.java @@ -14,10 +14,8 @@ import tesseract.FluidPlatformUtils; import java.util.ArrayList; -import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; -import java.util.stream.Collectors; import static muramasa.antimatter.machine.MachineFlag.RECIPE; diff --git a/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapCategory.java b/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapCategory.java index 31017aab5..b8c44070d 100644 --- a/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapCategory.java +++ b/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapCategory.java @@ -16,7 +16,6 @@ import me.shedaniel.rei.api.common.util.EntryStacks; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Data; -import muramasa.antimatter.Ref; import muramasa.antimatter.gui.BarDir; import muramasa.antimatter.gui.GuiData; import muramasa.antimatter.gui.SlotData; diff --git a/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapDisplay.java b/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapDisplay.java index 6d02683ae..8f166e3a7 100644 --- a/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapDisplay.java +++ b/common/src/main/java/muramasa/antimatter/integration/rei/category/RecipeMapDisplay.java @@ -1,45 +1,32 @@ package muramasa.antimatter.integration.rei.category; import com.google.common.collect.ImmutableList; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; import dev.architectury.fluid.FluidStack; -import earth.terrarium.botarium.common.fluid.base.FluidHolder; import me.shedaniel.rei.api.client.gui.widgets.Tooltip; import me.shedaniel.rei.api.common.category.CategoryIdentifier; import me.shedaniel.rei.api.common.display.Display; import me.shedaniel.rei.api.common.entry.EntryIngredient; import me.shedaniel.rei.api.common.entry.EntryStack; -import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; -import me.shedaniel.rei.api.common.util.EntryIngredients; import me.shedaniel.rei.api.common.util.EntryStacks; import muramasa.antimatter.Ref; -import muramasa.antimatter.integration.jei.AntimatterJEIPlugin; import muramasa.antimatter.integration.rei.REIUtils; import muramasa.antimatter.recipe.IRecipe; import muramasa.antimatter.recipe.ingredient.RecipeIngredient; import muramasa.antimatter.recipe.map.RecipeMap; -import muramasa.antimatter.recipe.serializer.AntimatterRecipeSerializer; import muramasa.antimatter.util.AntimatterPlatformUtils; -import muramasa.antimatter.util.Utils; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.ListTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/integration/rei/extension/REIMaterialRecipeExtension.java b/common/src/main/java/muramasa/antimatter/integration/rei/extension/REIMaterialRecipeExtension.java index 8852031de..b1f71d8ff 100644 --- a/common/src/main/java/muramasa/antimatter/integration/rei/extension/REIMaterialRecipeExtension.java +++ b/common/src/main/java/muramasa/antimatter/integration/rei/extension/REIMaterialRecipeExtension.java @@ -19,12 +19,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; +import java.util.*; import java.util.stream.Collectors; import static net.minecraft.ChatFormatting.GOLD; diff --git a/common/src/main/java/muramasa/antimatter/integration/top/EnergyInfoProvider.java b/common/src/main/java/muramasa/antimatter/integration/top/EnergyInfoProvider.java index 42a5bb38c..a317d6bdb 100644 --- a/common/src/main/java/muramasa/antimatter/integration/top/EnergyInfoProvider.java +++ b/common/src/main/java/muramasa/antimatter/integration/top/EnergyInfoProvider.java @@ -2,7 +2,6 @@ import mcjty.theoneprobe.api.*; import mcjty.theoneprobe.apiimpl.elements.ElementProgress; -import mcjty.theoneprobe.config.Config; import muramasa.antimatter.Ref; import muramasa.antimatter.capability.machine.MachineEnergyHandler; import muramasa.antimatter.tile.TileEntityMachine; diff --git a/common/src/main/java/muramasa/antimatter/integration/top/MultiblockInfoProvider.java b/common/src/main/java/muramasa/antimatter/integration/top/MultiblockInfoProvider.java index b8d1e91e3..dcb21b429 100644 --- a/common/src/main/java/muramasa/antimatter/integration/top/MultiblockInfoProvider.java +++ b/common/src/main/java/muramasa/antimatter/integration/top/MultiblockInfoProvider.java @@ -1,11 +1,6 @@ package muramasa.antimatter.integration.top; -import mcjty.theoneprobe.api.ElementAlignment; -import mcjty.theoneprobe.api.IProbeHitData; -import mcjty.theoneprobe.api.IProbeInfo; -import mcjty.theoneprobe.api.IProbeInfoProvider; -import mcjty.theoneprobe.api.ProbeMode; -import mcjty.theoneprobe.api.TextStyleClass; +import mcjty.theoneprobe.api.*; import muramasa.antimatter.Ref; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; import muramasa.antimatter.util.Utils; diff --git a/common/src/main/java/muramasa/antimatter/integration/top/RecipeInfoProvider.java b/common/src/main/java/muramasa/antimatter/integration/top/RecipeInfoProvider.java index 053b1f14c..bd61aa957 100644 --- a/common/src/main/java/muramasa/antimatter/integration/top/RecipeInfoProvider.java +++ b/common/src/main/java/muramasa/antimatter/integration/top/RecipeInfoProvider.java @@ -1,10 +1,6 @@ package muramasa.antimatter.integration.top; -import mcjty.theoneprobe.api.ElementAlignment; -import mcjty.theoneprobe.api.IProbeHitData; -import mcjty.theoneprobe.api.IProbeInfo; -import mcjty.theoneprobe.api.IProbeInfoProvider; -import mcjty.theoneprobe.api.ProbeMode; +import mcjty.theoneprobe.api.*; import muramasa.antimatter.Ref; import muramasa.antimatter.capability.machine.MachineRecipeHandler; import muramasa.antimatter.machine.MachineState; diff --git a/common/src/main/java/muramasa/antimatter/item/CoverMaterialItem.java b/common/src/main/java/muramasa/antimatter/item/CoverMaterialItem.java index 97201648f..a59cf2654 100644 --- a/common/src/main/java/muramasa/antimatter/item/CoverMaterialItem.java +++ b/common/src/main/java/muramasa/antimatter/item/CoverMaterialItem.java @@ -10,8 +10,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; public class CoverMaterialItem extends MaterialItem implements IHaveCover { diff --git a/common/src/main/java/muramasa/antimatter/item/DebugScannerItem.java b/common/src/main/java/muramasa/antimatter/item/DebugScannerItem.java index 0683e718f..74d79b03c 100644 --- a/common/src/main/java/muramasa/antimatter/item/DebugScannerItem.java +++ b/common/src/main/java/muramasa/antimatter/item/DebugScannerItem.java @@ -22,9 +22,9 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; public class DebugScannerItem extends ItemBasic { @@ -49,7 +49,7 @@ public void appendHoverText(ItemStack stack, @Nullable Level world, List use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); @@ -120,7 +119,7 @@ private static Optional getCastedHandler(ItemStack stack) { } @Override - public void appendHoverText(@Nonnull ItemStack stack, @Nullable Level worldIn, @Nonnull List tooltip, @Nonnull TooltipFlag flag) { + public void appendHoverText(@NotNull ItemStack stack, @Nullable Level worldIn, @NotNull List tooltip, @NotNull TooltipFlag flag) { //TODO: Translateable if (reusable) { tooltip.add(new TranslatableComponent("item.reusable")); diff --git a/common/src/main/java/muramasa/antimatter/item/ItemFluidCell.java b/common/src/main/java/muramasa/antimatter/item/ItemFluidCell.java index 0e2a8b1d5..2974ee5db 100644 --- a/common/src/main/java/muramasa/antimatter/item/ItemFluidCell.java +++ b/common/src/main/java/muramasa/antimatter/item/ItemFluidCell.java @@ -40,17 +40,20 @@ import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.AbstractCauldronBlock; +import net.minecraft.world.level.block.BucketPickup; +import net.minecraft.world.level.block.LayeredCauldronBlock; +import net.minecraft.world.level.block.LiquidBlockContainer; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.FlowingFluid; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nullable; import java.text.NumberFormat; import java.util.List; import java.util.Locale; diff --git a/common/src/main/java/muramasa/antimatter/item/ItemMultiTextureBattery.java b/common/src/main/java/muramasa/antimatter/item/ItemMultiTextureBattery.java index 86ca5377d..d658004db 100644 --- a/common/src/main/java/muramasa/antimatter/item/ItemMultiTextureBattery.java +++ b/common/src/main/java/muramasa/antimatter/item/ItemMultiTextureBattery.java @@ -1,21 +1,15 @@ package muramasa.antimatter.item; -import com.google.gson.JsonObject; -import muramasa.antimatter.Antimatter; import muramasa.antimatter.Ref; import muramasa.antimatter.client.RenderHelper; import muramasa.antimatter.datagen.builder.AntimatterItemModelBuilder; import muramasa.antimatter.datagen.providers.AntimatterItemModelProvider; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.texture.Texture; -import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.Utils; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.ItemLike; -import java.util.LinkedHashMap; -import java.util.Map; - public class ItemMultiTextureBattery extends ItemBattery { public ItemMultiTextureBattery(String domain, String id, Tier tier, long cap, boolean reusable) { super(domain, id, tier, cap, reusable); diff --git a/common/src/main/java/muramasa/antimatter/machine/BlockMachine.java b/common/src/main/java/muramasa/antimatter/machine/BlockMachine.java index dee8278aa..34cbdef9b 100644 --- a/common/src/main/java/muramasa/antimatter/machine/BlockMachine.java +++ b/common/src/main/java/muramasa/antimatter/machine/BlockMachine.java @@ -55,10 +55,10 @@ import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -137,7 +137,7 @@ public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block } - @Nonnull + @NotNull @Override public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { InteractionResult ty; //= onBlockActivatedBoth(state, world, pos, player, hand, hit); diff --git a/common/src/main/java/muramasa/antimatter/machine/ITooltipInfo.java b/common/src/main/java/muramasa/antimatter/machine/ITooltipInfo.java index 81c8dea48..a9e13140f 100644 --- a/common/src/main/java/muramasa/antimatter/machine/ITooltipInfo.java +++ b/common/src/main/java/muramasa/antimatter/machine/ITooltipInfo.java @@ -4,8 +4,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.BlockGetter; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; @FunctionalInterface diff --git a/common/src/main/java/muramasa/antimatter/machine/types/BasicMachine.java b/common/src/main/java/muramasa/antimatter/machine/types/BasicMachine.java index 60b08684f..dcefe4421 100644 --- a/common/src/main/java/muramasa/antimatter/machine/types/BasicMachine.java +++ b/common/src/main/java/muramasa/antimatter/machine/types/BasicMachine.java @@ -1,18 +1,11 @@ package muramasa.antimatter.machine.types; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import muramasa.antimatter.Data; -import muramasa.antimatter.capability.machine.MachineItemHandler; import muramasa.antimatter.cover.CoverOutput; -import muramasa.antimatter.gui.BarDir; -import muramasa.antimatter.gui.SlotData; -import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.gui.screen.AntimatterContainerScreen; import muramasa.antimatter.gui.widget.*; import muramasa.antimatter.tile.TileEntityMachine; import muramasa.antimatter.tile.multi.TileEntityMultiMachine; -import net.minecraft.world.inventory.Slot; import static muramasa.antimatter.machine.MachineFlag.*; diff --git a/common/src/main/java/muramasa/antimatter/machine/types/BasicMultiMachine.java b/common/src/main/java/muramasa/antimatter/machine/types/BasicMultiMachine.java index b95eb2532..dcce8b652 100644 --- a/common/src/main/java/muramasa/antimatter/machine/types/BasicMultiMachine.java +++ b/common/src/main/java/muramasa/antimatter/machine/types/BasicMultiMachine.java @@ -3,21 +3,15 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Data; import muramasa.antimatter.cover.CoverFactory; -import muramasa.antimatter.gui.BarDir; import muramasa.antimatter.gui.widget.ProgressWidget; -import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.machine.BlockMultiMachine; import muramasa.antimatter.machine.MachineState; -import muramasa.antimatter.machine.Tier; import muramasa.antimatter.structure.Pattern; import muramasa.antimatter.structure.PatternBuilder; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; import java.util.Arrays; import java.util.List; @@ -26,7 +20,6 @@ import static muramasa.antimatter.machine.MachineFlag.COVERABLE; import static muramasa.antimatter.machine.MachineFlag.MULTI; -import static muramasa.antimatter.machine.Tier.NONE; public class BasicMultiMachine> extends Machine { diff --git a/common/src/main/java/muramasa/antimatter/machine/types/GeneratorMachine.java b/common/src/main/java/muramasa/antimatter/machine/types/GeneratorMachine.java index b17f3cc31..5c8059dd2 100644 --- a/common/src/main/java/muramasa/antimatter/machine/types/GeneratorMachine.java +++ b/common/src/main/java/muramasa/antimatter/machine/types/GeneratorMachine.java @@ -3,10 +3,7 @@ import muramasa.antimatter.Data; import muramasa.antimatter.tile.single.TileEntityGenerator; -import static muramasa.antimatter.machine.MachineFlag.BASIC; -import static muramasa.antimatter.machine.MachineFlag.COVERABLE; -import static muramasa.antimatter.machine.MachineFlag.ENERGY; -import static muramasa.antimatter.machine.MachineFlag.GENERATOR; +import static muramasa.antimatter.machine.MachineFlag.*; public class GeneratorMachine extends Machine { public GeneratorMachine(String domain, String id) { diff --git a/common/src/main/java/muramasa/antimatter/machine/types/Machine.java b/common/src/main/java/muramasa/antimatter/machine/types/Machine.java index 5516dc538..4b5ac81ab 100644 --- a/common/src/main/java/muramasa/antimatter/machine/types/Machine.java +++ b/common/src/main/java/muramasa/antimatter/machine/types/Machine.java @@ -11,12 +11,7 @@ import muramasa.antimatter.client.dynamic.IDynamicModelProvider; import muramasa.antimatter.cover.CoverFactory; import muramasa.antimatter.cover.ICover; -import muramasa.antimatter.gui.BarDir; -import muramasa.antimatter.gui.GuiData; -import muramasa.antimatter.gui.GuiInstance; -import muramasa.antimatter.gui.MenuHandler; -import muramasa.antimatter.gui.SlotData; -import muramasa.antimatter.gui.SlotType; +import muramasa.antimatter.gui.*; import muramasa.antimatter.gui.slot.ISlotProvider; import muramasa.antimatter.gui.widget.BackgroundWidget; import muramasa.antimatter.machine.*; diff --git a/common/src/main/java/muramasa/antimatter/machine/types/TankMachine.java b/common/src/main/java/muramasa/antimatter/machine/types/TankMachine.java index 1af52fee5..50501578b 100644 --- a/common/src/main/java/muramasa/antimatter/machine/types/TankMachine.java +++ b/common/src/main/java/muramasa/antimatter/machine/types/TankMachine.java @@ -11,15 +11,11 @@ import muramasa.antimatter.integration.jeirei.renderer.IInfoRenderer; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.tile.TileEntityTank; -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import java.util.function.Function; -import static muramasa.antimatter.machine.MachineFlag.COVERABLE; -import static muramasa.antimatter.machine.MachineFlag.FLUID; -import static muramasa.antimatter.machine.MachineFlag.ITEM; +import static muramasa.antimatter.machine.MachineFlag.*; public class TankMachine extends Machine { final Function capacityPerTier; diff --git a/common/src/main/java/muramasa/antimatter/material/MaterialItem.java b/common/src/main/java/muramasa/antimatter/material/MaterialItem.java index f2282cd0a..cd56f96d2 100644 --- a/common/src/main/java/muramasa/antimatter/material/MaterialItem.java +++ b/common/src/main/java/muramasa/antimatter/material/MaterialItem.java @@ -29,25 +29,23 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.*; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.AbstractCauldronBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.LayeredCauldronBlock; +import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.Property; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; -import java.util.Map; -import static muramasa.antimatter.data.AntimatterMaterialTypes.CRUSHED_PURIFIED; -import static muramasa.antimatter.data.AntimatterMaterialTypes.DUST; -import static muramasa.antimatter.data.AntimatterMaterialTypes.DUST_TINY; +import static muramasa.antimatter.data.AntimatterMaterialTypes.*; public class MaterialItem extends ItemBasic implements ISharedAntimatterObject, IColorHandler, ITextureProvider, IModelProvider { diff --git a/common/src/main/java/muramasa/antimatter/material/MaterialType.java b/common/src/main/java/muramasa/antimatter/material/MaterialType.java index 365387e61..9630325bd 100644 --- a/common/src/main/java/muramasa/antimatter/material/MaterialType.java +++ b/common/src/main/java/muramasa/antimatter/material/MaterialType.java @@ -22,6 +22,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; + import java.util.Arrays; import java.util.List; import java.util.Map; diff --git a/common/src/main/java/muramasa/antimatter/material/MaterialTypeBlock.java b/common/src/main/java/muramasa/antimatter/material/MaterialTypeBlock.java index da50cf0a1..dec9c877a 100644 --- a/common/src/main/java/muramasa/antimatter/material/MaterialTypeBlock.java +++ b/common/src/main/java/muramasa/antimatter/material/MaterialTypeBlock.java @@ -1,6 +1,5 @@ package muramasa.antimatter.material; -import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; import muramasa.antimatter.AntimatterAPI; diff --git a/common/src/main/java/muramasa/antimatter/material/tags/DoubleMaterialTag.java b/common/src/main/java/muramasa/antimatter/material/tags/DoubleMaterialTag.java index f84692514..f9b66b527 100644 --- a/common/src/main/java/muramasa/antimatter/material/tags/DoubleMaterialTag.java +++ b/common/src/main/java/muramasa/antimatter/material/tags/DoubleMaterialTag.java @@ -1,7 +1,6 @@ package muramasa.antimatter.material.tags; import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.tags.TypeMaterialTag; public class DoubleMaterialTag extends TypeMaterialTag { diff --git a/common/src/main/java/muramasa/antimatter/mixin/GrindstoneContainerMixin.java b/common/src/main/java/muramasa/antimatter/mixin/GrindstoneContainerMixin.java index fa7120412..5a201bb06 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/GrindstoneContainerMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/GrindstoneContainerMixin.java @@ -1,12 +1,12 @@ package muramasa.antimatter.mixin; -import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; import net.minecraft.world.Container; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.GrindstoneMenu; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -14,8 +14,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import javax.annotation.Nullable; - @Mixin(GrindstoneMenu.class) public abstract class GrindstoneContainerMixin extends AbstractContainerMenu { @Final diff --git a/common/src/main/java/muramasa/antimatter/mixin/HopperBlockMixin.java b/common/src/main/java/muramasa/antimatter/mixin/HopperBlockMixin.java index bc0a13cc2..751014f97 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/HopperBlockMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/HopperBlockMixin.java @@ -7,7 +7,6 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.HopperBlock; diff --git a/common/src/main/java/muramasa/antimatter/mixin/IceBlockMixin.java b/common/src/main/java/muramasa/antimatter/mixin/IceBlockMixin.java index 8a75ae9d5..9d3d396d3 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/IceBlockMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/IceBlockMixin.java @@ -10,13 +10,12 @@ import net.minecraft.world.level.block.IceBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import javax.annotation.Nullable; - import static muramasa.antimatter.data.AntimatterDefaultTools.SAW; @Mixin(IceBlock.class) diff --git a/common/src/main/java/muramasa/antimatter/mixin/ItemStackMixin.java b/common/src/main/java/muramasa/antimatter/mixin/ItemStackMixin.java index 11e4ddfdf..ee1ce7586 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/ItemStackMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/ItemStackMixin.java @@ -6,12 +6,9 @@ import muramasa.antimatter.tool.IAntimatterTool; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.stats.Stats; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; diff --git a/common/src/main/java/muramasa/antimatter/mixin/RepairItemRecipeMixin.java b/common/src/main/java/muramasa/antimatter/mixin/RepairItemRecipeMixin.java index 9cce21e74..2bfad399e 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/RepairItemRecipeMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/RepairItemRecipeMixin.java @@ -2,7 +2,6 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.core.Registry; diff --git a/common/src/main/java/muramasa/antimatter/mixin/SimpleReloadInstanceMixin.java b/common/src/main/java/muramasa/antimatter/mixin/SimpleReloadInstanceMixin.java index 5c333a9b7..b73a94caa 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/SimpleReloadInstanceMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/SimpleReloadInstanceMixin.java @@ -1,19 +1,12 @@ package muramasa.antimatter.mixin; import muramasa.antimatter.datagen.AntimatterDynamics; -import net.minecraft.commands.Commands; import net.minecraft.core.RegistryAccess; import net.minecraft.server.ReloadableServerResources; -import org.spongepowered.asm.mixin.Debug; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import net.minecraft.server.packs.resources.ResourceManager; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; @Mixin(ReloadableServerResources.class) public class SimpleReloadInstanceMixin { diff --git a/common/src/main/java/muramasa/antimatter/mixin/TagLoaderMixin.java b/common/src/main/java/muramasa/antimatter/mixin/TagLoaderMixin.java index 9267171fb..cdf5bac17 100644 --- a/common/src/main/java/muramasa/antimatter/mixin/TagLoaderMixin.java +++ b/common/src/main/java/muramasa/antimatter/mixin/TagLoaderMixin.java @@ -17,8 +17,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/common/src/main/java/muramasa/antimatter/network/packets/CoverGuiEventPacket.java b/common/src/main/java/muramasa/antimatter/network/packets/CoverGuiEventPacket.java index aadc928a9..3645fb7c8 100644 --- a/common/src/main/java/muramasa/antimatter/network/packets/CoverGuiEventPacket.java +++ b/common/src/main/java/muramasa/antimatter/network/packets/CoverGuiEventPacket.java @@ -11,7 +11,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.block.entity.BlockEntity; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/network/packets/ServerboundGuiSyncPacket.java b/common/src/main/java/muramasa/antimatter/network/packets/ServerboundGuiSyncPacket.java index 75093173a..418846e38 100644 --- a/common/src/main/java/muramasa/antimatter/network/packets/ServerboundGuiSyncPacket.java +++ b/common/src/main/java/muramasa/antimatter/network/packets/ServerboundGuiSyncPacket.java @@ -6,12 +6,9 @@ import muramasa.antimatter.gui.GuiInstance; import muramasa.antimatter.gui.ICanSyncData; import muramasa.antimatter.gui.container.AntimatterContainer; -import muramasa.antimatter.gui.container.IAntimatterContainer; import muramasa.antimatter.network.AntimatterNetwork; -import net.minecraft.client.Minecraft; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.AbstractContainerMenu; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/network/packets/TileGuiEventPacket.java b/common/src/main/java/muramasa/antimatter/network/packets/TileGuiEventPacket.java index fd7a523e6..492bcd068 100644 --- a/common/src/main/java/muramasa/antimatter/network/packets/TileGuiEventPacket.java +++ b/common/src/main/java/muramasa/antimatter/network/packets/TileGuiEventPacket.java @@ -2,22 +2,15 @@ import com.teamresourceful.resourcefullib.common.networking.base.PacketContext; import com.teamresourceful.resourcefullib.common.networking.base.PacketHandler; -import muramasa.antimatter.Antimatter; -import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.capability.IGuiHandler; import muramasa.antimatter.gui.container.IAntimatterContainer; import muramasa.antimatter.gui.event.IGuiEvent; import muramasa.antimatter.network.AntimatterNetwork; -import muramasa.antimatter.util.AntimatterCapUtils; import muramasa.antimatter.util.Utils; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.block.entity.BlockEntity; -import java.util.Optional; - public class TileGuiEventPacket extends AbstractGuiEventPacket { public static final Handler HANDLER = new Handler(); diff --git a/common/src/main/java/muramasa/antimatter/ore/BlockMaterialStone.java b/common/src/main/java/muramasa/antimatter/ore/BlockMaterialStone.java index 2829fa238..a65007ac0 100644 --- a/common/src/main/java/muramasa/antimatter/ore/BlockMaterialStone.java +++ b/common/src/main/java/muramasa/antimatter/ore/BlockMaterialStone.java @@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public abstract class BlockMaterialStone extends BlockBasic implements IAntimatterObject, IItemBlockProvider, IColorHandler, IModelProvider { diff --git a/common/src/main/java/muramasa/antimatter/ore/BlockOre.java b/common/src/main/java/muramasa/antimatter/ore/BlockOre.java index c65cdfba2..b18211e75 100644 --- a/common/src/main/java/muramasa/antimatter/ore/BlockOre.java +++ b/common/src/main/java/muramasa/antimatter/ore/BlockOre.java @@ -30,11 +30,9 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.ticks.ScheduledTick; import org.apache.commons.lang3.ArrayUtils; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Random; @@ -51,7 +49,7 @@ public BlockOre(String domain, Material material, StoneType stoneType, MaterialT this(domain, material, stoneType, oreType, getOreProperties(Properties.of(stoneType.getBlockMaterial()), stoneType)); } - @Nonnull + @NotNull @Override public String getDescriptionId() { return getId(); diff --git a/common/src/main/java/muramasa/antimatter/ore/BlockOreStone.java b/common/src/main/java/muramasa/antimatter/ore/BlockOreStone.java index 3e772d8cd..767ead30d 100644 --- a/common/src/main/java/muramasa/antimatter/ore/BlockOreStone.java +++ b/common/src/main/java/muramasa/antimatter/ore/BlockOreStone.java @@ -4,7 +4,6 @@ import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.material.Material; import muramasa.antimatter.registration.ISharedAntimatterObject; -import net.minecraft.world.level.block.Blocks; public class BlockOreStone extends BlockMaterialType implements ISharedAntimatterObject { diff --git a/common/src/main/java/muramasa/antimatter/pipe/BlockCable.java b/common/src/main/java/muramasa/antimatter/pipe/BlockCable.java index 046e53b45..2ee1f6310 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/BlockCable.java +++ b/common/src/main/java/muramasa/antimatter/pipe/BlockCable.java @@ -23,12 +23,11 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import tesseract.Tesseract; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractGraphWrappers; import tesseract.api.ITickingController; import tesseract.api.gt.GTController; -import javax.annotation.Nullable; import java.util.List; public class BlockCable> extends BlockPipe { diff --git a/common/src/main/java/muramasa/antimatter/pipe/BlockFluidPipe.java b/common/src/main/java/muramasa/antimatter/pipe/BlockFluidPipe.java index 04f8056ba..6c6b88ff2 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/BlockFluidPipe.java +++ b/common/src/main/java/muramasa/antimatter/pipe/BlockFluidPipe.java @@ -3,12 +3,9 @@ import muramasa.antimatter.pipe.types.FluidPipe; import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; import net.minecraft.ChatFormatting; -import net.minecraft.client.gui.screens.Screen; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.util.Mth; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; @@ -17,12 +14,10 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import tesseract.FluidPlatformUtils; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractGraphWrappers; import tesseract.api.ITickingController; -import tesseract.api.fluid.PipeFluidHolder; -import javax.annotation.Nullable; import java.util.List; public class BlockFluidPipe> extends BlockPipe { diff --git a/common/src/main/java/muramasa/antimatter/pipe/BlockHeatPipe.java b/common/src/main/java/muramasa/antimatter/pipe/BlockHeatPipe.java index 8d946a4d2..77fd4aede 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/BlockHeatPipe.java +++ b/common/src/main/java/muramasa/antimatter/pipe/BlockHeatPipe.java @@ -10,8 +10,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import javax.annotation.ParametersAreNonnullByDefault; - public class BlockHeatPipe> extends BlockPipe { public BlockHeatPipe(T type, PipeSize size) { @@ -19,7 +17,7 @@ public BlockHeatPipe(T type, PipeSize size) { } @Override - @ParametersAreNonnullByDefault + //@ParametersAreNotNullByDefault public void entityInside(BlockState state, Level worldIn, BlockPos pos, Entity entityIn) { super.entityInside(state, worldIn, pos, entityIn); if (!(entityIn instanceof LivingEntity)) return; diff --git a/common/src/main/java/muramasa/antimatter/pipe/BlockPipe.java b/common/src/main/java/muramasa/antimatter/pipe/BlockPipe.java index 1d062d05c..4c60c5ca5 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/BlockPipe.java +++ b/common/src/main/java/muramasa/antimatter/pipe/BlockPipe.java @@ -22,8 +22,6 @@ import muramasa.antimatter.registration.ISharedAntimatterObject; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.tile.TileEntityTickable; -import muramasa.antimatter.tile.pipe.TileEntityCable; -import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; import muramasa.antimatter.tile.pipe.TileEntityPipe; import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.util.AntimatterCapUtils; @@ -36,8 +34,6 @@ import net.minecraft.world.Containers; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -61,11 +57,9 @@ import net.minecraft.world.phys.shapes.EntityCollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import tesseract.TesseractGraphWrappers; -import tesseract.api.gt.GTController; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import static com.google.common.collect.ImmutableMap.of; @@ -241,7 +235,7 @@ public BlockState updateShape(BlockState stateIn, Direction facing, BlockState f return stateIn; } - @Nonnull + @NotNull @Override public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { TileEntityPipe tile = (TileEntityPipe) world.getBlockEntity(pos); diff --git a/common/src/main/java/muramasa/antimatter/pipe/FluidPipeTicker.java b/common/src/main/java/muramasa/antimatter/pipe/FluidPipeTicker.java index 7cdf82459..9b0dc5fa6 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/FluidPipeTicker.java +++ b/common/src/main/java/muramasa/antimatter/pipe/FluidPipeTicker.java @@ -3,7 +3,6 @@ import muramasa.antimatter.Antimatter; import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; import net.minecraft.server.MinecraftServer; -import net.minecraft.world.level.Level; import java.util.ArrayList; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/pipe/PipeItemBlock.java b/common/src/main/java/muramasa/antimatter/pipe/PipeItemBlock.java index dcea3dd81..59706a285 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/PipeItemBlock.java +++ b/common/src/main/java/muramasa/antimatter/pipe/PipeItemBlock.java @@ -3,8 +3,7 @@ import muramasa.antimatter.block.AntimatterItemBlock; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.context.BlockPlaceContext; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; public class PipeItemBlock extends AntimatterItemBlock { @@ -19,7 +18,7 @@ public BlockPipe getPipe() { return pipe; } - @Nonnull + @NotNull @Override public InteractionResult place(BlockPlaceContext context) { InteractionResult action = super.place(context); diff --git a/common/src/main/java/muramasa/antimatter/pipe/types/HeatPipe.java b/common/src/main/java/muramasa/antimatter/pipe/types/HeatPipe.java index c62548e35..ae1a745cd 100644 --- a/common/src/main/java/muramasa/antimatter/pipe/types/HeatPipe.java +++ b/common/src/main/java/muramasa/antimatter/pipe/types/HeatPipe.java @@ -1,11 +1,8 @@ package muramasa.antimatter.pipe.types; import muramasa.antimatter.material.Material; -import muramasa.antimatter.pipe.BlockCable; import muramasa.antimatter.pipe.BlockHeatPipe; -import muramasa.antimatter.tile.TileEntityBase; import muramasa.antimatter.tile.pipe.TileEntityHeatPipe; -import muramasa.antimatter.tile.pipe.TileEntityPipe; import net.minecraft.world.level.block.Block; import java.util.Set; diff --git a/common/src/main/java/muramasa/antimatter/proxy/ClientHandler.java b/common/src/main/java/muramasa/antimatter/proxy/ClientHandler.java index 997273ce9..bb9f0236e 100644 --- a/common/src/main/java/muramasa/antimatter/proxy/ClientHandler.java +++ b/common/src/main/java/muramasa/antimatter/proxy/ClientHandler.java @@ -4,15 +4,14 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.block.BlockFakeTile; -import muramasa.antimatter.block.BlockSurfaceRock; -import muramasa.antimatter.data.AntimatterMaterialTypes; -import muramasa.antimatter.Data; import muramasa.antimatter.block.BlockStorage; +import muramasa.antimatter.block.BlockSurfaceRock; import muramasa.antimatter.client.AntimatterTextureStitcher; import muramasa.antimatter.client.ModelUtils; import muramasa.antimatter.client.tesr.MachineTESR; import muramasa.antimatter.cover.CoverFactory; import muramasa.antimatter.cover.ICover; +import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.gui.MenuHandler; import muramasa.antimatter.machine.BlockMachine; diff --git a/common/src/main/java/muramasa/antimatter/recipe/IRecipe.java b/common/src/main/java/muramasa/antimatter/recipe/IRecipe.java index 8e249bace..e0d508795 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/IRecipe.java +++ b/common/src/main/java/muramasa/antimatter/recipe/IRecipe.java @@ -8,9 +8,9 @@ import net.minecraft.world.Container; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; import java.util.Set; @@ -61,7 +61,7 @@ public interface IRecipe extends net.minecraft.world.item.crafting.Recipe getInputFluids(); @Nullable diff --git a/common/src/main/java/muramasa/antimatter/recipe/Recipe.java b/common/src/main/java/muramasa/antimatter/recipe/Recipe.java index 4f68c6d15..4bcc0c4ee 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/Recipe.java +++ b/common/src/main/java/muramasa/antimatter/recipe/Recipe.java @@ -17,10 +17,10 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Map; @@ -29,9 +29,9 @@ public class Recipe implements IRecipe { private final ItemStack[] itemsOutput; - @Nonnull + @NotNull private final List itemsInput; - @Nonnull + @NotNull private final List fluidsInput; private final FluidHolder[] fluidsOutput; private final int duration; @@ -55,7 +55,7 @@ public static void init() { public static final RecipeType RECIPE_TYPE = RecipeType.register("antimatter_machine"); - public Recipe(@Nonnull List stacksInput, ItemStack[] stacksOutput, @Nonnull List fluidsInput, FluidHolder[] fluidsOutput, int duration, long power, int special, int amps) { + public Recipe(@NotNull List stacksInput, ItemStack[] stacksOutput, @NotNull List fluidsInput, FluidHolder[] fluidsOutput, int duration, long power, int special, int amps) { this.itemsInput = ImmutableList.copyOf(stacksInput); this.itemsOutput = stacksOutput; this.duration = duration; @@ -143,12 +143,12 @@ public void sortInputItems() { }); } - @Nonnull + @NotNull public List getInputItems() { return hasInputItems() ? itemsInput : Collections.emptyList(); } - @Nonnull + @NotNull public List getCastedInputs() { return hasInputItems() ? itemsInput.stream().filter(t -> t instanceof RecipeIngredient).map(t -> (RecipeIngredient)t).collect(Collectors.toList()) : Collections.emptyList(); } @@ -207,7 +207,7 @@ public boolean hasSpecialIngredients() { return false; } - @Nonnull + @NotNull public List getInputFluids() { return fluidsInput; } @@ -353,7 +353,7 @@ public net.minecraft.world.item.crafting.RecipeSerializer getSerializer() { return AntimatterRecipeSerializer.INSTANCE; } - @Nonnull + @NotNull @Override public RecipeType getType() { return Recipe.RECIPE_TYPE; diff --git a/common/src/main/java/muramasa/antimatter/recipe/RecipeBuilders.java b/common/src/main/java/muramasa/antimatter/recipe/RecipeBuilders.java index 73dd9fe5c..7f6da720f 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/RecipeBuilders.java +++ b/common/src/main/java/muramasa/antimatter/recipe/RecipeBuilders.java @@ -3,30 +3,18 @@ import com.google.common.collect.ImmutableMap; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; -import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialItem; -import muramasa.antimatter.material.MaterialTypeItem; -import muramasa.antimatter.pipe.PipeItemBlock; -import muramasa.antimatter.pipe.PipeSize; -import muramasa.antimatter.pipe.types.FluidPipe; -import muramasa.antimatter.pipe.types.ItemPipe; -import muramasa.antimatter.pipe.types.PipeType; import muramasa.antimatter.recipe.ingredient.PropertyIngredient; import muramasa.antimatter.recipe.material.MaterialRecipe; -import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.tool.IAntimatterTool; -import muramasa.antimatter.tool.armor.AntimatterArmorType; import muramasa.antimatter.util.TagUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.DyeItem; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.Arrays; -import java.util.Locale; import java.util.Map; import java.util.Optional; @@ -55,7 +43,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) { } @Override - public Map getFromResult(@Nonnull ItemStack stack) { + public Map getFromResult(@NotNull ItemStack stack) { return ImmutableMap.of(); } }); @@ -71,7 +59,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) { } @Override - public Map getFromResult(@Nonnull ItemStack stack) { + public Map getFromResult(@NotNull ItemStack stack) { CompoundTag nbt = stack.getTag().getCompound(Ref.TAG_TOOL_DATA); int secondary = nbt.getInt(Ref.KEY_TOOL_DATA_SECONDARY_COLOUR); Optional color = Arrays.stream(DyeColor.values()).filter(t -> t.getMaterialColor().col == secondary).findFirst(); diff --git a/common/src/main/java/muramasa/antimatter/recipe/RecipeUtil.java b/common/src/main/java/muramasa/antimatter/recipe/RecipeUtil.java index cff5e3fc1..c787935eb 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/RecipeUtil.java +++ b/common/src/main/java/muramasa/antimatter/recipe/RecipeUtil.java @@ -3,10 +3,7 @@ import com.google.gson.JsonObject; import dev.architectury.injectables.annotations.ExpectPlatform; import earth.terrarium.botarium.common.fluid.base.FluidHolder; -import io.github.fabricators_of_create.porting_lib.crafting.CraftingHelper; import muramasa.antimatter.datagen.builder.AntimatterShapedRecipeBuilder; -import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.item.ItemStack; diff --git a/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapedRecipe.java b/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapedRecipe.java index 7eb8d3826..55f8b01e2 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapedRecipe.java +++ b/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapedRecipe.java @@ -4,8 +4,6 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.item.IContainerItem; -import muramasa.antimatter.recipe.material.MaterialRecipe; -import muramasa.antimatter.recipe.material.MaterialSerializer; import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.core.NonNullList; import net.minecraft.network.FriendlyByteBuf; @@ -19,7 +17,6 @@ import net.minecraft.world.level.Level; import org.jetbrains.annotations.NotNull; -import java.util.Iterator; import java.util.Map; public class ContainerItemShapedRecipe extends ShapedRecipe { diff --git a/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapelessRecipe.java b/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapelessRecipe.java index 6b354a9ff..5d81083ab 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapelessRecipe.java +++ b/common/src/main/java/muramasa/antimatter/recipe/container/ContainerItemShapelessRecipe.java @@ -19,8 +19,6 @@ import net.minecraft.world.item.crafting.ShapelessRecipe; import org.jetbrains.annotations.NotNull; -import java.util.Iterator; - public class ContainerItemShapelessRecipe extends ShapelessRecipe { public static final Serializer INSTANCE = new Serializer(); diff --git a/common/src/main/java/muramasa/antimatter/recipe/ingredient/MapTagIngredient.java b/common/src/main/java/muramasa/antimatter/recipe/ingredient/MapTagIngredient.java index dd2a4ad5b..ed188cd44 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/ingredient/MapTagIngredient.java +++ b/common/src/main/java/muramasa/antimatter/recipe/ingredient/MapTagIngredient.java @@ -1,15 +1,10 @@ package muramasa.antimatter.recipe.ingredient; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.material.Fluid; -import java.util.Arrays; -import java.util.Optional; -import java.util.Set; public class MapTagIngredient extends AbstractMapIngredient { diff --git a/common/src/main/java/muramasa/antimatter/recipe/ingredient/PropertyIngredient.java b/common/src/main/java/muramasa/antimatter/recipe/ingredient/PropertyIngredient.java index 11eabff12..d7bbb09f9 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/ingredient/PropertyIngredient.java +++ b/common/src/main/java/muramasa/antimatter/recipe/ingredient/PropertyIngredient.java @@ -24,14 +24,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.ItemLike; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -42,7 +38,7 @@ public class PropertyIngredient extends Ingredient { public interface Getter { @Nullable - Object get(@Nonnull ItemStack item); + Object get(@NotNull ItemStack item); } private final Set> type; diff --git a/common/src/main/java/muramasa/antimatter/recipe/ingredient/RecipeIngredient.java b/common/src/main/java/muramasa/antimatter/recipe/ingredient/RecipeIngredient.java index 8063b2f8f..57f6609cb 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/ingredient/RecipeIngredient.java +++ b/common/src/main/java/muramasa/antimatter/recipe/ingredient/RecipeIngredient.java @@ -1,10 +1,6 @@ package muramasa.antimatter.recipe.ingredient; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.JsonSyntaxException; +import com.google.gson.*; import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.TagUtils; import net.minecraft.core.Registry; @@ -19,14 +15,9 @@ import net.minecraft.world.level.ItemLike; import org.jetbrains.annotations.Nullable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; -import java.util.stream.StreamSupport; /** * Small wrapper, to avoid typing lazyvalue. diff --git a/common/src/main/java/muramasa/antimatter/recipe/ingredient/SpecialIngredientWrapper.java b/common/src/main/java/muramasa/antimatter/recipe/ingredient/SpecialIngredientWrapper.java index 2a7a6b572..022f8f7b3 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/ingredient/SpecialIngredientWrapper.java +++ b/common/src/main/java/muramasa/antimatter/recipe/ingredient/SpecialIngredientWrapper.java @@ -2,8 +2,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; public class SpecialIngredientWrapper extends AbstractMapIngredient { @@ -14,7 +13,7 @@ public SpecialIngredientWrapper(Ingredient source) { this.source = source; } - public boolean isItemValid(@Nonnull ItemStack stack) { + public boolean isItemValid(@NotNull ItemStack stack) { return source.test(stack); } diff --git a/common/src/main/java/muramasa/antimatter/recipe/ingredient/test/NameIngredient.java b/common/src/main/java/muramasa/antimatter/recipe/ingredient/test/NameIngredient.java index 41c6c0ed2..3d0f1e077 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/ingredient/test/NameIngredient.java +++ b/common/src/main/java/muramasa/antimatter/recipe/ingredient/test/NameIngredient.java @@ -3,8 +3,8 @@ import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Objects; import java.util.stream.Stream; diff --git a/common/src/main/java/muramasa/antimatter/recipe/map/IRecipeMap.java b/common/src/main/java/muramasa/antimatter/recipe/map/IRecipeMap.java index 3fb54c28b..536b76176 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/map/IRecipeMap.java +++ b/common/src/main/java/muramasa/antimatter/recipe/map/IRecipeMap.java @@ -20,10 +20,10 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeManager; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.api.item.ExtendedItemContainer; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collection; import java.util.Optional; import java.util.function.Predicate; @@ -32,7 +32,7 @@ public interface IRecipeMap extends ISharedAntimatterObject { ItemStack[] EMPTY_ITEM = new ItemStack[0]; FluidHolder[] EMPTY_FLUID = new FluidHolder[0]; - IRecipe find(@Nonnull ItemStack[] items, @Nonnull FluidHolder[] fluids, Tier tier, @Nonnull Predicate canHandle); + IRecipe find(@NotNull ItemStack[] items, @NotNull FluidHolder[] fluids, Tier tier, @NotNull Predicate canHandle); default IRecipe findByID(ResourceLocation id){ return getRecipes(false).stream().filter(r -> r.getId().equals(id)).findFirst().orElse(null); @@ -59,8 +59,8 @@ default > IRecipe find(Holder> itemHandler, - @Nonnull Optional> fluidHandler, Tier tier, Predicate validator) { + default IRecipe find(@NotNull Optional> itemHandler, + @NotNull Optional> fluidHandler, Tier tier, Predicate validator) { return find(itemHandler.map(MachineItemHandler::getInputs).orElse(EMPTY_ITEM), fluidHandler.map(MachineFluidHandler::getInputs).orElse(EMPTY_FLUID), tier, validator); } @@ -73,7 +73,7 @@ default Proxy getProxy(){ return null; } - @Nonnull + @NotNull @Environment(EnvType.CLIENT) default IRecipeInfoRenderer getInfoRenderer() { return InfoRenderers.DEFAULT_RENDERER; diff --git a/common/src/main/java/muramasa/antimatter/recipe/map/RecipeBuilder.java b/common/src/main/java/muramasa/antimatter/recipe/map/RecipeBuilder.java index 99ec4def9..e54ff24d8 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/map/RecipeBuilder.java +++ b/common/src/main/java/muramasa/antimatter/recipe/map/RecipeBuilder.java @@ -8,7 +8,6 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import muramasa.antimatter.Ref; import muramasa.antimatter.datagen.AntimatterDynamics; -import muramasa.antimatter.datagen.builder.AntimatterCookingRecipeBuilder; import muramasa.antimatter.recipe.IRecipe; import muramasa.antimatter.recipe.Recipe; import muramasa.antimatter.recipe.RecipeTag; @@ -31,11 +30,7 @@ import net.minecraft.world.level.ItemLike; import org.jetbrains.annotations.Nullable; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; public class RecipeBuilder { diff --git a/common/src/main/java/muramasa/antimatter/recipe/map/RecipeMap.java b/common/src/main/java/muramasa/antimatter/recipe/map/RecipeMap.java index 20550cf53..cc29604dc 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/map/RecipeMap.java +++ b/common/src/main/java/muramasa/antimatter/recipe/map/RecipeMap.java @@ -26,9 +26,9 @@ import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeManager; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -117,7 +117,7 @@ public CustomRecipeSerializer getRecipeSerializer() { return recipeSerializer; } - @Nonnull + @NotNull @Environment(EnvType.CLIENT) public IRecipeInfoRenderer getInfoRenderer() { if (infoRenderer == null) @@ -338,8 +338,8 @@ protected void buildFromItemStacks(List> list, ItemS * @param index where in the ingredients list we are. * @param count how many added already. */ - boolean recurseItemTreeAdd(@Nonnull IRecipe recipe, @Nonnull List> ingredients, - @Nonnull Branch map, int index, int count) { + boolean recurseItemTreeAdd(@NotNull IRecipe recipe, @NotNull List> ingredients, + @NotNull Branch map, int index, int count) { if (count >= ingredients.size()) return true; if (index >= ingredients.size()) { @@ -405,8 +405,8 @@ boolean recurseItemTreeAdd(@Nonnull IRecipe recipe, @Nonnull List> items, @Nonnull Branch map, - @Nonnull Predicate canHandle) { + IRecipe recurseItemTreeFind(@NotNull List> items, @NotNull Branch map, + @NotNull Predicate canHandle) { // Try each ingredient as a starting point, adding it to the skiplist. for (int i = 0; i < items.size(); i++) { IRecipe r = recurseItemTreeFind(items, map, canHandle, i, 0, (1L << i)); @@ -428,8 +428,8 @@ IRecipe recurseItemTreeFind(@Nonnull List> items, @N * recursion. * @return a recipe */ - IRecipe recurseItemTreeFind(@Nonnull List> items, @Nonnull Branch map, - @Nonnull Predicate canHandle, int index, int count, long skip) { + IRecipe recurseItemTreeFind(@NotNull List> items, @NotNull Branch map, + @NotNull Predicate canHandle, int index, int count, long skip) { if (count == items.size()) return null; List wr = items.get(index); @@ -463,7 +463,7 @@ IRecipe recurseItemTreeFind(@Nonnull List> items, @N return null; } - private IRecipe callback(@Nonnull List> items, @Nonnull Branch map, + private IRecipe callback(@NotNull List> items, @NotNull Branch map, Predicate canHandle, int index, int count, long skip) { // We loop around items.size() if we reach the end. int counter = (index + 1) % items.size(); @@ -482,7 +482,7 @@ private IRecipe callback(@Nonnull List> items, @Nonn @Nullable @Override - public IRecipe find(@Nonnull ItemStack[] items, @Nonnull FluidHolder[] fluids, Tier tier, @Nonnull Predicate canHandle) { + public IRecipe find(@NotNull ItemStack[] items, @NotNull FluidHolder[] fluids, Tier tier, @NotNull Predicate canHandle) { // First, check if items and fluids are valid. if (items.length + fluids.length > Long.SIZE) { Utils.onInvalidData( diff --git a/common/src/main/java/muramasa/antimatter/recipe/material/MaterialRecipe.java b/common/src/main/java/muramasa/antimatter/recipe/material/MaterialRecipe.java index df63fdf16..0870327a2 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/material/MaterialRecipe.java +++ b/common/src/main/java/muramasa/antimatter/recipe/material/MaterialRecipe.java @@ -13,11 +13,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; import java.util.Objects; @@ -49,7 +48,7 @@ public static Provider registerProvider(String loc, String domain, Provider obj) public interface ItemBuilder { ItemStack build(@Nullable CraftingContainer inv, Result mats); - Map getFromResult(@Nonnull ItemStack stack); + Map getFromResult(@NotNull ItemStack stack); } public final Map> materialSlots; diff --git a/common/src/main/java/muramasa/antimatter/recipe/material/MaterialSerializer.java b/common/src/main/java/muramasa/antimatter/recipe/material/MaterialSerializer.java index 541b02599..b65df169f 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/material/MaterialSerializer.java +++ b/common/src/main/java/muramasa/antimatter/recipe/material/MaterialSerializer.java @@ -19,8 +19,8 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.ShapedRecipe; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Map; import java.util.Set; diff --git a/common/src/main/java/muramasa/antimatter/recipe/serializer/AntimatterRecipeSerializer.java b/common/src/main/java/muramasa/antimatter/recipe/serializer/AntimatterRecipeSerializer.java index e081cf7df..e0ea0b1f8 100644 --- a/common/src/main/java/muramasa/antimatter/recipe/serializer/AntimatterRecipeSerializer.java +++ b/common/src/main/java/muramasa/antimatter/recipe/serializer/AntimatterRecipeSerializer.java @@ -24,10 +24,10 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.material.Fluid; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Set; diff --git a/common/src/main/java/muramasa/antimatter/registration/IColorHandler.java b/common/src/main/java/muramasa/antimatter/registration/IColorHandler.java index 4e22517c9..b96c4f513 100644 --- a/common/src/main/java/muramasa/antimatter/registration/IColorHandler.java +++ b/common/src/main/java/muramasa/antimatter/registration/IColorHandler.java @@ -5,8 +5,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public interface IColorHandler { diff --git a/common/src/main/java/muramasa/antimatter/structure/FakeTileElement.java b/common/src/main/java/muramasa/antimatter/structure/FakeTileElement.java index 8d608ad5f..61b1c9c3e 100644 --- a/common/src/main/java/muramasa/antimatter/structure/FakeTileElement.java +++ b/common/src/main/java/muramasa/antimatter/structure/FakeTileElement.java @@ -4,7 +4,6 @@ import muramasa.antimatter.cover.CoverFactory; import muramasa.antimatter.tile.TileEntityFakeBlock; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; -import muramasa.antimatter.util.int3; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; @@ -15,7 +14,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import java.util.Arrays; import java.util.EnumMap; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/structure/Structure.java b/common/src/main/java/muramasa/antimatter/structure/Structure.java index 45613472e..7e73dcd82 100644 --- a/common/src/main/java/muramasa/antimatter/structure/Structure.java +++ b/common/src/main/java/muramasa/antimatter/structure/Structure.java @@ -3,15 +3,10 @@ import com.google.common.collect.ImmutableMap; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import it.unimi.dsi.fastutil.Pair; -import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; import muramasa.antimatter.util.int2; import muramasa.antimatter.util.int3; -import net.minecraft.core.BlockPos; -import javax.annotation.Nonnull; -import java.util.Collections; -import java.util.List; import java.util.Map; import java.util.function.BiFunction; @@ -62,11 +57,11 @@ public boolean check(T tile){ return i == successful; } - /*public abstract StructureResult evaluate(@Nonnull TileEntityBasicMultiMachine tile); + /*public abstract StructureResult evaluate(@NotNull TileEntityBasicMultiMachine tile); public abstract LongList allPositions(TileEntityBasicMultiMachine tile);*/ - /*public boolean evaluatePosition(@Nonnull StructureResult res, @Nonnull TileEntityBasicMultiMachine tile, @Nonnull BlockPos pos) { + /*public boolean evaluatePosition(@NotNull StructureResult res, @NotNull TileEntityBasicMultiMachine tile, @NotNull BlockPos pos) { StructureElement el = res.get(pos); if (el != null) { return el.evaluate(tile, new int3(pos.getX(), pos.getY(), pos.getZ()), res); @@ -78,7 +73,7 @@ public interface StructurePartCheckCallback structureDefinition, T tile, String part, int i, int3 newOffset); } - /*public Iterator forAllElements(@Nonnull BlockPos source, @Nonnull Direction facing, @Nullable Direction hFacing) { + /*public Iterator forAllElements(@NotNull BlockPos source, @NotNull Direction facing, @Nullable Direction hFacing) { return new Iterator() { final int3 corner = hFacing == null ? new int3(source, facing).left(size().getX() / 2).back(offset().x).up(offset().y) : new int3(source, facing, hFacing).left(size().getX() / 2).back(offset().x).up(offset().y); final int3 working = new int3(facing, hFacing); diff --git a/common/src/main/java/muramasa/antimatter/structure/StructureBuilder.java b/common/src/main/java/muramasa/antimatter/structure/StructureBuilder.java index 05dfe0d0c..200754ead 100644 --- a/common/src/main/java/muramasa/antimatter/structure/StructureBuilder.java +++ b/common/src/main/java/muramasa/antimatter/structure/StructureBuilder.java @@ -9,7 +9,6 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectArrayList; -import muramasa.antimatter.Antimatter; import muramasa.antimatter.Ref; import muramasa.antimatter.machine.types.HatchMachine; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; @@ -19,9 +18,7 @@ import net.minecraft.core.Direction; import net.minecraft.core.Registry; import net.minecraft.tags.TagKey; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; import java.util.*; import java.util.function.BiFunction; diff --git a/common/src/main/java/muramasa/antimatter/structure/StructureCache.java b/common/src/main/java/muramasa/antimatter/structure/StructureCache.java index 0b6a4c7f2..fbb8b13d8 100644 --- a/common/src/main/java/muramasa/antimatter/structure/StructureCache.java +++ b/common/src/main/java/muramasa/antimatter/structure/StructureCache.java @@ -1,12 +1,9 @@ package muramasa.antimatter.structure; import it.unimi.dsi.fastutil.longs.*; -import it.unimi.dsi.fastutil.objects.Object2BooleanMap; -import it.unimi.dsi.fastutil.objects.Object2BooleanOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import muramasa.antimatter.Antimatter; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.tile.TileEntityMachine; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; @@ -14,11 +11,10 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.entity.BlockEntity; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Collections; import java.util.Set; -import java.util.function.LongConsumer; /** * StructureCache represents an efficient cache of multiblock structures in Antimatter. It listens to block updates to send updates to controllers. diff --git a/common/src/main/java/muramasa/antimatter/structure/StructureHandle.java b/common/src/main/java/muramasa/antimatter/structure/StructureHandle.java index 391a65192..edae2c139 100644 --- a/common/src/main/java/muramasa/antimatter/structure/StructureHandle.java +++ b/common/src/main/java/muramasa/antimatter/structure/StructureHandle.java @@ -1,7 +1,6 @@ package muramasa.antimatter.structure; import muramasa.antimatter.Antimatter; -import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; import muramasa.antimatter.util.Dir; import muramasa.antimatter.util.int3; @@ -9,8 +8,8 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.function.Consumer; diff --git a/common/src/main/java/muramasa/antimatter/tile/TileEntityBase.java b/common/src/main/java/muramasa/antimatter/tile/TileEntityBase.java index 8534822e9..016c29ac3 100644 --- a/common/src/main/java/muramasa/antimatter/tile/TileEntityBase.java +++ b/common/src/main/java/muramasa/antimatter/tile/TileEntityBase.java @@ -10,9 +10,8 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; public abstract class TileEntityBase> extends BlockEntity { @@ -97,7 +96,7 @@ public interface BlockEntitySupplier { } //TODO: implications of this. - /*@Nonnull + /*@NotNull @Override public CompoundNBT getUpdateTag() { CompoundNBT tag = super.getUpdateTag(); diff --git a/common/src/main/java/muramasa/antimatter/tile/TileEntityFakeBlock.java b/common/src/main/java/muramasa/antimatter/tile/TileEntityFakeBlock.java index e3fff5dc9..ea8a0251d 100644 --- a/common/src/main/java/muramasa/antimatter/tile/TileEntityFakeBlock.java +++ b/common/src/main/java/muramasa/antimatter/tile/TileEntityFakeBlock.java @@ -19,9 +19,9 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.EnumMap; import java.util.List; import java.util.Map; @@ -136,7 +136,7 @@ public void load(CompoundTag nbt) { } } - @Nonnull + @NotNull @Override public CompoundTag getUpdateTag() { CompoundTag nbt = new CompoundTag(); diff --git a/common/src/main/java/muramasa/antimatter/tile/TileEntityMachine.java b/common/src/main/java/muramasa/antimatter/tile/TileEntityMachine.java index 2bb3b7c2c..020e49d76 100644 --- a/common/src/main/java/muramasa/antimatter/tile/TileEntityMachine.java +++ b/common/src/main/java/muramasa/antimatter/tile/TileEntityMachine.java @@ -6,11 +6,7 @@ import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.AntimatterProperties; import muramasa.antimatter.Ref; -import muramasa.antimatter.capability.EnergyHandler; -import muramasa.antimatter.capability.Holder; -import muramasa.antimatter.capability.ICoverHandler; -import muramasa.antimatter.capability.IGuiHandler; -import muramasa.antimatter.capability.IMachineHandler; +import muramasa.antimatter.capability.*; import muramasa.antimatter.capability.machine.*; import muramasa.antimatter.client.SoundHelper; import muramasa.antimatter.client.dynamic.DynamicTexturer; @@ -67,12 +63,12 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.api.gt.IEnergyHandler; import tesseract.api.item.ExtendedItemContainer; import tesseract.api.rf.IRFNode; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.List; import java.util.Random; import java.util.Set; @@ -572,7 +568,7 @@ public InteractionResult onInteractClient(BlockState state, Level world, BlockPo return InteractionResult.PASS; } - @Nonnull + @NotNull @Override public Component getDisplayName() { return getMachineType().getDisplayName(getMachineTier()); @@ -580,7 +576,7 @@ public Component getDisplayName() { @Nullable @Override - public AbstractContainerMenu createMenu(int windowId, @Nonnull Inventory inv, @Nonnull Player player) { + public AbstractContainerMenu createMenu(int windowId, @NotNull Inventory inv, @NotNull Player player) { return getMachineType().has(GUI) ? getMachineType().getGui().getMenuHandler().menu(this, inv, windowId) : null; } @@ -606,7 +602,7 @@ public void invalidateCap(Class cap) { } } - public boolean blocksCapability(@Nonnull Class cap, Direction side) { + public boolean blocksCapability(@NotNull Class cap, Direction side) { return coverHandler.map(t -> t.blocksCapability(cap, side)).orElse(false); } @@ -667,7 +663,7 @@ public void saveAdditional(CompoundTag tag) { recipeHandler.ifPresent(e -> tag.put(Ref.KEY_MACHINE_RECIPE, e.serialize())); } - @Nonnull + @NotNull @Override public CompoundTag getUpdateTag() { CompoundTag tag = super.getUpdateTag(); diff --git a/common/src/main/java/muramasa/antimatter/tile/TileEntityStorage.java b/common/src/main/java/muramasa/antimatter/tile/TileEntityStorage.java index a29a0b023..a28afcffa 100644 --- a/common/src/main/java/muramasa/antimatter/tile/TileEntityStorage.java +++ b/common/src/main/java/muramasa/antimatter/tile/TileEntityStorage.java @@ -2,16 +2,12 @@ import it.unimi.dsi.fastutil.Pair; import muramasa.antimatter.capability.machine.MachineEnergyHandler; -import muramasa.antimatter.capability.machine.MachineItemHandler; -import muramasa.antimatter.machine.event.ContentEvent; import muramasa.antimatter.machine.event.IMachineEvent; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.util.Utils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; -import tesseract.api.gt.GTTransaction; -import tesseract.api.gt.IEnergyHandler; import tesseract.api.gt.IGTNode; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/tile/TileEntityTank.java b/common/src/main/java/muramasa/antimatter/tile/TileEntityTank.java index bd3751af6..32f6200d3 100644 --- a/common/src/main/java/muramasa/antimatter/tile/TileEntityTank.java +++ b/common/src/main/java/muramasa/antimatter/tile/TileEntityTank.java @@ -11,11 +11,10 @@ import net.minecraft.client.gui.Font; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; import tesseract.FluidPlatformUtils; import tesseract.TesseractGraphWrappers; -import javax.annotation.Nullable; - public class TileEntityTank> extends TileEntityMachine implements IInfoRenderer { public TileEntityTank(Machine type, BlockPos pos, BlockState state) { diff --git a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityBasicMultiMachine.java b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityBasicMultiMachine.java index 10dc850c4..76e07c58b 100644 --- a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityBasicMultiMachine.java +++ b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityBasicMultiMachine.java @@ -4,11 +4,9 @@ import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElement; import it.unimi.dsi.fastutil.Pair; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; @@ -25,7 +23,9 @@ import muramasa.antimatter.machine.event.MachineEvent; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.registration.IAntimatterObject; -import muramasa.antimatter.structure.*; +import muramasa.antimatter.structure.Structure; +import muramasa.antimatter.structure.StructureCache; +import muramasa.antimatter.structure.StructureHandle; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.tile.TileEntityMachine; import muramasa.antimatter.tool.AntimatterToolType; @@ -40,14 +40,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Optional; import java.util.Set; /** diff --git a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityHatch.java b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityHatch.java index 4429b120c..1a00c56d3 100644 --- a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityHatch.java +++ b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityHatch.java @@ -10,10 +10,8 @@ import muramasa.antimatter.machine.event.IMachineEvent; import muramasa.antimatter.machine.event.MachineEvent; import muramasa.antimatter.machine.types.HatchMachine; -import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.structure.IComponent; import muramasa.antimatter.tile.TileEntityMachine; -import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.Utils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -22,9 +20,7 @@ import net.minecraft.world.level.Explosion; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import tesseract.api.gt.GTTransaction; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityMultiMachine.java b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityMultiMachine.java index abbd0c40c..c9fe2276b 100644 --- a/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityMultiMachine.java +++ b/common/src/main/java/muramasa/antimatter/tile/multi/TileEntityMultiMachine.java @@ -22,15 +22,11 @@ import net.minecraft.world.level.block.state.BlockState; import tesseract.api.heat.IHeatHandler; -import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; -import static muramasa.antimatter.machine.MachineFlag.CELL; -import static muramasa.antimatter.machine.MachineFlag.ENERGY; -import static muramasa.antimatter.machine.MachineFlag.FLUID; -import static muramasa.antimatter.machine.MachineFlag.ITEM; +import static muramasa.antimatter.machine.MachineFlag.*; public class TileEntityMultiMachine> extends TileEntityBasicMultiMachine implements IInfoRenderer { diff --git a/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityFluidPipe.java b/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityFluidPipe.java index e6d10865c..e4db037f6 100644 --- a/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityFluidPipe.java +++ b/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityFluidPipe.java @@ -37,8 +37,8 @@ import tesseract.FluidPlatformUtils; import tesseract.TesseractCapUtils; import tesseract.TesseractGraphWrappers; -import tesseract.api.fluid.PipeFluidHolder; import tesseract.api.fluid.IFluidPipe; +import tesseract.api.fluid.PipeFluidHolder; import java.util.ArrayList; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityPipe.java b/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityPipe.java index 5a8fbed95..644933228 100644 --- a/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityPipe.java +++ b/common/src/main/java/muramasa/antimatter/tile/pipe/TileEntityPipe.java @@ -31,10 +31,10 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; import tesseract.api.IConnectable; import tesseract.graph.Connectivity; -import javax.annotation.Nullable; import java.util.List; import java.util.Optional; diff --git a/common/src/main/java/muramasa/antimatter/tile/single/TileEntityInfiniteStorage.java b/common/src/main/java/muramasa/antimatter/tile/single/TileEntityInfiniteStorage.java index c4cc22325..e49d2ec43 100644 --- a/common/src/main/java/muramasa/antimatter/tile/single/TileEntityInfiniteStorage.java +++ b/common/src/main/java/muramasa/antimatter/tile/single/TileEntityInfiniteStorage.java @@ -18,7 +18,6 @@ import net.minecraft.core.Direction; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.state.BlockState; -import tesseract.api.gt.GTTransaction; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/tile/single/TileEntityTransformer.java b/common/src/main/java/muramasa/antimatter/tile/single/TileEntityTransformer.java index 7336e37da..aee6f03cb 100644 --- a/common/src/main/java/muramasa/antimatter/tile/single/TileEntityTransformer.java +++ b/common/src/main/java/muramasa/antimatter/tile/single/TileEntityTransformer.java @@ -17,9 +17,7 @@ import tesseract.api.gt.IEnergyHandler; import java.util.List; -import java.util.function.IntToLongFunction; import java.util.function.LongFunction; -import java.util.function.ToLongFunction; import static muramasa.antimatter.data.AntimatterDefaultTools.SOFT_HAMMER; diff --git a/common/src/main/java/muramasa/antimatter/tool/AntimatterItemTier.java b/common/src/main/java/muramasa/antimatter/tool/AntimatterItemTier.java index 96ad8141e..3a5503678 100644 --- a/common/src/main/java/muramasa/antimatter/tool/AntimatterItemTier.java +++ b/common/src/main/java/muramasa/antimatter/tool/AntimatterItemTier.java @@ -8,8 +8,8 @@ import muramasa.antimatter.util.TagUtils; import net.minecraft.world.item.Tier; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.util.Objects; import java.util.Optional; @@ -26,7 +26,7 @@ public class AntimatterItemTier implements Tier { TIERS_LOOKUP.put(NULL.hashCode(), NULL); } - AntimatterItemTier(@Nonnull Material primary, @Nonnull Material secondary) { + AntimatterItemTier(@NotNull Material primary, @NotNull Material secondary) { this.primary = primary.has(MaterialTags.TOOLS) ? primary : Material.NULL; this.secondary = secondary.has(MaterialTags.HANDLE) ? secondary : Material.NULL; } diff --git a/common/src/main/java/muramasa/antimatter/tool/AntimatterToolType.java b/common/src/main/java/muramasa/antimatter/tool/AntimatterToolType.java index 2c5f8df0e..ab2feaa32 100644 --- a/common/src/main/java/muramasa/antimatter/tool/AntimatterToolType.java +++ b/common/src/main/java/muramasa/antimatter/tool/AntimatterToolType.java @@ -27,8 +27,8 @@ import net.minecraft.world.level.block.Block; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.ConstructorUtils; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.lang.reflect.InvocationTargetException; import java.util.*; import java.util.function.Function; diff --git a/common/src/main/java/muramasa/antimatter/tool/IAbstractToolMethods.java b/common/src/main/java/muramasa/antimatter/tool/IAbstractToolMethods.java index e035271a9..9a9a03845 100644 --- a/common/src/main/java/muramasa/antimatter/tool/IAbstractToolMethods.java +++ b/common/src/main/java/muramasa/antimatter/tool/IAbstractToolMethods.java @@ -1,21 +1,8 @@ package muramasa.antimatter.tool; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import net.minecraft.core.BlockPos; -import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.entity.ai.attributes.Attributes; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.AxeItem; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.world.item.enchantment.Enchantments; -import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.state.BlockState; import java.util.function.Consumer; diff --git a/common/src/main/java/muramasa/antimatter/tool/IAntimatterArmor.java b/common/src/main/java/muramasa/antimatter/tool/IAntimatterArmor.java index 61ffe579d..dae50b5ab 100644 --- a/common/src/main/java/muramasa/antimatter/tool/IAntimatterArmor.java +++ b/common/src/main/java/muramasa/antimatter/tool/IAntimatterArmor.java @@ -2,31 +2,27 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.Ref; -import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.datagen.builder.AntimatterItemModelBuilder; -import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.datagen.providers.AntimatterItemModelProvider; import muramasa.antimatter.material.Material; +import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.registration.IColorHandler; import muramasa.antimatter.registration.IModelProvider; import muramasa.antimatter.registration.ISharedAntimatterObject; import muramasa.antimatter.registration.ITextureProvider; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.tool.armor.AntimatterArmorType; -import muramasa.antimatter.util.TagUtils; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Block; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; diff --git a/common/src/main/java/muramasa/antimatter/tool/IAntimatterTool.java b/common/src/main/java/muramasa/antimatter/tool/IAntimatterTool.java index 180eb579e..a3c4197a0 100644 --- a/common/src/main/java/muramasa/antimatter/tool/IAntimatterTool.java +++ b/common/src/main/java/muramasa/antimatter/tool/IAntimatterTool.java @@ -9,7 +9,10 @@ import muramasa.antimatter.datagen.providers.AntimatterItemModelProvider; import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialTags; -import muramasa.antimatter.registration.*; +import muramasa.antimatter.registration.IColorHandler; +import muramasa.antimatter.registration.IModelProvider; +import muramasa.antimatter.registration.ISharedAntimatterObject; +import muramasa.antimatter.registration.ITextureProvider; import muramasa.antimatter.texture.Texture; import muramasa.antimatter.util.Utils; import net.minecraft.client.Camera; @@ -39,12 +42,12 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.HitResult; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractCapUtils; import tesseract.api.context.TesseractItemContext; import tesseract.api.gt.IEnergyHandlerItem; import tesseract.api.gt.IEnergyItem; -import javax.annotation.Nullable; import java.util.*; import static muramasa.antimatter.material.Material.NULL; diff --git a/common/src/main/java/muramasa/antimatter/tool/MaterialSword.java b/common/src/main/java/muramasa/antimatter/tool/MaterialSword.java index 2c8c296db..66042a25f 100644 --- a/common/src/main/java/muramasa/antimatter/tool/MaterialSword.java +++ b/common/src/main/java/muramasa/antimatter/tool/MaterialSword.java @@ -20,11 +20,7 @@ import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.SwordItem; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.item.UseAnim; +import net.minecraft.world.item.*; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.Enchantments; @@ -32,17 +28,16 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.api.context.TesseractItemContext; import tesseract.api.gt.IEnergyHandlerItem; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; import java.util.List; import java.util.Locale; import java.util.function.Consumer; -@ParametersAreNonnullByDefault +//@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class MaterialSword extends SwordItem implements IAntimatterTool, IContainerItem { @@ -79,7 +74,7 @@ public String getId() { return type.isPowered() ? String.join("_", type.getId(), Ref.VN[energyTier].toLowerCase(Locale.ENGLISH)) : type.getId(); } - @Nonnull + @NotNull @Override public AntimatterToolType getAntimatterToolType() { return type; @@ -97,9 +92,9 @@ public int getEnergyTier() { return energyTier; } - @Nonnull + @NotNull @Override - public ItemStack asItemStack(@Nonnull Material primary, @Nonnull Material secondary) { + public ItemStack asItemStack(@NotNull Material primary, @NotNull Material secondary) { return resolveStack(primary, secondary, 0, maxEnergy); } diff --git a/common/src/main/java/muramasa/antimatter/tool/MaterialTool.java b/common/src/main/java/muramasa/antimatter/tool/MaterialTool.java index 73887f63d..528ab3182 100644 --- a/common/src/main/java/muramasa/antimatter/tool/MaterialTool.java +++ b/common/src/main/java/muramasa/antimatter/tool/MaterialTool.java @@ -27,11 +27,7 @@ import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.DiggerItem; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.item.UseAnim; +import net.minecraft.world.item.*; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentCategory; @@ -40,19 +36,18 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.HitResult; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractCapUtils; import tesseract.api.context.TesseractItemContext; import tesseract.api.gt.IEnergyHandlerItem; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; import java.util.List; import java.util.Locale; import java.util.Optional; import java.util.function.Consumer; -@ParametersAreNonnullByDefault +//@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class MaterialTool extends DiggerItem implements IAntimatterTool, IContainerItem { @@ -94,7 +89,7 @@ public String getId() { return type.isPowered() ? String.join("_", type.getId(), Ref.VN[energyTier].toLowerCase(Locale.ENGLISH)) : type.getId(); } - @Nonnull + @NotNull @Override public AntimatterToolType getAntimatterToolType() { return type; @@ -106,7 +101,7 @@ public AntimatterItemTier getAntimatterItemTier() { } /* - @Nonnull + @NotNull @Override public Set> getToolTypes(ItemStack stack) { return getToolTypes(); @@ -119,9 +114,9 @@ public int getEnergyTier() { return energyTier; } - @Nonnull + @NotNull @Override - public ItemStack asItemStack(@Nonnull Material primary, @Nonnull Material secondary) { + public ItemStack asItemStack(@NotNull Material primary, @NotNull Material secondary) { return resolveStack(primary, secondary, 0, maxEnergy); } diff --git a/common/src/main/java/muramasa/antimatter/tool/armor/AntimatterArmorType.java b/common/src/main/java/muramasa/antimatter/tool/armor/AntimatterArmorType.java index 650754076..2d99dd5ee 100644 --- a/common/src/main/java/muramasa/antimatter/tool/armor/AntimatterArmorType.java +++ b/common/src/main/java/muramasa/antimatter/tool/armor/AntimatterArmorType.java @@ -18,8 +18,8 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/tool/armor/MaterialArmor.java b/common/src/main/java/muramasa/antimatter/tool/armor/MaterialArmor.java index e77573007..41fbec493 100644 --- a/common/src/main/java/muramasa/antimatter/tool/armor/MaterialArmor.java +++ b/common/src/main/java/muramasa/antimatter/tool/armor/MaterialArmor.java @@ -1,12 +1,9 @@ package muramasa.antimatter.tool.armor; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.client.RenderHelper; import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialTags; import muramasa.antimatter.tool.IAntimatterArmor; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; @@ -14,14 +11,11 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.item.*; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.List; import java.util.UUID; import java.util.function.Consumer; diff --git a/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTorchPlacing.java b/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTorchPlacing.java index 119411707..57034f404 100644 --- a/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTorchPlacing.java +++ b/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTorchPlacing.java @@ -24,8 +24,7 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.phys.shapes.CollisionContext; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public class BehaviourTorchPlacing implements IItemUse { public static final BehaviourTorchPlacing INSTANCE = new BehaviourTorchPlacing(); diff --git a/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTreeFelling.java b/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTreeFelling.java index 36c3829da..d2ef711df 100644 --- a/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTreeFelling.java +++ b/common/src/main/java/muramasa/antimatter/tool/behaviour/BehaviourTreeFelling.java @@ -16,9 +16,9 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.block.state.properties.Property; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.*; import java.util.function.Consumer; import java.util.function.Predicate; @@ -54,7 +54,7 @@ public boolean onBlockDestroyed(IAntimatterTool instance, ItemStack stack, Level * @param pos * @return null if not found or not fully cut */ - @Nonnull + @NotNull public static Tree findTree(@Nullable BlockGetter reader, BlockPos pos) { if (reader == null) return NO_TREE; diff --git a/common/src/main/java/muramasa/antimatter/util/AntimatterCapUtils.java b/common/src/main/java/muramasa/antimatter/util/AntimatterCapUtils.java index b36add892..8a8d1f9de 100644 --- a/common/src/main/java/muramasa/antimatter/util/AntimatterCapUtils.java +++ b/common/src/main/java/muramasa/antimatter/util/AntimatterCapUtils.java @@ -1,9 +1,7 @@ package muramasa.antimatter.util; import dev.architectury.injectables.annotations.ExpectPlatform; -import muramasa.antimatter.capability.IComponentHandler; import muramasa.antimatter.capability.ICoverHandler; -import muramasa.antimatter.capability.machine.MachineRecipeHandler; import net.minecraft.core.Direction; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/common/src/main/java/muramasa/antimatter/util/AntimatterPlatformUtils.java b/common/src/main/java/muramasa/antimatter/util/AntimatterPlatformUtils.java index fc6024e0c..a2732a57e 100644 --- a/common/src/main/java/muramasa/antimatter/util/AntimatterPlatformUtils.java +++ b/common/src/main/java/muramasa/antimatter/util/AntimatterPlatformUtils.java @@ -5,9 +5,9 @@ import earth.terrarium.botarium.common.fluid.base.FluidHolder; import earth.terrarium.botarium.common.fluid.utils.FluidHooks; import muramasa.antimatter.event.CraftingEvent; +import muramasa.antimatter.event.MaterialEvent; import muramasa.antimatter.event.ProvidersEvent; import muramasa.antimatter.event.WorldGenEvent; -import muramasa.antimatter.event.MaterialEvent; import muramasa.antimatter.machine.types.BasicMultiMachine; import muramasa.antimatter.recipe.loader.IRecipeRegistrate; import muramasa.antimatter.registration.IAntimatterRegistrar; @@ -37,8 +37,8 @@ import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.nio.file.Path; import java.util.Collection; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/util/LazyHolder.java b/common/src/main/java/muramasa/antimatter/util/LazyHolder.java index 5906dcc23..b621e1da7 100644 --- a/common/src/main/java/muramasa/antimatter/util/LazyHolder.java +++ b/common/src/main/java/muramasa/antimatter/util/LazyHolder.java @@ -3,7 +3,7 @@ import net.minecraftforge.common.util.LazyOptional; -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.function.Function; diff --git a/common/src/main/java/muramasa/antimatter/util/NonNullSupplier.java b/common/src/main/java/muramasa/antimatter/util/NonNullSupplier.java index 56aa56b34..4ece3c96c 100644 --- a/common/src/main/java/muramasa/antimatter/util/NonNullSupplier.java +++ b/common/src/main/java/muramasa/antimatter/util/NonNullSupplier.java @@ -1,9 +1,9 @@ package muramasa.antimatter.util; -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; @FunctionalInterface public interface NonNullSupplier { - @Nonnull + @NotNull T get(); } diff --git a/common/src/main/java/muramasa/antimatter/util/RotationHelper.java b/common/src/main/java/muramasa/antimatter/util/RotationHelper.java index b342a9797..448af54d3 100644 --- a/common/src/main/java/muramasa/antimatter/util/RotationHelper.java +++ b/common/src/main/java/muramasa/antimatter/util/RotationHelper.java @@ -6,8 +6,8 @@ import net.minecraft.core.Direction; import net.minecraft.core.Vec3i; import net.minecraft.util.Mth; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; diff --git a/common/src/main/java/muramasa/antimatter/util/TagUtils.java b/common/src/main/java/muramasa/antimatter/util/TagUtils.java index 857ea5686..0d762e7a2 100644 --- a/common/src/main/java/muramasa/antimatter/util/TagUtils.java +++ b/common/src/main/java/muramasa/antimatter/util/TagUtils.java @@ -4,10 +4,6 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.FluidTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.level.biome.Biome; diff --git a/common/src/main/java/muramasa/antimatter/util/Utils.java b/common/src/main/java/muramasa/antimatter/util/Utils.java index 052d0c3ff..e5473fe7b 100644 --- a/common/src/main/java/muramasa/antimatter/util/Utils.java +++ b/common/src/main/java/muramasa/antimatter/util/Utils.java @@ -18,7 +18,6 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.Ref; -import muramasa.antimatter.capability.FluidHandler; import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialType; import muramasa.antimatter.ore.StoneType; @@ -61,13 +60,12 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import tesseract.TesseractGraphWrappers; -import tesseract.api.gt.GTTransaction; import tesseract.api.gt.IEnergyHandler; import tesseract.api.item.PlatformItemHandler; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.awt.*; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -989,7 +987,7 @@ public static boolean isToolEffective(AntimatterToolType type, Set * @param world World instance * @return if tree logging was successful */ - public static boolean treeLogging(@Nonnull IAntimatterTool tool, @Nonnull ItemStack stack, @Nonnull BlockPos start, @Nonnull Player player, @Nonnull Level world) { + public static boolean treeLogging(@NotNull IAntimatterTool tool, @NotNull ItemStack stack, @NotNull BlockPos start, @NotNull Player player, @NotNull Level world) { if (!AntimatterConfig.GAMEPLAY.SMARTER_TREE_DETECTION) { BlockPos.MutableBlockPos tempPos = new BlockPos.MutableBlockPos(start.getX(), start.getY(), start.getZ()); BlockState tpCompare = world.getBlockState(tempPos); @@ -1032,7 +1030,7 @@ public static boolean isCorrectToolForDrops(BlockState state, Player player){ * @param depth depth amount of blocks * @return set of harvestable BlockPos in the specified range with specified player */ - public static ImmutableSet getHarvestableBlocksToBreak(@Nonnull Level world, @Nonnull Player player, @Nonnull IAntimatterTool tool, ItemStack stack, int column, int row, int depth) { + public static ImmutableSet getHarvestableBlocksToBreak(@NotNull Level world, @NotNull Player player, @NotNull IAntimatterTool tool, ItemStack stack, int column, int row, int depth) { ImmutableSet totalBlocks = getBlocksToBreak(world, player, column, row, depth); return totalBlocks.stream().filter(b -> isToolEffective(tool, stack, world.getBlockState(b)) && world.getBlockState(b).getDestroySpeed(world, b) >= 0).collect(ImmutableSet.toImmutableSet()); } @@ -1047,7 +1045,7 @@ public static ImmutableSet getHarvestableBlocksToBreak(@Nonnull Level * @param depth = depth amount of blocks * @return set of BlockPos in the specified range */ - public static ImmutableSet getBlocksToBreak(@Nonnull Level world, @Nonnull Player player, int column, int row, int depth) { + public static ImmutableSet getBlocksToBreak(@NotNull Level world, @NotNull Player player, int column, int row, int depth) { Vec3 lookPos = player.getEyePosition(1), rotation = player.getViewVector(1), realLookPos = lookPos.add(rotation.x * 5, rotation.y * 5, rotation.z * 5); BlockHitResult result = world.clip(new ClipContext(lookPos, realLookPos, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)); Direction playerDirection = player.getDirection(); diff --git a/common/src/main/java/muramasa/antimatter/util/int3.java b/common/src/main/java/muramasa/antimatter/util/int3.java index d530e4155..2c37cedf2 100644 --- a/common/src/main/java/muramasa/antimatter/util/int3.java +++ b/common/src/main/java/muramasa/antimatter/util/int3.java @@ -3,8 +3,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; - -import javax.annotation.Nonnull; +import org.jetbrains.annotations.NotNull; /** * Created By Muramasa - https://github.com/Muramasa- @@ -72,25 +71,25 @@ public int3 back(int n) { return offset(n, side.getOpposite()); } - @Nonnull + @NotNull public int3 above(int n) { if (side.getAxis() != Axis.Y) return offset(n, Direction.UP); return offset(n, Direction.NORTH.getOpposite()); } - @Nonnull + @NotNull public int3 below(int n) { if (side.getAxis() != Axis.Y) return offset(n, Direction.DOWN); return offset(n, Direction.NORTH); } - @Nonnull + @NotNull @Override public BlockPos relative(Direction side) { return offset(1, side); } - @Nonnull + @NotNull @Override public BlockPos relative(Direction side, int n) { return offset(n, side); @@ -139,7 +138,7 @@ public int3 offset(int3 n, Direction... facings) { return this; } - @Nonnull + @NotNull @Override public String toString() { return "(" + getX() + ", " + getY() + ", " + getZ() + ")"; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/AntimatterConfiguredFeatures.java b/common/src/main/java/muramasa/antimatter/worldgen/AntimatterConfiguredFeatures.java index c7847a4c2..52e47fb8f 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/AntimatterConfiguredFeatures.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/AntimatterConfiguredFeatures.java @@ -1,12 +1,8 @@ package muramasa.antimatter.worldgen; -import muramasa.antimatter.Ref; import net.minecraft.core.Holder; -import net.minecraft.core.Registry; -import net.minecraft.data.BuiltinRegistries; import net.minecraft.data.worldgen.features.FeatureUtils; import net.minecraft.data.worldgen.placement.PlacementUtils; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/AntimatterWorldGenerator.java b/common/src/main/java/muramasa/antimatter/worldgen/AntimatterWorldGenerator.java index 86d2ddda5..1f0dad05b 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/AntimatterWorldGenerator.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/AntimatterWorldGenerator.java @@ -26,8 +26,8 @@ import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; import java.io.BufferedWriter; import java.io.File; import java.io.IOException; @@ -129,7 +129,7 @@ private static void removeOreFeatures(BiomeGenerationSettings.Builder builder) { * @param featureToRemove feature instance wishing to be removed * @param states BlockStates wish to be removed */ - public static void removeDecoratedFeatureFromAllBiomes(BiomeGenerationSettings.Builder builder, @Nonnull final GenerationStep.Decoration stage, @Nonnull final Feature featureToRemove, BlockState... states) { + public static void removeDecoratedFeatureFromAllBiomes(BiomeGenerationSettings.Builder builder, @NotNull final GenerationStep.Decoration stage, @NotNull final Feature featureToRemove, BlockState... states) { if (states.length == 0) Utils.onInvalidData("No BlockStates specified to be removed!"); Set set = Set.of(states); // AntimatterAPI.runLaterCommon(() -> { @@ -146,7 +146,7 @@ public static void removeDecoratedFeatureFromAllBiomes(BiomeGenerationSettings.B * @param featureToRemove feature instance wishing to be removed * @param states BlockStates wish to be removed */ - public static void removeDecoratedFeaturesFromBiome(@Nonnull final Biome biome, final @Nonnull GenerationStep.Decoration stage, final @Nonnull Feature featureToRemove, BlockState... states) { + public static void removeDecoratedFeaturesFromBiome(@NotNull final Biome biome, final @NotNull GenerationStep.Decoration stage, final @NotNull Feature featureToRemove, BlockState... states) { if (states.length == 0) Utils.onInvalidData("No BlockStates specified to be removed!"); AntimatterAPI.runLaterCommon(() -> { for (BlockState state : states) { @@ -158,7 +158,7 @@ public static void removeDecoratedFeaturesFromBiome(@Nonnull final Biome biome, /** * Check with BlockState in a feature if it is disabled */ - public static boolean isDecoratedFeatureDisabled(@Nonnull ConfiguredFeature configuredFeature, @Nonnull Feature featureToRemove, @Nonnull Set state) { + public static boolean isDecoratedFeatureDisabled(@NotNull ConfiguredFeature configuredFeature, @NotNull Feature featureToRemove, @NotNull Set state) { if (configuredFeature.config() instanceof OreConfiguration config) { return config.targetStates.stream().anyMatch(t -> state.contains(t.state)); } diff --git a/common/src/main/java/muramasa/antimatter/worldgen/StoneLayerOre.java b/common/src/main/java/muramasa/antimatter/worldgen/StoneLayerOre.java index 992814d31..655c3f9f0 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/StoneLayerOre.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/StoneLayerOre.java @@ -1,12 +1,10 @@ package muramasa.antimatter.worldgen; import com.google.gson.JsonObject; -import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.material.Material; import muramasa.antimatter.ore.StoneType; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinVariantMaterial; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.state.BlockState; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/WorldGenHelper.java b/common/src/main/java/muramasa/antimatter/worldgen/WorldGenHelper.java index 6e26daf36..7b8cf6e66 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/WorldGenHelper.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/WorldGenHelper.java @@ -18,8 +18,8 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.levelgen.Heightmap; import org.apache.commons.lang3.tuple.ImmutableTriple; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.function.Predicate; public class WorldGenHelper { diff --git a/common/src/main/java/muramasa/antimatter/worldgen/feature/FeatureVanillaOres.java b/common/src/main/java/muramasa/antimatter/worldgen/feature/FeatureVanillaOres.java index cbb1a02b2..db2ac3ee9 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/feature/FeatureVanillaOres.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/feature/FeatureVanillaOres.java @@ -1,6 +1,5 @@ package muramasa.antimatter.worldgen.feature; -import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.data.AntimatterStoneTypes; import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialType; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayer.java b/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayer.java index 9023edb95..c52cb98b3 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayer.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayer.java @@ -4,21 +4,17 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.objects.ObjectArrayList; import muramasa.antimatter.block.BlockStone; import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.worldgen.StoneLayerOre; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinVariant; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.*; import java.util.stream.Collectors; import java.util.stream.IntStream; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayerBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayerBuilder.java index 2f9e81de1..5db418cb4 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayerBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/object/WorldGenStoneLayerBuilder.java @@ -3,12 +3,11 @@ import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import muramasa.antimatter.worldgen.StoneLayerOre; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/smallore/WorldGenSmallOreBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/smallore/WorldGenSmallOreBuilder.java index 37bb712fe..1d2a8b427 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/smallore/WorldGenSmallOreBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/smallore/WorldGenSmallOreBuilder.java @@ -7,8 +7,8 @@ import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import muramasa.antimatter.worldgen.vein.old.WorldGenVein; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.io.File; import java.io.Reader; import java.nio.file.Files; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOre.java b/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOre.java index 80f4cb4fd..5ca89919e 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOre.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOre.java @@ -9,7 +9,6 @@ import muramasa.antimatter.material.MaterialType; import muramasa.antimatter.util.TagUtils; import muramasa.antimatter.worldgen.object.WorldGenBase; -import muramasa.antimatter.worldgen.smallore.WorldGenSmallOre; import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOreBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOreBuilder.java index ff4c5c419..f4f340721 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOreBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vanillaore/WorldGenVanillaOreBuilder.java @@ -2,13 +2,11 @@ import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.material.Material; -import muramasa.antimatter.material.MaterialType; import muramasa.antimatter.material.MaterialTypeBlock; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; -import muramasa.antimatter.worldgen.smallore.WorldGenSmallOre; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayer.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayer.java index 20a996443..4f8dce761 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayer.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayer.java @@ -8,18 +8,13 @@ import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.Ref; import muramasa.antimatter.data.AntimatterMaterialTypes; -import muramasa.antimatter.data.AntimatterStoneTypes; import muramasa.antimatter.material.Material; import muramasa.antimatter.material.MaterialType; -import muramasa.antimatter.ore.StoneType; -import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.XSTR; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import muramasa.antimatter.worldgen.VeinLayerResult; import muramasa.antimatter.worldgen.WorldGenHelper; import muramasa.antimatter.worldgen.object.WorldGenBase; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinVariant; import net.minecraft.core.BlockPos; import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; @@ -27,7 +22,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.Mth; -import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.WorldGenLevel; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayerBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayerBuilder.java index 906e3ab00..f0c065049 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayerBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/WorldGenVeinLayerBuilder.java @@ -1,20 +1,13 @@ package muramasa.antimatter.worldgen.vein; -import muramasa.antimatter.data.AntimatterMaterialTypes; import muramasa.antimatter.material.Material; -import muramasa.antimatter.ore.StoneType; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinVariant; -import muramasa.antimatter.worldgen.vein.old.WorldGenVeinVariantBuilder; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; -import java.util.List; public class WorldGenVeinLayerBuilder { diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVein.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVein.java index a705e0b4a..12c47ea8f 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVein.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVein.java @@ -10,8 +10,8 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinBuilder.java index 8585f08eb..40b6882c3 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinBuilder.java @@ -7,8 +7,8 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantBuilder.java index c1bc741e9..e802b65d3 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantBuilder.java @@ -2,8 +2,8 @@ import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.material.Material; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.util.ArrayList; public class WorldGenVeinVariantBuilder { diff --git a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantMaterialBuilder.java b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantMaterialBuilder.java index c6845a3d0..5acdfdb37 100644 --- a/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantMaterialBuilder.java +++ b/common/src/main/java/muramasa/antimatter/worldgen/vein/old/WorldGenVeinVariantMaterialBuilder.java @@ -1,8 +1,7 @@ package muramasa.antimatter.worldgen.vein.old; import muramasa.antimatter.material.Material; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public class WorldGenVeinVariantMaterialBuilder { diff --git a/fabric/build.gradle b/fabric/build.gradle index f54eea99d..2ec434c3c 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,5 +1,3 @@ -import org.gradle.api.publish.maven.MavenPublication - archivesBaseName = "${rootProject.antimatter_archive_base_name}-fabric" version = "${project.mod_version}-${rootProject.minecraft_version}" @@ -18,20 +16,13 @@ repositories { maven { url = uri("https://storage.googleapis.com/devan-maven/") } + maven { url "https://maven.bai.lol" } } loom { accessWidenerPath = accessWidenerFile } -sourceSets { - main { - resources { - srcDir generatedResources - } - } -} - dependencies{ modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" @@ -72,6 +63,7 @@ dependencies{ } modImplementation("net.minecraftforge:forgeconfigapiport-fabric:3.2.4") modCompileOnly("curse.maven:the-one-probe-fabric-581847:${project.top_fabric_file}") + modCompileOnly "lol.bai.megane:megane-reborn-energy:${project.megane_version}" } architectury { @@ -83,6 +75,14 @@ task copyAccessWidener(type: Copy) { into generatedResources } +sourceSets { + main { + resources { + srcDir copyAccessWidener + } + } +} + processResources { dependsOn copyAccessWidener diff --git a/fabric/gradle.properties b/fabric/gradle.properties index e0f0e7887..7c0db2207 100644 --- a/fabric/gradle.properties +++ b/fabric/gradle.properties @@ -1,4 +1,6 @@ mod_version=0.2-rc46 top_fabric_file=3877300 +megane_version=7.7.2 + ct_fabric_fluid_support_hash=1.0.1 diff --git a/fabric/src/main/java/muramasa/antimatter/client/fabric/AntimatterClientImpl.java b/fabric/src/main/java/muramasa/antimatter/client/fabric/AntimatterClientImpl.java index 5d2c0aafb..5c89ffcd1 100644 --- a/fabric/src/main/java/muramasa/antimatter/client/fabric/AntimatterClientImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/client/fabric/AntimatterClientImpl.java @@ -22,8 +22,6 @@ import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback; -import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry; -import net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents; import net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents; diff --git a/fabric/src/main/java/muramasa/antimatter/client/fabric/ModelUtilsImpl.java b/fabric/src/main/java/muramasa/antimatter/client/fabric/ModelUtilsImpl.java index 793c0b03f..33c80c973 100644 --- a/fabric/src/main/java/muramasa/antimatter/client/fabric/ModelUtilsImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/client/fabric/ModelUtilsImpl.java @@ -11,20 +11,13 @@ import muramasa.antimatter.client.ModelUtils; import muramasa.antimatter.client.baked.IAntimatterBakedModel; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; -import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.block.model.ItemOverrides; import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.Material; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.client.resources.model.ModelState; -import net.minecraft.client.resources.model.SimpleBakedModel; -import net.minecraft.client.resources.model.UnbakedModel; +import net.minecraft.client.resources.model.*; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; @@ -32,9 +25,9 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -75,7 +68,7 @@ public static void setLightData(BakedQuad quad, int light){ public static SimpleBakedModel.Builder createSimpleModelBuilder(boolean smoothLighting, boolean sideLit, boolean isShadedInGui, ItemTransforms transforms, ItemOverrides overrides){ return SimpleBakedModel$BuilderAccessor.port_lib$create(smoothLighting, sideLit, isShadedInGui, transforms, overrides); } - public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos){ + public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos){ if (model instanceof IAntimatterBakedModel antimatterBaked){ return antimatterBaked.getQuads(state, side, rand, level, pos); } else { diff --git a/fabric/src/main/java/muramasa/antimatter/client/model/loader/fabric/ModelLoaderWrapper.java b/fabric/src/main/java/muramasa/antimatter/client/model/loader/fabric/ModelLoaderWrapper.java index 0f9c036b8..1e75249d6 100644 --- a/fabric/src/main/java/muramasa/antimatter/client/model/loader/fabric/ModelLoaderWrapper.java +++ b/fabric/src/main/java/muramasa/antimatter/client/model/loader/fabric/ModelLoaderWrapper.java @@ -2,7 +2,6 @@ import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; -import com.mojang.datafixers.util.Pair; import io.github.fabricators_of_create.porting_lib.model.IModelConfiguration; import io.github.fabricators_of_create.porting_lib.model.IModelGeometry; import io.github.fabricators_of_create.porting_lib.model.IModelLoader; @@ -10,7 +9,6 @@ import muramasa.antimatter.client.model.loader.IAntimatterModelLoader; import net.minecraft.client.renderer.block.model.ItemOverrides; import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; diff --git a/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterAPIImpl.java b/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterAPIImpl.java index 96a669e82..eb2d3345e 100644 --- a/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterAPIImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterAPIImpl.java @@ -2,26 +2,20 @@ import earth.terrarium.botarium.common.fluid.base.FluidContainer; import earth.terrarium.botarium.fabric.fluid.storage.FabricBlockFluidContainer; -import earth.terrarium.botarium.util.Updatable; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.capability.fabric.AntimatterLookups; -import muramasa.antimatter.item.IFluidItem; import muramasa.antimatter.tile.TileEntityMachine; import muramasa.antimatter.tile.pipe.*; 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.item.InventoryStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; -import net.minecraft.world.Container; import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import tesseract.api.fabric.TesseractLookups; import tesseract.api.fabric.wrapper.ContainerItemContextWrapper; import tesseract.api.fabric.wrapper.ExtendedContainerWrapper; -import tesseract.api.fluid.IFluidNode; import tesseract.api.gt.IEnergyHandler; import tesseract.api.gt.IEnergyItem; import tesseract.api.heat.IHeatHandler; diff --git a/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterImpl.java b/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterImpl.java index 62771025a..52440b2a4 100644 --- a/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/fabric/AntimatterImpl.java @@ -20,7 +20,6 @@ import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.fluid.fabric.FluidAttributesVariantWrapper; import muramasa.antimatter.integration.kubejs.KubeJSRegistrar; -import muramasa.antimatter.material.*; import muramasa.antimatter.pipe.FluidPipeTicker; import muramasa.antimatter.proxy.CommonHandler; import muramasa.antimatter.recipe.fabric.RecipeConditions; @@ -36,10 +35,8 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerWorldEvents; -import net.fabricmc.fabric.api.registry.FuelRegistry; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; -import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; import net.fabricmc.loader.impl.entrypoint.EntrypointUtils; import net.minecraft.core.BlockPos; @@ -54,8 +51,6 @@ import tesseract.api.fabric.wrapper.ExtendedContainerWrapper; import tesseract.fabric.TesseractImpl; -import java.util.Map; - import static muramasa.antimatter.Ref.ID; public class AntimatterImpl implements ModInitializer { diff --git a/fabric/src/main/java/muramasa/antimatter/fabric/LootTableExtension.java b/fabric/src/main/java/muramasa/antimatter/fabric/LootTableExtension.java index b7bececf4..9af1f9964 100644 --- a/fabric/src/main/java/muramasa/antimatter/fabric/LootTableExtension.java +++ b/fabric/src/main/java/muramasa/antimatter/fabric/LootTableExtension.java @@ -1,6 +1,5 @@ package muramasa.antimatter.fabric; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.storage.loot.LootPool; public interface LootTableExtension { diff --git a/fabric/src/main/java/muramasa/antimatter/fluid/fabric/FluidAttributesVariantWrapper.java b/fabric/src/main/java/muramasa/antimatter/fluid/fabric/FluidAttributesVariantWrapper.java index a8f5134e5..eb811f532 100644 --- a/fabric/src/main/java/muramasa/antimatter/fluid/fabric/FluidAttributesVariantWrapper.java +++ b/fabric/src/main/java/muramasa/antimatter/fluid/fabric/FluidAttributesVariantWrapper.java @@ -1,7 +1,6 @@ package muramasa.antimatter.fluid.fabric; import earth.terrarium.botarium.common.registry.fluid.FluidProperties; -import earth.terrarium.botarium.fabric.fluid.holder.FabricFluidHolder; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributeHandler; import net.minecraft.Util; diff --git a/common/src/main/java/muramasa/antimatter/integration/megane/AntimatterMeganeModule.java b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/AntimatterMeganeModule.java similarity index 75% rename from common/src/main/java/muramasa/antimatter/integration/megane/AntimatterMeganeModule.java rename to fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/AntimatterMeganeModule.java index 76ded979a..640b1af3d 100644 --- a/common/src/main/java/muramasa/antimatter/integration/megane/AntimatterMeganeModule.java +++ b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/AntimatterMeganeModule.java @@ -1,11 +1,11 @@ -package muramasa.antimatter.integration.megane; +package muramasa.antimatter.integration.fabric.megane; import lol.bai.megane.api.MeganeModule; import lol.bai.megane.api.registry.ClientRegistrar; import lol.bai.megane.api.registry.CommonRegistrar; import muramasa.antimatter.Ref; -import muramasa.antimatter.integration.megane.provider.MachineEnergyProvider; -import muramasa.antimatter.integration.megane.provider.MachineProgressProvider; +import muramasa.antimatter.integration.fabric.megane.provider.MachineEnergyProvider; +import muramasa.antimatter.integration.fabric.megane.provider.MachineProgressProvider; import muramasa.antimatter.tile.TileEntityMachine; public class AntimatterMeganeModule implements MeganeModule { diff --git a/common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineEnergyProvider.java b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineEnergyProvider.java similarity index 89% rename from common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineEnergyProvider.java rename to fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineEnergyProvider.java index de7138700..1efd67f4a 100644 --- a/common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineEnergyProvider.java +++ b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineEnergyProvider.java @@ -1,4 +1,4 @@ -package muramasa.antimatter.integration.megane.provider; +package muramasa.antimatter.integration.fabric.megane.provider; import lol.bai.megane.api.provider.EnergyProvider; import muramasa.antimatter.tile.TileEntityMachine; diff --git a/common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineProgressProvider.java b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineProgressProvider.java similarity index 95% rename from common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineProgressProvider.java rename to fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineProgressProvider.java index 78d6fa12a..e185539cd 100644 --- a/common/src/main/java/muramasa/antimatter/integration/megane/provider/MachineProgressProvider.java +++ b/fabric/src/main/java/muramasa/antimatter/integration/fabric/megane/provider/MachineProgressProvider.java @@ -1,4 +1,4 @@ -package muramasa.antimatter.integration.megane.provider; +package muramasa.antimatter.integration.fabric.megane.provider; import lol.bai.megane.api.provider.ProgressProvider; import muramasa.antimatter.tile.TileEntityMachine; diff --git a/fabric/src/main/java/muramasa/antimatter/integration/kubejs/fabric/AntimatterKubeJSImpl.java b/fabric/src/main/java/muramasa/antimatter/integration/kubejs/fabric/AntimatterKubeJSImpl.java index 7213c7c40..7348858cf 100644 --- a/fabric/src/main/java/muramasa/antimatter/integration/kubejs/fabric/AntimatterKubeJSImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/integration/kubejs/fabric/AntimatterKubeJSImpl.java @@ -1,13 +1,6 @@ package muramasa.antimatter.integration.kubejs.fabric; -import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.fabric.AntimatterImpl; -import muramasa.antimatter.proxy.CommonHandler; -import muramasa.antimatter.registration.IAntimatterRegistrarInitializer; -import muramasa.antimatter.registration.RegistrationEvent; -import muramasa.antimatter.registration.fabric.AntimatterRegistration; -import muramasa.antimatter.worldgen.fabric.AntimatterFabricWorldgen; -import net.fabricmc.loader.impl.entrypoint.EntrypointUtils; public class AntimatterKubeJSImpl { public static void onRegister(){ diff --git a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTableMixin.java b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTableMixin.java index 956d9ebf5..c3a894cb5 100644 --- a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTableMixin.java +++ b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTableMixin.java @@ -1,19 +1,16 @@ package muramasa.antimatter.mixin.fabric; import muramasa.antimatter.fabric.LootTableExtension; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mutable; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Objects; @Mixin(LootTable.class) public class LootTableMixin implements LootTableExtension { diff --git a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTablesMixin.java b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTablesMixin.java index a67257839..5bb3a6332 100644 --- a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTablesMixin.java +++ b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/LootTablesMixin.java @@ -3,7 +3,6 @@ import com.google.common.collect.ImmutableMap; import com.google.gson.JsonElement; import muramasa.antimatter.common.event.CommonEvents; -import muramasa.antimatter.fabric.LootTableExtension; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.LootTables; diff --git a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/RecipeIngredientMixin.java b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/RecipeIngredientMixin.java index 916d654f6..b55d94160 100644 --- a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/RecipeIngredientMixin.java +++ b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/RecipeIngredientMixin.java @@ -2,7 +2,6 @@ import muramasa.antimatter.recipe.ingredient.IngredientSerializer; import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.item.crafting.Ingredient; import org.spongepowered.asm.mixin.Mixin; diff --git a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/client/IAntimatterBakedModelMixin.java b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/client/IAntimatterBakedModelMixin.java index 5d27c2564..43cb4c59d 100644 --- a/fabric/src/main/java/muramasa/antimatter/mixin/fabric/client/IAntimatterBakedModelMixin.java +++ b/fabric/src/main/java/muramasa/antimatter/mixin/fabric/client/IAntimatterBakedModelMixin.java @@ -13,12 +13,11 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import javax.annotation.Nonnull; -import java.util.Collections; import java.util.List; import java.util.Random; import java.util.function.Supplier; @@ -30,7 +29,7 @@ public interface IAntimatterBakedModelMixin extends FabricBakedModel, BakedModel boolean hasOnlyGeneralQuads(); @Shadow - List getBlockQuads(BlockState state, @javax.annotation.Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos); + List getBlockQuads(BlockState state, @org.jetbrains.annotations.Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos); @Override default boolean isVanillaAdapter() { diff --git a/fabric/src/main/java/muramasa/antimatter/registration/fabric/AntimatterRegistration.java b/fabric/src/main/java/muramasa/antimatter/registration/fabric/AntimatterRegistration.java index fda0455d9..8cc66c423 100644 --- a/fabric/src/main/java/muramasa/antimatter/registration/fabric/AntimatterRegistration.java +++ b/fabric/src/main/java/muramasa/antimatter/registration/fabric/AntimatterRegistration.java @@ -1,7 +1,6 @@ package muramasa.antimatter.registration.fabric; - import com.google.gson.JsonObject; import io.github.fabricators_of_create.porting_lib.crafting.CraftingHelper; import io.github.tropheusj.serialization_hooks.ingredient.IngredientDeserializer; @@ -15,15 +14,7 @@ import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.integration.kubejs.AntimatterKubeJS; import muramasa.antimatter.recipe.ingredient.IAntimatterIngredientSerializer; -import muramasa.antimatter.recipe.ingredient.IngredientSerializer; -import muramasa.antimatter.recipe.ingredient.PropertyIngredient; -import muramasa.antimatter.recipe.material.MaterialSerializer; -import muramasa.antimatter.recipe.serializer.AntimatterRecipeSerializer; -import muramasa.antimatter.registration.IAntimatterRegistrar; -import muramasa.antimatter.registration.IItemBlockProvider; -import muramasa.antimatter.registration.IRegistryEntryProvider; -import muramasa.antimatter.registration.RegistrationEvent; -import muramasa.antimatter.registration.RegistryType; +import muramasa.antimatter.registration.*; import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; diff --git a/fabric/src/main/java/muramasa/antimatter/tool/behaviour/fabric/BehaviourUtilImpl.java b/fabric/src/main/java/muramasa/antimatter/tool/behaviour/fabric/BehaviourUtilImpl.java index 1c0602842..fdff7f52e 100644 --- a/fabric/src/main/java/muramasa/antimatter/tool/behaviour/fabric/BehaviourUtilImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/tool/behaviour/fabric/BehaviourUtilImpl.java @@ -1,6 +1,5 @@ package muramasa.antimatter.tool.behaviour.fabric; -import muramasa.antimatter.tool.behaviour.BehaviourUtil; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; diff --git a/fabric/src/main/java/muramasa/antimatter/util/fabric/AntimatterPlatformUtilsImpl.java b/fabric/src/main/java/muramasa/antimatter/util/fabric/AntimatterPlatformUtilsImpl.java index 98933702d..c6bd5e97c 100644 --- a/fabric/src/main/java/muramasa/antimatter/util/fabric/AntimatterPlatformUtilsImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/util/fabric/AntimatterPlatformUtilsImpl.java @@ -47,8 +47,8 @@ import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.nio.file.Path; import java.util.Collection; import java.util.List; diff --git a/fabric/src/main/java/muramasa/antimatter/util/fabric/UtilsImpl.java b/fabric/src/main/java/muramasa/antimatter/util/fabric/UtilsImpl.java index 43e2808a3..65372f52a 100644 --- a/fabric/src/main/java/muramasa/antimatter/util/fabric/UtilsImpl.java +++ b/fabric/src/main/java/muramasa/antimatter/util/fabric/UtilsImpl.java @@ -6,7 +6,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; diff --git a/fabric/src/main/java/muramasa/antimatter/worldgen/fabric/AntimatterFabricWorldgen.java b/fabric/src/main/java/muramasa/antimatter/worldgen/fabric/AntimatterFabricWorldgen.java index 6780efbbc..6939a8055 100644 --- a/fabric/src/main/java/muramasa/antimatter/worldgen/fabric/AntimatterFabricWorldgen.java +++ b/fabric/src/main/java/muramasa/antimatter/worldgen/fabric/AntimatterFabricWorldgen.java @@ -1,10 +1,7 @@ package muramasa.antimatter.worldgen.fabric; -import com.google.common.collect.Lists; import muramasa.antimatter.AntimatterConfig; import muramasa.antimatter.mixin.BiomeAccessor; -import muramasa.antimatter.mixin.BiomeGenerationBuilderAccessor; -import muramasa.antimatter.util.AntimatterPlatformUtils; import muramasa.antimatter.util.Utils; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import net.fabricmc.fabric.api.biome.v1.BiomeModificationContext; @@ -24,9 +21,8 @@ import net.minecraft.world.level.levelgen.carver.ConfiguredWorldCarver; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.placement.PlacedFeature; +import org.jetbrains.annotations.NotNull; -import javax.annotation.Nonnull; -import java.util.List; import java.util.Set; import static muramasa.antimatter.Ref.ID; @@ -63,7 +59,7 @@ private static void removeOreFeatures(Biome biome, BiomeModificationContext.Gene * @param featureToRemove feature instance wishing to be removed * @param states BlockStates wish to be removed */ - public static void removeDecoratedFeatureFromAllBiomes(Biome biome, BiomeModificationContext.GenerationSettingsContext context, @Nonnull final GenerationStep.Decoration stage, @Nonnull final Feature featureToRemove, BlockState... states) { + public static void removeDecoratedFeatureFromAllBiomes(Biome biome, BiomeModificationContext.GenerationSettingsContext context, @NotNull final GenerationStep.Decoration stage, @NotNull final Feature featureToRemove, BlockState... states) { if (states.length == 0) Utils.onInvalidData("No BlockStates specified to be removed!"); Set set = Set.of(states); // AntimatterAPI.runLaterCommon(() -> { diff --git a/fabric/src/main/resources/antimatter-fabric.mixins.json b/fabric/src/main/resources/antimatter-fabric.mixins.json index 518e3dd66..042ee3d49 100644 --- a/fabric/src/main/resources/antimatter-fabric.mixins.json +++ b/fabric/src/main/resources/antimatter-fabric.mixins.json @@ -16,7 +16,7 @@ "minVersion": "0.8", "client": [ "ModelBakeryMixin", - "client.MinecraftAccessor", - "client.IAntimatterBakedModelMixin" + "client.IAntimatterBakedModelMixin", + "client.MinecraftAccessor" ] } \ No newline at end of file diff --git a/forge/build.gradle b/forge/build.gradle index 34d4364c4..2b7df4b0e 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -18,11 +18,6 @@ loom{ mod project.modid } - launches { - data { - arg "--existing", file("src/main/resources").absolutePath - } - } } } @@ -66,7 +61,7 @@ processResources { shadowJar { configurations = [project.configurations.shadowCommon] - classifier "dev-shadow" + archiveClassifier.set "dev-shadow" exclude("architectury.common.json") } diff --git a/forge/src/main/java/muramasa/antimatter/capability/forge/AntimatterCaps.java b/forge/src/main/java/muramasa/antimatter/capability/forge/AntimatterCaps.java index a79df23b8..ec3578143 100644 --- a/forge/src/main/java/muramasa/antimatter/capability/forge/AntimatterCaps.java +++ b/forge/src/main/java/muramasa/antimatter/capability/forge/AntimatterCaps.java @@ -3,9 +3,7 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import muramasa.antimatter.Ref; -import muramasa.antimatter.capability.IComponentHandler; import muramasa.antimatter.capability.ICoverHandler; -import muramasa.antimatter.capability.machine.MachineRecipeHandler; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; diff --git a/forge/src/main/java/muramasa/antimatter/client/event/forge/ClientEventsForge.java b/forge/src/main/java/muramasa/antimatter/client/event/forge/ClientEventsForge.java index d68c57337..866c48bf6 100644 --- a/forge/src/main/java/muramasa/antimatter/client/event/forge/ClientEventsForge.java +++ b/forge/src/main/java/muramasa/antimatter/client/event/forge/ClientEventsForge.java @@ -1,50 +1,13 @@ package muramasa.antimatter.client.event.forge; -import com.google.common.collect.ImmutableSet; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.SheetedDecalTextureGenerator; -import com.mojang.blaze3d.vertex.VertexConsumer; -import it.unimi.dsi.fastutil.objects.ObjectArrayList; -import muramasa.antimatter.Data; import muramasa.antimatter.Ref; -import muramasa.antimatter.behaviour.IBehaviour; -import muramasa.antimatter.block.IInfoProvider; -import muramasa.antimatter.client.RenderHelper; import muramasa.antimatter.client.SoundHelper; import muramasa.antimatter.client.event.ClientEvents; -import muramasa.antimatter.cover.IHaveCover; -import muramasa.antimatter.machine.BlockMachine; import muramasa.antimatter.material.MaterialType; -import muramasa.antimatter.mixin.client.LevelRendererAccessor; -import muramasa.antimatter.pipe.BlockPipe; -import muramasa.antimatter.tile.TileEntityBase; -import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.tool.IAntimatterTool; -import muramasa.antimatter.tool.behaviour.BehaviourAOEBreak; -import muramasa.antimatter.tool.behaviour.BehaviourExtendedHighlight; -import muramasa.antimatter.util.Utils; -import net.minecraft.ChatFormatting; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.MultiPlayerGameMode; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.sounds.SoundInstance; -import net.minecraft.core.BlockPos; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.UseAnim; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.HitResult; -import net.minecraft.world.phys.Vec3; -import net.minecraft.world.phys.shapes.CollisionContext; -import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.DrawSelectionEvent.HighlightBlock; @@ -55,12 +18,6 @@ import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.util.ObfuscationReflectionHelper; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; @Mod.EventBusSubscriber(modid = Ref.ID, value = Dist.CLIENT) public class ClientEventsForge { diff --git a/forge/src/main/java/muramasa/antimatter/client/forge/ModelUtilsImpl.java b/forge/src/main/java/muramasa/antimatter/client/forge/ModelUtilsImpl.java index a811b4f5e..0a05336e1 100644 --- a/forge/src/main/java/muramasa/antimatter/client/forge/ModelUtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/client/forge/ModelUtilsImpl.java @@ -24,15 +24,13 @@ import net.minecraft.world.level.material.Fluid; import net.minecraftforge.client.model.ForgeModelBakery; import net.minecraftforge.client.model.QuadTransformer; -import net.minecraftforge.client.model.SimpleModelState; import net.minecraftforge.client.model.data.EmptyModelData; import net.minecraftforge.client.model.data.IModelData; -import net.minecraftforge.client.model.data.ModelDataMap; import net.minecraftforge.client.model.pipeline.LightUtil; import net.minecraftforge.common.model.TransformationHelper; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -61,7 +59,7 @@ public static SimpleBakedModel.Builder createSimpleModelBuilder(boolean smoothLi return SimpleBakedModel$BuilderAccessor.antimatter$create(smoothLighting, sideLit, isShadedInGui, transforms, overrides); } - public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos){ + public static List getQuadsFromBaked(BakedModel model, BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos){ if (model instanceof IAntimatterBakedModel antimatterBaked){ return antimatterBaked.getQuads(state, side, rand, level, pos); } else { diff --git a/forge/src/main/java/muramasa/antimatter/common/event/forge/ForgeCommonEvents.java b/forge/src/main/java/muramasa/antimatter/common/event/forge/ForgeCommonEvents.java index a9086bcab..1bb0ce680 100644 --- a/forge/src/main/java/muramasa/antimatter/common/event/forge/ForgeCommonEvents.java +++ b/forge/src/main/java/muramasa/antimatter/common/event/forge/ForgeCommonEvents.java @@ -1,49 +1,24 @@ package muramasa.antimatter.common.event.forge; -import earth.terrarium.botarium.common.energy.base.EnergyContainer; -import earth.terrarium.botarium.common.fluid.base.FluidContainer; -import earth.terrarium.botarium.forge.energy.ForgeEnergyContainer; -import earth.terrarium.botarium.forge.fluid.ForgeFluidContainer; -import earth.terrarium.botarium.forge.fluid.ForgeFluidHandler; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.capability.Holder; -import muramasa.antimatter.capability.forge.AntimatterCaps; import muramasa.antimatter.common.event.CommonEvents; -import muramasa.antimatter.cover.CoverDynamo; -import muramasa.antimatter.cover.CoverEnergy; -import muramasa.antimatter.cover.ICover; import muramasa.antimatter.data.AntimatterMaterialTypes; -import muramasa.antimatter.item.IFluidItem; import muramasa.antimatter.material.Material; import muramasa.antimatter.ore.BlockOre; import muramasa.antimatter.pipe.FluidPipeTicker; import muramasa.antimatter.structure.StructureCache; -import muramasa.antimatter.tile.TileEntityFakeBlock; -import muramasa.antimatter.tile.TileEntityMachine; -import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; -import muramasa.antimatter.tile.multi.TileEntityHatch; -import muramasa.antimatter.tile.pipe.TileEntityCable; -import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; -import muramasa.antimatter.tile.pipe.TileEntityPipe; import muramasa.antimatter.worldgen.AntimatterWorldGenerator; import net.minecraft.core.Direction; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.Container; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraftforge.client.event.RecipesUpdatedEvent; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; -import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.event.*; import net.minecraftforge.event.entity.player.PlayerContainerEvent; import net.minecraftforge.event.entity.player.PlayerEvent; @@ -52,28 +27,10 @@ import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.InvWrapper; import net.minecraftforge.server.ServerLifecycleHooks; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import tesseract.api.forge.Provider; -import tesseract.api.forge.TesseractCaps; -import tesseract.api.forge.wrapper.ExtendedContainerWrapper; -import tesseract.api.gt.IEnergyHandler; -import tesseract.api.item.ExtendedItemContainer; -import tesseract.api.rf.IRFNode; - -import java.util.Optional; import static muramasa.antimatter.material.Material.NULL; -import static net.minecraftforge.fluids.capability.CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY; -import static net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY; @Mod.EventBusSubscriber(modid = Ref.ID) public class ForgeCommonEvents { diff --git a/forge/src/main/java/muramasa/antimatter/common/event/forge/ModCommonEvents.java b/forge/src/main/java/muramasa/antimatter/common/event/forge/ModCommonEvents.java index 0ed93a9da..ee1f2d074 100644 --- a/forge/src/main/java/muramasa/antimatter/common/event/forge/ModCommonEvents.java +++ b/forge/src/main/java/muramasa/antimatter/common/event/forge/ModCommonEvents.java @@ -5,14 +5,12 @@ import muramasa.antimatter.datagen.AntimatterDynamics; import net.devtech.arrp.api.RRPEvent; import net.devtech.arrp.api.RRPInitEvent; -import net.minecraft.server.packs.PackType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.config.ModConfigEvent; -import net.minecraftforge.fml.loading.FMLEnvironment; @Mod.EventBusSubscriber(modid = Ref.ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ModCommonEvents { diff --git a/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterProvidersEvent.java b/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterProvidersEvent.java index 8934f551f..ea2d9cfe3 100644 --- a/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterProvidersEvent.java +++ b/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterProvidersEvent.java @@ -3,12 +3,9 @@ import muramasa.antimatter.datagen.IAntimatterProvider; import muramasa.antimatter.event.ProvidersEvent; import muramasa.antimatter.registration.IAntimatterRegistrar; -import net.minecraft.data.DataGenerator; -import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.event.IModBusEvent; import java.util.Collection; -import java.util.function.Function; import java.util.function.Supplier; public class AntimatterProvidersEvent extends AntimatterEvent implements IModBusEvent { diff --git a/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterWorldGenEvent.java b/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterWorldGenEvent.java index 5bc054368..268c0d423 100644 --- a/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterWorldGenEvent.java +++ b/forge/src/main/java/muramasa/antimatter/event/forge/AntimatterWorldGenEvent.java @@ -2,9 +2,6 @@ import muramasa.antimatter.event.WorldGenEvent; import muramasa.antimatter.registration.IAntimatterRegistrar; -import muramasa.antimatter.worldgen.vein.old.WorldGenVein; - -import java.util.List; public class AntimatterWorldGenEvent extends AntimatterEvent { diff --git a/forge/src/main/java/muramasa/antimatter/fluid/forge/FluidUtilsImpl.java b/forge/src/main/java/muramasa/antimatter/fluid/forge/FluidUtilsImpl.java index ace4020dc..b7a597d9c 100644 --- a/forge/src/main/java/muramasa/antimatter/fluid/forge/FluidUtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/fluid/forge/FluidUtilsImpl.java @@ -1,7 +1,5 @@ package muramasa.antimatter.fluid.forge; -import earth.terrarium.botarium.common.registry.fluid.BotariumFlowingFluid; -import earth.terrarium.botarium.common.registry.fluid.BotariumSourceFluid; import earth.terrarium.botarium.common.registry.fluid.FluidData; import net.minecraft.world.level.material.FlowingFluid; diff --git a/forge/src/main/java/muramasa/antimatter/forge/AntimatterAPIImpl.java b/forge/src/main/java/muramasa/antimatter/forge/AntimatterAPIImpl.java index 0bb461c6b..a234f1884 100644 --- a/forge/src/main/java/muramasa/antimatter/forge/AntimatterAPIImpl.java +++ b/forge/src/main/java/muramasa/antimatter/forge/AntimatterAPIImpl.java @@ -1,11 +1,6 @@ package muramasa.antimatter.forge; -import muramasa.antimatter.registration.forge.AntimatterRegistration; import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.fml.loading.LoadingModList; -import net.minecraftforge.fml.loading.moddiscovery.ModInfo; import net.minecraftforge.registries.IForgeRegistryEntry; public class AntimatterAPIImpl { diff --git a/forge/src/main/java/muramasa/antimatter/forge/AntimatterImpl.java b/forge/src/main/java/muramasa/antimatter/forge/AntimatterImpl.java index c71411f8c..714170e94 100644 --- a/forge/src/main/java/muramasa/antimatter/forge/AntimatterImpl.java +++ b/forge/src/main/java/muramasa/antimatter/forge/AntimatterImpl.java @@ -1,12 +1,8 @@ package muramasa.antimatter.forge; -import muramasa.antimatter.Antimatter; -import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.AntimatterConfig; +import muramasa.antimatter.*; import muramasa.antimatter.datagen.AntimatterDynamics; -import muramasa.antimatter.AntimatterMod; -import muramasa.antimatter.Ref; import muramasa.antimatter.event.forge.AntimatterCraftingEvent; import muramasa.antimatter.event.forge.AntimatterProvidersEvent; import muramasa.antimatter.integration.Integrations; diff --git a/forge/src/main/java/muramasa/antimatter/gui/forge/MenuHandlerImpl.java b/forge/src/main/java/muramasa/antimatter/gui/forge/MenuHandlerImpl.java index 5b33e116a..09c436dca 100644 --- a/forge/src/main/java/muramasa/antimatter/gui/forge/MenuHandlerImpl.java +++ b/forge/src/main/java/muramasa/antimatter/gui/forge/MenuHandlerImpl.java @@ -1,7 +1,6 @@ package muramasa.antimatter.gui.forge; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.MenuType; diff --git a/forge/src/main/java/muramasa/antimatter/integration/ct/forge/CrafttweakerUtilsImpl.java b/forge/src/main/java/muramasa/antimatter/integration/ct/forge/CrafttweakerUtilsImpl.java index 318df03f3..140a84f05 100644 --- a/forge/src/main/java/muramasa/antimatter/integration/ct/forge/CrafttweakerUtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/integration/ct/forge/CrafttweakerUtilsImpl.java @@ -2,7 +2,6 @@ import com.blamejared.crafttweaker.api.fluid.IFluidStack; import earth.terrarium.botarium.common.fluid.base.FluidHolder; -import earth.terrarium.botarium.common.fluid.utils.FluidHooks; import earth.terrarium.botarium.forge.fluid.ForgeFluidHolder; public class CrafttweakerUtilsImpl { diff --git a/forge/src/main/java/muramasa/antimatter/integration/jei/forge/AntimatterJEIPluginImpl.java b/forge/src/main/java/muramasa/antimatter/integration/jei/forge/AntimatterJEIPluginImpl.java index c2f6aceab..450d20e11 100644 --- a/forge/src/main/java/muramasa/antimatter/integration/jei/forge/AntimatterJEIPluginImpl.java +++ b/forge/src/main/java/muramasa/antimatter/integration/jei/forge/AntimatterJEIPluginImpl.java @@ -2,7 +2,6 @@ import earth.terrarium.botarium.common.fluid.base.FluidHolder; import earth.terrarium.botarium.forge.fluid.ForgeFluidHolder; -import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.forge.ForgeTypes; import mezz.jei.api.gui.builder.IRecipeSlotBuilder; import mezz.jei.api.ingredients.IIngredientType; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/CapabilityManagerMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/CapabilityManagerMixin.java index 3c5135700..8fd6549b4 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/CapabilityManagerMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/CapabilityManagerMixin.java @@ -4,7 +4,6 @@ import muramasa.antimatter.capability.forge.AntimatterCaps; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.energy.EnergyStorage; import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.IItemHandler; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapedSerializerMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapedSerializerMixin.java index 718c44bbc..256215b9e 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapedSerializerMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapedSerializerMixin.java @@ -1,8 +1,6 @@ package muramasa.antimatter.mixin.forge; -import muramasa.antimatter.recipe.container.ContainerItemShapedRecipe; import muramasa.antimatter.recipe.container.ContainerItemShapedRecipe.Serializer; -import muramasa.antimatter.recipe.material.MaterialSerializer; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.registries.IForgeRegistryEntry; import org.jetbrains.annotations.Nullable; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/MaterialSerializerMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/MaterialSerializerMixin.java index f7572fbcc..e82240477 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/MaterialSerializerMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/MaterialSerializerMixin.java @@ -1,10 +1,7 @@ package muramasa.antimatter.mixin.forge; import muramasa.antimatter.recipe.material.MaterialSerializer; -import muramasa.antimatter.recipe.serializer.AntimatterRecipeSerializer; -import net.minecraft.client.renderer.item.ItemProperties; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.registries.ForgeRegistryEntry; import net.minecraftforge.registries.IForgeRegistryEntry; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/PropertyIngredientMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/PropertyIngredientMixin.java index 87254a488..36b5434a2 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/PropertyIngredientMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/PropertyIngredientMixin.java @@ -3,7 +3,6 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.recipe.ingredient.PropertyIngredient; -import muramasa.antimatter.registration.forge.AntimatterRegistration; import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.common.crafting.IIngredientSerializer; import org.spongepowered.asm.mixin.Mixin; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/RecipeIngredientMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/RecipeIngredientMixin.java index c7ba992f9..51350f8f7 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/RecipeIngredientMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/RecipeIngredientMixin.java @@ -3,7 +3,6 @@ import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.Ref; import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.registration.forge.AntimatterRegistration; import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.common.crafting.IIngredientSerializer; import org.spongepowered.asm.mixin.Mixin; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityFakeBlockMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityFakeBlockMixin.java index 4a3373272..fb4f8dbc8 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityFakeBlockMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityFakeBlockMixin.java @@ -16,7 +16,6 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import java.util.EnumMap; import java.util.Map; @Mixin(TileEntityFakeBlock.class) diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityMachineMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityMachineMixin.java index 21a52f142..6619479b3 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityMachineMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityMachineMixin.java @@ -11,19 +11,16 @@ import muramasa.antimatter.cover.CoverEnergy; import muramasa.antimatter.cover.ICover; import muramasa.antimatter.forge.duck.IFakeTileCap; -import muramasa.antimatter.tile.TileEntityBase; import muramasa.antimatter.tile.TileEntityMachine; import muramasa.antimatter.tile.TileEntityTickable; import muramasa.antimatter.tile.multi.TileEntityBasicMultiMachine; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; -import net.minecraftforge.energy.EnergyStorage; import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityPipeMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityPipeMixin.java index 987d8e4f5..0b6300592 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityPipeMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/TileEntityPipeMixin.java @@ -8,7 +8,6 @@ import muramasa.antimatter.capability.pipe.PipeCoverHandler; import muramasa.antimatter.pipe.types.PipeType; import muramasa.antimatter.tile.TileEntityTickable; -import muramasa.antimatter.tile.pipe.TileEntityCable; import muramasa.antimatter.tile.pipe.TileEntityFluidPipe; import muramasa.antimatter.tile.pipe.TileEntityPipe; import net.minecraft.core.BlockPos; diff --git a/forge/src/main/java/muramasa/antimatter/mixin/forge/client/IAntimatterBakedModelMixin.java b/forge/src/main/java/muramasa/antimatter/mixin/forge/client/IAntimatterBakedModelMixin.java index 28da3d9cc..c9cdcaf61 100644 --- a/forge/src/main/java/muramasa/antimatter/mixin/forge/client/IAntimatterBakedModelMixin.java +++ b/forge/src/main/java/muramasa/antimatter/mixin/forge/client/IAntimatterBakedModelMixin.java @@ -13,11 +13,10 @@ import net.minecraftforge.client.model.data.IModelData; import net.minecraftforge.client.model.data.ModelDataMap; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Random; @@ -28,14 +27,14 @@ public interface IAntimatterBakedModelMixin extends IDynamicBakedModel { boolean hasOnlyGeneralQuads(); @Shadow - List getQuads(BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos); + List getQuads(BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull BlockAndTintGetter level, @NotNull BlockPos pos); @Shadow - TextureAtlasSprite getParticleIcon(@Nonnull BlockAndTintGetter level, @Nonnull BlockPos pos); + TextureAtlasSprite getParticleIcon(@NotNull BlockAndTintGetter level, @NotNull BlockPos pos); @NotNull @Override - default List getQuads(@javax.annotation.Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData data){ + default List getQuads(@org.jetbrains.annotations.Nullable BlockState state, @Nullable Direction side, @NotNull Random rand, @NotNull IModelData data){ BlockAndTintGetter world = data.getData(AntimatterModelProperties.WORLD); BlockPos pos = data.getData(AntimatterModelProperties.POS); if (world == null || pos == null) return Collections.emptyList(); diff --git a/forge/src/main/java/muramasa/antimatter/recipe/forge/RecipeUtilImpl.java b/forge/src/main/java/muramasa/antimatter/recipe/forge/RecipeUtilImpl.java index 8de227419..5cd9ad051 100644 --- a/forge/src/main/java/muramasa/antimatter/recipe/forge/RecipeUtilImpl.java +++ b/forge/src/main/java/muramasa/antimatter/recipe/forge/RecipeUtilImpl.java @@ -4,8 +4,6 @@ import muramasa.antimatter.datagen.builder.AntimatterShapedRecipeBuilder; import muramasa.antimatter.recipe.forge.condition.ConfigCondition; import muramasa.antimatter.recipe.forge.condition.TomlConfigCondition; -import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.core.Registry; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.nbt.CompoundTag; diff --git a/forge/src/main/java/muramasa/antimatter/registration/forge/AntimatterRegistration.java b/forge/src/main/java/muramasa/antimatter/registration/forge/AntimatterRegistration.java index e03c6ddb0..6fef4c2c6 100644 --- a/forge/src/main/java/muramasa/antimatter/registration/forge/AntimatterRegistration.java +++ b/forge/src/main/java/muramasa/antimatter/registration/forge/AntimatterRegistration.java @@ -1,31 +1,20 @@ package muramasa.antimatter.registration.forge; import com.google.gson.JsonObject; -import muramasa.antimatter.Antimatter; -import muramasa.antimatter.AntimatterAPI; -import muramasa.antimatter.Data; -import muramasa.antimatter.MaterialDataInit; -import muramasa.antimatter.Ref; +import muramasa.antimatter.*; import muramasa.antimatter.block.AntimatterItemBlock; -import muramasa.antimatter.datagen.AntimatterDynamics; import muramasa.antimatter.event.MaterialEvent; import muramasa.antimatter.fluid.AntimatterFluid; import muramasa.antimatter.integration.kubejs.AntimatterKubeJS; import muramasa.antimatter.recipe.forge.condition.ConfigCondition; import muramasa.antimatter.recipe.forge.condition.TomlConfigCondition; import muramasa.antimatter.recipe.ingredient.IAntimatterIngredientSerializer; -import muramasa.antimatter.recipe.ingredient.IngredientSerializer; -import muramasa.antimatter.recipe.ingredient.PropertyIngredient; -import muramasa.antimatter.recipe.ingredient.RecipeIngredient; -import muramasa.antimatter.recipe.material.MaterialSerializer; -import muramasa.antimatter.recipe.serializer.AntimatterRecipeSerializer; import muramasa.antimatter.registration.*; import muramasa.antimatter.tool.AntimatterToolType; import muramasa.antimatter.tool.IAntimatterArmor; import muramasa.antimatter.tool.IAntimatterTool; import muramasa.antimatter.tool.armor.AntimatterArmorType; import muramasa.antimatter.worldgen.feature.IAntimatterFeature; -import net.minecraft.core.Registry; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvent; @@ -46,7 +35,6 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.IForgeRegistry; -import net.minecraftforge.registries.IForgeRegistryEntry; import java.util.List; diff --git a/forge/src/main/java/muramasa/antimatter/tool/behaviour/forge/BehaviourUtilImpl.java b/forge/src/main/java/muramasa/antimatter/tool/behaviour/forge/BehaviourUtilImpl.java index b9de1cb55..c9c56b5cd 100644 --- a/forge/src/main/java/muramasa/antimatter/tool/behaviour/forge/BehaviourUtilImpl.java +++ b/forge/src/main/java/muramasa/antimatter/tool/behaviour/forge/BehaviourUtilImpl.java @@ -1,6 +1,5 @@ package muramasa.antimatter.tool.behaviour.forge; -import muramasa.antimatter.tool.behaviour.BehaviourUtil; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -9,7 +8,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.ToolAction; -import net.minecraftforge.common.ToolActions; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.player.UseHoeEvent; diff --git a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterCapUtilsImpl.java b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterCapUtilsImpl.java index b250e8578..8992f1772 100644 --- a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterCapUtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterCapUtilsImpl.java @@ -1,9 +1,7 @@ package muramasa.antimatter.util.forge; -import muramasa.antimatter.capability.IComponentHandler; import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.capability.forge.AntimatterCaps; -import muramasa.antimatter.capability.machine.MachineRecipeHandler; import net.minecraft.core.Direction; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPlatformUtilsImpl.java b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPlatformUtilsImpl.java index d1f2225d7..6619ccea0 100644 --- a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPlatformUtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPlatformUtilsImpl.java @@ -1,6 +1,5 @@ package muramasa.antimatter.util.forge; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.mojang.math.Matrix4f; import com.terraformersmc.terraform.utils.TerraformFlammableBlockRegistry; @@ -12,7 +11,10 @@ import muramasa.antimatter.event.CraftingEvent; import muramasa.antimatter.event.ProvidersEvent; import muramasa.antimatter.event.WorldGenEvent; -import muramasa.antimatter.event.forge.*; +import muramasa.antimatter.event.forge.AntimatterCraftingEvent; +import muramasa.antimatter.event.forge.AntimatterLoaderEvent; +import muramasa.antimatter.event.forge.AntimatterProvidersEvent; +import muramasa.antimatter.event.forge.AntimatterWorldGenEvent; import muramasa.antimatter.integration.jei.category.MultiMachineInfoCategory; import muramasa.antimatter.integration.jei.category.MultiMachineInfoPage; import muramasa.antimatter.machine.types.BasicMultiMachine; @@ -23,7 +25,6 @@ import muramasa.antimatter.util.AntimatterPlatformUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.data.DataGenerator; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MinecraftServer; @@ -36,10 +37,8 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.chunk.LevelChunk; import net.minecraft.world.level.material.Fluid; @@ -48,23 +47,19 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; -import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.ModLoader; import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.javafmlmod.FMLModContainer; import net.minecraftforge.fml.loading.FMLEnvironment; import net.minecraftforge.fml.loading.FMLPaths; import net.minecraftforge.fml.util.thread.EffectiveSide; import net.minecraftforge.network.NetworkHooks; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.server.ServerLifecycleHooks; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nullable; import java.nio.file.Path; import java.util.Collection; import java.util.List; diff --git a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPreLaunchUtilImpl.java b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPreLaunchUtilImpl.java index 3738b3960..aa083f0ce 100644 --- a/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPreLaunchUtilImpl.java +++ b/forge/src/main/java/muramasa/antimatter/util/forge/AntimatterPreLaunchUtilImpl.java @@ -1,7 +1,6 @@ package muramasa.antimatter.util.forge; import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.ModLoader; import net.minecraftforge.fml.loading.LoadingModList; import net.minecraftforge.fml.loading.moddiscovery.ModInfo; diff --git a/forge/src/main/java/muramasa/antimatter/util/forge/UtilsImpl.java b/forge/src/main/java/muramasa/antimatter/util/forge/UtilsImpl.java index 08790ecb0..3b8b408d3 100644 --- a/forge/src/main/java/muramasa/antimatter/util/forge/UtilsImpl.java +++ b/forge/src/main/java/muramasa/antimatter/util/forge/UtilsImpl.java @@ -4,7 +4,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; @@ -13,8 +12,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.client.model.ModelDataManager; import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; public class UtilsImpl { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5c42495c8..9b0db5ee8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Thu Jul 02 03:20:41 CEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists