Fix build.

This commit is contained in:
modmuss50 2023-02-23 16:03:34 +00:00
parent 759c3fbfc3
commit 7c3beb2d1a
16 changed files with 27 additions and 23 deletions

View file

@ -32,14 +32,12 @@ import net.minecraft.client.render.RenderLayers;
import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.BlockRenderManager; 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.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.random.Random; import net.minecraft.util.math.random.Random;
import net.minecraft.world.BlockRenderView;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
import reborncore.common.blockentity.MultiblockWriter; import reborncore.common.blockentity.MultiblockWriter;

View file

@ -136,11 +136,11 @@ public class FluidUtils {
} }
public static boolean isContainer(ItemStack stack) { 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) { 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; if (fluidStorage == null) return false;
// Use current transaction in case this check is nested in a transfer operation. // 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<Fluid> predicate) { public static boolean containsMatchingFluid(ItemStack stack, Predicate<Fluid> predicate) {
var fluidStorage = ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM); var fluidStorage = ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM);
if (fluidStorage == null) return false; if (fluidStorage == null) return false;
// Use current transaction in case this check is nested in a transfer operation. // Use current transaction in case this check is nested in a transfer operation.

View file

@ -31,7 +31,6 @@ import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRenderer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; 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.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -26,7 +26,6 @@ package techreborn.client.render.entitys;
import net.minecraft.client.model.Model; import net.minecraft.client.model.Model;
import net.minecraft.client.model.ModelPart; import net.minecraft.client.model.ModelPart;
import net.minecraft.client.model.ModelPartBuilder;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.VertexConsumerProvider;

View file

@ -31,7 +31,6 @@ import net.minecraft.block.entity.BlockEntityTicker;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
@ -39,7 +38,6 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.particle.ParticleTypes; import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents; import net.minecraft.sound.SoundEvents;
import net.minecraft.state.StateManager; import net.minecraft.state.StateManager;

View file

@ -27,12 +27,9 @@ package techreborn.blocks.generator;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemUsageContext; import net.minecraft.item.ItemUsageContext;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.BlockHitResult;

View file

@ -25,7 +25,6 @@
package techreborn.blocks.misc; package techreborn.blocks.misc;
import net.minecraft.block.ButtonBlock; import net.minecraft.block.ButtonBlock;
import net.minecraft.sound.SoundEvents;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;

View file

@ -25,7 +25,6 @@
package techreborn.blocks.misc; package techreborn.blocks.misc;
import net.minecraft.block.DoorBlock; import net.minecraft.block.DoorBlock;
import net.minecraft.sound.SoundEvents;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;

View file

@ -25,7 +25,6 @@
package techreborn.blocks.misc; package techreborn.blocks.misc;
import net.minecraft.block.PressurePlateBlock; import net.minecraft.block.PressurePlateBlock;
import net.minecraft.sound.SoundEvents;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;

View file

@ -25,7 +25,6 @@
package techreborn.blocks.misc; package techreborn.blocks.misc;
import net.minecraft.block.TrapdoorBlock; import net.minecraft.block.TrapdoorBlock;
import net.minecraft.sound.SoundEvents;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;

View file

@ -27,13 +27,11 @@ package techreborn.events;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.Item.Settings; import net.minecraft.item.Item.Settings;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundEvents;
import reborncore.RebornRegistry; import reborncore.RebornRegistry;
import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.powerSystem.RcEnergyTier;
import team.reborn.energy.api.EnergyStorage; import team.reborn.energy.api.EnergyStorage;

View file

@ -24,7 +24,6 @@
package techreborn.init; package techreborn.init;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial; import net.minecraft.item.ArmorMaterial;
import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.Ingredient;

View file

@ -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; package techreborn.init;
import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.damage.DamageSource;

View file

@ -25,7 +25,6 @@
package techreborn.items.armor; package techreborn.items.armor;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial; import net.minecraft.item.ArmorMaterial;

View file

@ -24,7 +24,6 @@
package techreborn.items.armor; package techreborn.items.armor;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -26,8 +26,6 @@ package techreborn.items.tool.industrial;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.LivingEntity; 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.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;