Skip to content

Commit

Permalink
fixed remaining build and compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Sep 1, 2024
1 parent 3c40981 commit 4616bd4
Show file tree
Hide file tree
Showing 30 changed files with 52 additions and 74 deletions.
3 changes: 0 additions & 3 deletions common/src/main/java/trinsdar/gt4r/GT4RConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import carbonconfiglib.config.ConfigHandler;
import carbonconfiglib.config.ConfigSection;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.fml.config.ModConfig;
import org.apache.commons.lang3.tuple.Pair;

public class GT4RConfig {
static ConfigHandler CONFIG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.data.GT4RData;
import trinsdar.gt4r.data.SlotTypes;

import javax.annotation.Nullable;

public class BlockEntityDigitalTank extends BlockEntityTank<BlockEntityDigitalTank> {
public BlockEntityDigitalTank(Machine<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluids;
import org.jetbrains.annotations.NotNull;
import tesseract.FluidPlatformUtils;
import tesseract.TesseractCapUtils;
import tesseract.TesseractGraphWrappers;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -245,7 +245,7 @@ public long fillInternal(FluidHolder resource, boolean simulate) {
return fluidHandler.insertFluid(resource, simulate);
}

@Nonnull
@NotNull
@Override
public FluidHolder extractFluid(FluidHolder resource, boolean simulate) {
if (side == DOWN) return ((HeatExchangerFluidHandler)fluidHandler).tanks.get(FluidDirection.OUTPUT).getTank(1).extractFluid(resource, simulate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.util.List;

import static trinsdar.gt4r.data.Materials.Steam;
Expand Down Expand Up @@ -79,7 +79,7 @@ public boolean canInput(Direction direction) {
return false;
}

@Nonnull
@NotNull
@Override
public FluidHolder extractFluid(FluidHolder stack, boolean action) {
return stack.copyHolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.LevelChunk;
import org.jetbrains.annotations.Nullable;
import tesseract.TesseractCapUtils;
import tesseract.api.item.ExtendedItemContainer;
import trinsdar.gt4r.gui.ButtonOverlays;

import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import muramasa.antimatter.machine.types.Machine;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public class BlockEntityQuantumTank extends BlockEntityTank<BlockEntityQuantumTank> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.List;

public class BlockEntityTeleporter extends BlockEntityMachine<BlockEntityTeleporter> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

import static trinsdar.gt4r.cover.ImportExportMode.EXPORT;
import static trinsdar.gt4r.cover.ImportExportMode.IMPORT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
import tesseract.TesseractCapUtils;
import tesseract.api.item.ExtendedItemContainer;
import trinsdar.gt4r.cover.redstone.CoverRedstoneMachineController;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;

Expand Down
3 changes: 1 addition & 2 deletions common/src/main/java/trinsdar/gt4r/cover/CoverCrafting.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

public class CoverCrafting extends BaseCover {


Expand Down
3 changes: 1 addition & 2 deletions common/src/main/java/trinsdar/gt4r/cover/CoverDrain.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import org.jetbrains.annotations.Nullable;
import tesseract.FluidPlatformUtils;
import tesseract.TesseractGraphWrappers;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

import java.util.Optional;

public class CoverDrain extends BaseCover {
Expand Down
3 changes: 1 addition & 2 deletions common/src/main/java/trinsdar/gt4r/cover/CoverDynamoOld.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
import muramasa.antimatter.machine.Tier;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

public class CoverDynamoOld extends CoverDynamo {

public CoverDynamoOld(ICoverHandler<?> source, @Nullable Tier tier, Direction side, CoverFactory factory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
import muramasa.antimatter.machine.Tier;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

public class CoverFusionInput extends CoverInput {
public CoverFusionInput(ICoverHandler<?> source, @Nullable Tier tier, Direction side, CoverFactory factory) {
super(source, tier, side, factory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
import muramasa.antimatter.machine.Tier;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;

import javax.annotation.Nullable;

public class CoverFusionOutput extends CoverOutput {
public CoverFusionOutput(ICoverHandler<?> source, @Nullable Tier tier, Direction side, CoverFactory factory) {
super(source, tier, side, factory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,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;

public class CoverItemtransportValve extends CoverBasicTransport{
public static String ID = "item_transport_valve";
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/trinsdar/gt4r/cover/CoverPump.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.jetbrains.annotations.Nullable;
import tesseract.TesseractCapUtils;
import trinsdar.gt4r.cover.redstone.CoverRedstoneMachineController;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;

Expand Down
3 changes: 1 addition & 2 deletions common/src/main/java/trinsdar/gt4r/cover/CoverSteamVent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import muramasa.antimatter.blockentity.BlockEntityMachine;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.blockentity.single.BlockEntitySteamMachine;

import javax.annotation.Nullable;

public class CoverSteamVent extends BaseCover {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.GT4RRef;
import trinsdar.gt4r.cover.RedstoneMode;

import javax.annotation.Nullable;

public class CoverRedstoneMachineController extends BaseCover {

protected boolean inverted;
Expand Down
10 changes: 4 additions & 6 deletions common/src/main/java/trinsdar/gt4r/data/ToolTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ItemLike;
import org.jetbrains.annotations.NotNull;
import tesseract.TesseractCapUtils;
import tesseract.api.gt.IEnergyHandlerItem;
import tesseract.api.gt.IGTNode;
import trinsdar.gt4r.GT4RRef;
import trinsdar.gt4r.items.IElectricTool;
import trinsdar.gt4r.items.MaterialRockCutter;

import javax.annotation.Nonnull;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import static muramasa.antimatter.material.Material.NULL;
import static net.minecraft.world.level.material.Material.*;
Expand All @@ -46,7 +44,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) {
}

@Override
public Map<String, Object> getFromResult(@Nonnull ItemStack stack) {
public Map<String, Object> getFromResult(@NotNull ItemStack stack) {
CompoundTag nbt = stack.getTag().getCompound(muramasa.antimatter.Ref.TAG_TOOL_DATA);
Material primary = AntimatterAPI.get(Material.class, nbt.getString(muramasa.antimatter.Ref.KEY_TOOL_DATA_PRIMARY_MATERIAL));
Material secondary = AntimatterAPI.get(Material.class, nbt.getString(muramasa.antimatter.Ref.KEY_TOOL_DATA_SECONDARY_MATERIAL));
Expand All @@ -64,7 +62,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) {
}

@Override
public Map<String, Object> getFromResult(@Nonnull ItemStack stack) {
public Map<String, Object> getFromResult(@NotNull ItemStack stack) {
return ImmutableMap.of("energy", getEnergy(stack).getA(), "maxEnergy", getEnergy(stack).getB());
}
});
Expand All @@ -80,7 +78,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) {
}

@Override
public Map<String, Object> getFromResult(@Nonnull ItemStack stack) {
public Map<String, Object> getFromResult(@NotNull ItemStack stack) {
CompoundTag nbt = stack.getTag().getCompound(muramasa.antimatter.Ref.TAG_TOOL_DATA);
Material primary = AntimatterAPI.get(Material.class, nbt.getString(muramasa.antimatter.Ref.KEY_TOOL_DATA_PRIMARY_MATERIAL));
Material secondary = AntimatterAPI.get(Material.class, nbt.getString(muramasa.antimatter.Ref.KEY_TOOL_DATA_SECONDARY_MATERIAL));
Expand Down
7 changes: 3 additions & 4 deletions common/src/main/java/trinsdar/gt4r/gui/slots/SlotCoil.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@
import muramasa.antimatter.blockentity.BlockEntityMachine;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import tesseract.api.item.ExtendedItemContainer;
import trinsdar.gt4r.data.GT4RData;
import trinsdar.gt4r.data.Machines;
import trinsdar.gt4r.data.RecipeMaps;
import trinsdar.gt4r.blockentity.multi.BlockEntityIndustrialBlastFurnace;
import trinsdar.gt4r.blockentity.single.BlockEntitySmelter;

import javax.annotation.Nonnull;

public class SlotCoil extends AbstractSlot<SlotCoil> {
public SlotCoil(SlotType<SlotCoil> type, IGuiHandler tile, ExtendedItemContainer stackHandler, int index, int xPosition, int yPosition) {
super(type, tile, stackHandler, index, xPosition, yPosition);
}

@Override
public boolean mayPlace(@Nonnull ItemStack stack) {
public boolean mayPlace(@NotNull ItemStack stack) {
if (holder instanceof BlockEntitySmelter){
return RecipeMaps.SMELTER_COILS.acceptsItem(stack);
}
Expand All @@ -44,7 +43,7 @@ public int getMaxStackSize() {
}

@Override
public int getMaxStackSize(@Nonnull ItemStack stack) {
public int getMaxStackSize(@NotNull ItemStack stack) {
if (holder instanceof BlockEntitySmelter){
return 6;
}
Expand Down
5 changes: 2 additions & 3 deletions common/src/main/java/trinsdar/gt4r/gui/slots/SlotData.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
import muramasa.antimatter.gui.SlotType;
import muramasa.antimatter.gui.slot.AbstractSlot;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import tesseract.api.item.ExtendedItemContainer;

import javax.annotation.Nonnull;

public class SlotData extends AbstractSlot<SlotData> {
public SlotData(SlotType<SlotData> type, IGuiHandler tile, ExtendedItemContainer stackHandler, int index, int x, int y) {
super(type, tile, stackHandler, index, x, y);
}

@Override
public int getMaxStackSize(@Nonnull ItemStack stack) {
public int getMaxStackSize(@NotNull ItemStack stack) {
return 1;
}

Expand Down
5 changes: 2 additions & 3 deletions common/src/main/java/trinsdar/gt4r/gui/slots/SlotQuantum.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
import net.minecraft.world.inventory.ClickType;
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 SlotQuantum extends AbstractSlot<SlotQuantum> implements IClickableSlot {
public SlotQuantum(SlotType<SlotQuantum> type, IGuiHandler tile, ExtendedItemContainer stackHandler, int index, int x, int y) {
super(type, tile, stackHandler, index, x, y);
Expand Down Expand Up @@ -229,7 +228,7 @@ public int getMaxStackSize() {
}

@Override
public int getMaxStackSize(@Nonnull ItemStack stack) {
public int getMaxStackSize(@NotNull ItemStack stack) {
if (stack.getMaxStackSize() == 1) return 1;
return Integer.MAX_VALUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.network.chat.TextComponent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.blockentity.single.BlockEntityCoalBoiler;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class CoalBoilerFuelWidget extends Widget {
private int fuel = 0, maxFuel = 0;
protected CoalBoilerFuelWidget(@Nonnull GuiInstance gui, @Nullable IGuiElement parent) {
protected CoalBoilerFuelWidget(@NotNull GuiInstance gui, @Nullable IGuiElement parent) {
super(gui, parent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.network.chat.TextComponent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import trinsdar.gt4r.blockentity.single.BlockEntityCoalBoiler;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class CoalBoilerWidget extends Widget {
private int heat = 0, maxHeat = 0;
long water = 0, steam = 0;

protected CoalBoilerWidget(@Nonnull GuiInstance gui, @Nullable IGuiElement parent) {
protected CoalBoilerWidget(@NotNull GuiInstance gui, @Nullable IGuiElement parent) {
super(gui, parent);
}

Expand Down
Loading

0 comments on commit 4616bd4

Please sign in to comment.