From 7c3beb2d1a0406fcf38b23fa6209546ca0f61043 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 23 Feb 2023 16:03:34 +0000 Subject: [PATCH] Fix build. --- .../client/multiblock/HologramRenderer.java | 2 -- .../reborncore/common/fluid/FluidUtils.java | 6 ++--- .../render/entitys/StorageUnitRenderer.java | 1 - .../render/entitys/TurbineRenderer.java | 1 - .../techreborn/blocks/cable/CableBlock.java | 2 -- .../generator/BlockFusionControlComputer.java | 3 --- .../blocks/misc/RubberButtonBlock.java | 1 - .../blocks/misc/RubberDoorBlock.java | 1 - .../blocks/misc/RubberPressurePlateBlock.java | 1 - .../blocks/misc/RubberTrapdoorBlock.java | 1 - .../java/techreborn/events/ModRegistry.java | 2 -- .../techreborn/init/TRArmorMaterials.java | 1 - .../java/techreborn/init/TRDamageTypes.java | 24 +++++++++++++++++++ .../techreborn/items/armor/BatpackItem.java | 1 - .../items/armor/CloakingDeviceItem.java | 1 - .../items/tool/industrial/OmniToolItem.java | 2 -- 16 files changed, 27 insertions(+), 23 deletions(-) diff --git a/RebornCore/src/client/java/reborncore/client/multiblock/HologramRenderer.java b/RebornCore/src/client/java/reborncore/client/multiblock/HologramRenderer.java index 95a1e5a19..49a90c5d0 100644 --- a/RebornCore/src/client/java/reborncore/client/multiblock/HologramRenderer.java +++ b/RebornCore/src/client/java/reborncore/client/multiblock/HologramRenderer.java @@ -32,14 +32,12 @@ import net.minecraft.client.render.RenderLayers; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.block.BlockRenderManager; -import net.minecraft.client.render.model.json.ModelTransformation; import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.fluid.FluidState; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; -import net.minecraft.world.BlockRenderView; import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.common.blockentity.MultiblockWriter; diff --git a/RebornCore/src/main/java/reborncore/common/fluid/FluidUtils.java b/RebornCore/src/main/java/reborncore/common/fluid/FluidUtils.java index 69a3e0349..ae93d0aa3 100644 --- a/RebornCore/src/main/java/reborncore/common/fluid/FluidUtils.java +++ b/RebornCore/src/main/java/reborncore/common/fluid/FluidUtils.java @@ -136,11 +136,11 @@ public class FluidUtils { } public static boolean isContainer(ItemStack stack) { - return ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM) != null; + return ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM) != null; } public static boolean isContainerEmpty(ItemStack stack) { - var fluidStorage = ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM); + var fluidStorage = ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM); if (fluidStorage == null) return false; // Use current transaction in case this check is nested in a transfer operation. @@ -156,7 +156,7 @@ public class FluidUtils { } public static boolean containsMatchingFluid(ItemStack stack, Predicate predicate) { - var fluidStorage = ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM); + var fluidStorage = ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM); if (fluidStorage == null) return false; // Use current transaction in case this check is nested in a transfer operation. diff --git a/src/client/java/techreborn/client/render/entitys/StorageUnitRenderer.java b/src/client/java/techreborn/client/render/entitys/StorageUnitRenderer.java index 3ed9695ad..86fc45332 100644 --- a/src/client/java/techreborn/client/render/entitys/StorageUnitRenderer.java +++ b/src/client/java/techreborn/client/render/entitys/StorageUnitRenderer.java @@ -31,7 +31,6 @@ import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; -import net.minecraft.client.render.model.json.ModelTransformation; import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.ItemStack; diff --git a/src/client/java/techreborn/client/render/entitys/TurbineRenderer.java b/src/client/java/techreborn/client/render/entitys/TurbineRenderer.java index 0d69b4d02..f53f638d2 100644 --- a/src/client/java/techreborn/client/render/entitys/TurbineRenderer.java +++ b/src/client/java/techreborn/client/render/entitys/TurbineRenderer.java @@ -26,7 +26,6 @@ package techreborn.client.render.entitys; import net.minecraft.client.model.Model; import net.minecraft.client.model.ModelPart; -import net.minecraft.client.model.ModelPartBuilder; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumerProvider; diff --git a/src/main/java/techreborn/blocks/cable/CableBlock.java b/src/main/java/techreborn/blocks/cable/CableBlock.java index 6d16a5329..3d545ebc5 100644 --- a/src/main/java/techreborn/blocks/cable/CableBlock.java +++ b/src/main/java/techreborn/blocks/cable/CableBlock.java @@ -31,7 +31,6 @@ import net.minecraft.block.entity.BlockEntityTicker; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.FluidState; @@ -39,7 +38,6 @@ import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.particle.ParticleTypes; -import net.minecraft.registry.RegistryKeys; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; diff --git a/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java b/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java index 5bf205891..37e98f0b7 100644 --- a/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java +++ b/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java @@ -27,12 +27,9 @@ package techreborn.blocks.generator; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.Entity; -import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemUsageContext; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; diff --git a/src/main/java/techreborn/blocks/misc/RubberButtonBlock.java b/src/main/java/techreborn/blocks/misc/RubberButtonBlock.java index 36b95419f..f09718149 100644 --- a/src/main/java/techreborn/blocks/misc/RubberButtonBlock.java +++ b/src/main/java/techreborn/blocks/misc/RubberButtonBlock.java @@ -25,7 +25,6 @@ package techreborn.blocks.misc; import net.minecraft.block.ButtonBlock; -import net.minecraft.sound.SoundEvents; import techreborn.init.TRContent; import techreborn.utils.InitUtils; diff --git a/src/main/java/techreborn/blocks/misc/RubberDoorBlock.java b/src/main/java/techreborn/blocks/misc/RubberDoorBlock.java index 1da96915c..69f568f92 100644 --- a/src/main/java/techreborn/blocks/misc/RubberDoorBlock.java +++ b/src/main/java/techreborn/blocks/misc/RubberDoorBlock.java @@ -25,7 +25,6 @@ package techreborn.blocks.misc; import net.minecraft.block.DoorBlock; -import net.minecraft.sound.SoundEvents; import techreborn.init.TRContent; import techreborn.utils.InitUtils; diff --git a/src/main/java/techreborn/blocks/misc/RubberPressurePlateBlock.java b/src/main/java/techreborn/blocks/misc/RubberPressurePlateBlock.java index 32aa1d488..be4f43b8c 100644 --- a/src/main/java/techreborn/blocks/misc/RubberPressurePlateBlock.java +++ b/src/main/java/techreborn/blocks/misc/RubberPressurePlateBlock.java @@ -25,7 +25,6 @@ package techreborn.blocks.misc; import net.minecraft.block.PressurePlateBlock; -import net.minecraft.sound.SoundEvents; import techreborn.init.TRContent; import techreborn.utils.InitUtils; diff --git a/src/main/java/techreborn/blocks/misc/RubberTrapdoorBlock.java b/src/main/java/techreborn/blocks/misc/RubberTrapdoorBlock.java index 390ccee87..e311de5e7 100644 --- a/src/main/java/techreborn/blocks/misc/RubberTrapdoorBlock.java +++ b/src/main/java/techreborn/blocks/misc/RubberTrapdoorBlock.java @@ -25,7 +25,6 @@ package techreborn.blocks.misc; import net.minecraft.block.TrapdoorBlock; -import net.minecraft.sound.SoundEvents; import techreborn.init.TRContent; import techreborn.utils.InitUtils; diff --git a/src/main/java/techreborn/events/ModRegistry.java b/src/main/java/techreborn/events/ModRegistry.java index abea49690..bf6bdd852 100644 --- a/src/main/java/techreborn/events/ModRegistry.java +++ b/src/main/java/techreborn/events/ModRegistry.java @@ -27,13 +27,11 @@ package techreborn.events; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; import net.minecraft.block.*; -import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ArmorItem; import net.minecraft.item.Item; import net.minecraft.item.Item.Settings; import net.minecraft.item.Items; import net.minecraft.sound.BlockSoundGroup; -import net.minecraft.sound.SoundEvents; import reborncore.RebornRegistry; import reborncore.common.powerSystem.RcEnergyTier; import team.reborn.energy.api.EnergyStorage; diff --git a/src/main/java/techreborn/init/TRArmorMaterials.java b/src/main/java/techreborn/init/TRArmorMaterials.java index b05f42a17..93aadbbde 100644 --- a/src/main/java/techreborn/init/TRArmorMaterials.java +++ b/src/main/java/techreborn/init/TRArmorMaterials.java @@ -24,7 +24,6 @@ package techreborn.init; -import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorMaterial; import net.minecraft.recipe.Ingredient; diff --git a/src/main/java/techreborn/init/TRDamageTypes.java b/src/main/java/techreborn/init/TRDamageTypes.java index 648d08654..e64babccb 100644 --- a/src/main/java/techreborn/init/TRDamageTypes.java +++ b/src/main/java/techreborn/init/TRDamageTypes.java @@ -1,3 +1,27 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2023 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package techreborn.init; import net.minecraft.entity.damage.DamageSource; diff --git a/src/main/java/techreborn/items/armor/BatpackItem.java b/src/main/java/techreborn/items/armor/BatpackItem.java index 45c188014..b66fe6fd3 100644 --- a/src/main/java/techreborn/items/armor/BatpackItem.java +++ b/src/main/java/techreborn/items/armor/BatpackItem.java @@ -25,7 +25,6 @@ package techreborn.items.armor; import net.minecraft.entity.Entity; -import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorMaterial; diff --git a/src/main/java/techreborn/items/armor/CloakingDeviceItem.java b/src/main/java/techreborn/items/armor/CloakingDeviceItem.java index c89dad0e9..7424a1353 100644 --- a/src/main/java/techreborn/items/armor/CloakingDeviceItem.java +++ b/src/main/java/techreborn/items/armor/CloakingDeviceItem.java @@ -24,7 +24,6 @@ package techreborn.items.armor; -import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java index 580045e78..a349e9f1d 100644 --- a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java +++ b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java @@ -26,8 +26,6 @@ package techreborn.items.tool.industrial; import net.minecraft.block.BlockState; import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.damage.DamageSources; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack;