Cleanup @Environment annotations.

This commit is contained in:
modmuss50 2023-02-01 22:30:16 +00:00
parent d305a7f092
commit 4be0031344
14 changed files with 80 additions and 46 deletions

View file

@ -27,8 +27,6 @@ package reborncore.client;
import com.mojang.serialization.Codec;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
@ -49,7 +47,6 @@ import reborncore.common.chunkloading.ChunkLoaderManager;
import reborncore.common.network.ExtendedPacketBuffer;
import reborncore.common.screen.BuiltScreenHandler;
@Environment(EnvType.CLIENT)
public class ClientBoundPacketHandlers {
private static final Logger LOGGER = LoggerFactory.getLogger(ClientBoundPacketHandlers.class);

View file

@ -25,10 +25,12 @@
package reborncore.client;
import com.mojang.blaze3d.systems.RenderSystem;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.*;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.VertexFormat;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.BlockPos;
import reborncore.common.chunkloading.ChunkLoaderManager;
@ -37,7 +39,6 @@ import reborncore.common.network.ServerBoundPackets;
import java.util.ArrayList;
import java.util.List;
@Environment(EnvType.CLIENT)
public class ClientChunkManager {
private static final List<ChunkLoaderManager.LoadedChunk> loadedChunks = new ArrayList<>();

View file

@ -25,8 +25,6 @@
package reborncore.client;
import com.mojang.serialization.Codec;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.minecraft.util.Identifier;
import reborncore.common.network.ExtendedPacketBuffer;
@ -34,7 +32,6 @@ import reborncore.common.network.IdentifiedPacket;
import java.util.function.Consumer;
@Environment(EnvType.CLIENT)
public class ClientNetworkManager {
public static void registerClientBoundHandler(Identifier identifier, ClientPlayNetworking.PlayChannelHandler handler) {
ClientPlayNetworking.registerGlobalReceiver(identifier, handler);

View file

@ -25,8 +25,6 @@
package reborncore.client.gui.builder;
import com.mojang.blaze3d.systems.RenderSystem;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
@ -246,7 +244,6 @@ public class GuiBase<T extends ScreenHandler> extends HandledScreen<T> {
return true;
}
@Environment(EnvType.CLIENT)
@Override
protected void drawForeground(MatrixStack matrixStack, int mouseX, int mouseY) {
drawTitle(matrixStack);

View file

@ -24,8 +24,6 @@
package reborncore.client.multiblock;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.BlockState;
import net.minecraft.block.FluidBlock;
import net.minecraft.client.MinecraftClient;
@ -49,7 +47,6 @@ import java.util.function.BiPredicate;
/**
* Renders a hologram
*/
@Environment(EnvType.CLIENT)
public
record HologramRenderer(BlockRenderView view, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider,
float scale) implements MultiblockWriter {

View file

@ -25,8 +25,6 @@
package reborncore.common.screen.slot;
import com.mojang.datafixers.util.Pair;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.inventory.Inventory;
import net.minecraft.screen.PlayerScreenHandler;
import net.minecraft.util.Identifier;
@ -54,7 +52,6 @@ public class SpriteSlot extends FilteredSlot {
@Override
@Nullable
@Environment(EnvType.CLIENT)
public Pair<Identifier, Identifier> getBackgroundSprite() {
return Pair.of(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, spriteName);
}

View file

@ -24,8 +24,6 @@
package techreborn.client;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
import net.minecraft.util.Identifier;
@ -40,10 +38,33 @@ import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity;
import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity;
import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity;
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
import techreborn.blockentity.machine.multiblock.*;
import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity;
import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity;
import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity;
import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity;
import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity;
import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity;
import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity;
import techreborn.blockentity.machine.tier0.block.BlockBreakerBlockEntity;
import techreborn.blockentity.machine.tier0.block.BlockPlacerBlockEntity;
import techreborn.blockentity.machine.tier1.*;
import techreborn.blockentity.machine.tier1.AlloySmelterBlockEntity;
import techreborn.blockentity.machine.tier1.AssemblingMachineBlockEntity;
import techreborn.blockentity.machine.tier1.AutoCraftingTableBlockEntity;
import techreborn.blockentity.machine.tier1.ChemicalReactorBlockEntity;
import techreborn.blockentity.machine.tier1.CompressorBlockEntity;
import techreborn.blockentity.machine.tier1.ElectricFurnaceBlockEntity;
import techreborn.blockentity.machine.tier1.ElevatorBlockEntity;
import techreborn.blockentity.machine.tier1.ExtractorBlockEntity;
import techreborn.blockentity.machine.tier1.GreenhouseControllerBlockEntity;
import techreborn.blockentity.machine.tier1.GrinderBlockEntity;
import techreborn.blockentity.machine.tier1.IndustrialElectrolyzerBlockEntity;
import techreborn.blockentity.machine.tier1.PlayerDetectorBlockEntity;
import techreborn.blockentity.machine.tier1.RecyclerBlockEntity;
import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity;
import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity;
import techreborn.blockentity.machine.tier1.SolidCanningMachineBlockEntity;
import techreborn.blockentity.machine.tier1.WireMillBlockEntity;
import techreborn.blockentity.machine.tier2.FishingStationBlockEntity;
import techreborn.blockentity.machine.tier2.LaunchpadBlockEntity;
import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity;
@ -57,13 +78,61 @@ import techreborn.blockentity.storage.energy.idsu.InterdimensionalSUBlockEntity;
import techreborn.blockentity.storage.energy.lesu.LapotronicSUBlockEntity;
import techreborn.blockentity.storage.fluid.TankUnitBaseBlockEntity;
import techreborn.blockentity.storage.item.StorageUnitBaseBlockEntity;
import techreborn.client.gui.*;
import techreborn.client.gui.GuiAESU;
import techreborn.client.gui.GuiAlloyFurnace;
import techreborn.client.gui.GuiAlloySmelter;
import techreborn.client.gui.GuiAssemblingMachine;
import techreborn.client.gui.GuiAutoCrafting;
import techreborn.client.gui.GuiBatbox;
import techreborn.client.gui.GuiBlastFurnace;
import techreborn.client.gui.GuiBlockBreaker;
import techreborn.client.gui.GuiBlockPlacer;
import techreborn.client.gui.GuiCentrifuge;
import techreborn.client.gui.GuiChargeBench;
import techreborn.client.gui.GuiChemicalReactor;
import techreborn.client.gui.GuiChunkLoader;
import techreborn.client.gui.GuiCompressor;
import techreborn.client.gui.GuiDieselGenerator;
import techreborn.client.gui.GuiDistillationTower;
import techreborn.client.gui.GuiElectricFurnace;
import techreborn.client.gui.GuiElevator;
import techreborn.client.gui.GuiExtractor;
import techreborn.client.gui.GuiFishingStation;
import techreborn.client.gui.GuiFluidReplicator;
import techreborn.client.gui.GuiFusionReactor;
import techreborn.client.gui.GuiGasTurbine;
import techreborn.client.gui.GuiGenerator;
import techreborn.client.gui.GuiGreenhouseController;
import techreborn.client.gui.GuiGrinder;
import techreborn.client.gui.GuiIDSU;
import techreborn.client.gui.GuiImplosionCompressor;
import techreborn.client.gui.GuiIndustrialElectrolyzer;
import techreborn.client.gui.GuiIndustrialGrinder;
import techreborn.client.gui.GuiIndustrialSawmill;
import techreborn.client.gui.GuiIronFurnace;
import techreborn.client.gui.GuiLESU;
import techreborn.client.gui.GuiLaunchpad;
import techreborn.client.gui.GuiMFE;
import techreborn.client.gui.GuiMFSU;
import techreborn.client.gui.GuiMatterFabricator;
import techreborn.client.gui.GuiPlasmaGenerator;
import techreborn.client.gui.GuiPlayerDetector;
import techreborn.client.gui.GuiRecycler;
import techreborn.client.gui.GuiRollingMachine;
import techreborn.client.gui.GuiScrapboxinator;
import techreborn.client.gui.GuiSemifluidGenerator;
import techreborn.client.gui.GuiSolar;
import techreborn.client.gui.GuiSolidCanningMachine;
import techreborn.client.gui.GuiStorageUnit;
import techreborn.client.gui.GuiTankUnit;
import techreborn.client.gui.GuiThermalGenerator;
import techreborn.client.gui.GuiVacuumFreezer;
import techreborn.client.gui.GuiWireMill;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@Environment(EnvType.CLIENT)
public class ClientGuiType<T extends BlockEntity> {
public static final Map<Identifier, ClientGuiType<?>> TYPES = new HashMap<>();

View file

@ -24,8 +24,6 @@
package techreborn.client;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
@ -34,7 +32,6 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.text.Text;
import reborncore.common.screen.BuiltScreenHandler;
@Environment(EnvType.CLIENT)
public interface GuiFactory<T extends BlockEntity> extends HandledScreens.Provider<BuiltScreenHandler, HandledScreen<BuiltScreenHandler>> {
HandledScreen<?> create(int syncId, PlayerEntity playerEntity, T blockEntity);

View file

@ -27,8 +27,6 @@ package techreborn.client.compat.rei;
import com.google.common.collect.Lists;
import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.api.client.registry.screen.ExclusionZonesProvider;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.slot.SlotConfigGui;
import reborncore.client.gui.builder.slot.elements.ConfigSlotElement;
@ -36,7 +34,6 @@ import reborncore.client.gui.builder.slot.elements.ConfigSlotElement;
import java.util.Collection;
import java.util.Collections;
@Environment(EnvType.CLIENT)
public class SlotConfigExclusionZones implements ExclusionZonesProvider<GuiBase<?>> {
@Override

View file

@ -26,8 +26,6 @@ package techreborn.client.events;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntity;
@ -58,7 +56,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
@Environment(EnvType.CLIENT)
public class StackToolTipHandler implements ItemTooltipCallback {
public static final Map<Item, Boolean> ITEM_ID = Maps.newHashMap();

View file

@ -24,8 +24,6 @@
package techreborn.client.gui;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
@ -33,7 +31,6 @@ import reborncore.client.gui.guibuilder.GuiBuilder;
import reborncore.common.screen.BuiltScreenHandler;
import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity;
@Environment(EnvType.CLIENT)
public class GuiDieselGenerator extends GuiBase<BuiltScreenHandler> {
DieselGeneratorBlockEntity blockEntity;

View file

@ -24,8 +24,6 @@
package techreborn.client.gui;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
@ -36,7 +34,6 @@ import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
/**
* @author drcrazy
*/
@Environment(EnvType.CLIENT)
public class GuiPlasmaGenerator extends GuiBase<BuiltScreenHandler> {
PlasmaGeneratorBlockEntity blockEntity;

View file

@ -25,8 +25,6 @@
package techreborn.client.render;
import com.google.common.base.Charsets;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.model.json.JsonUnbakedModel;
import net.minecraft.client.render.model.json.ModelTransformation;
@ -39,7 +37,6 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
@Environment(EnvType.CLIENT)
public class ModelHelper {
public static final ModelTransformation DEFAULT_ITEM_TRANSFORMS = loadTransformFromJson(new Identifier("minecraft:models/item/generated"));

View file

@ -27,8 +27,6 @@ package techreborn.items.tool.industrial;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EquipmentSlot;
@ -101,7 +99,6 @@ public class NanosaberItem extends SwordItem implements RcEnergyItem {
return true;
}
@Environment(EnvType.CLIENT)
@Override
public void appendTooltip(ItemStack stack, @Nullable World worldIn, List<Text> tooltip, TooltipContext flagIn) {
ItemUtils.buildActiveTooltip(stack, tooltip);