Skip to content

Commit

Permalink
Get compiling again
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Jan 8, 2024
1 parent 340bb41 commit dc8d28b
Show file tree
Hide file tree
Showing 79 changed files with 1,095 additions and 1,017 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package org.violetmoon.quark.addons.oddities.block.be;

import java.util.Random;

import org.jetbrains.annotations.NotNull;
import org.violetmoon.zeta.util.MiscUtil;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
Expand All @@ -13,11 +19,6 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.NotNull;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import java.util.Random;

public abstract class AbstractEnchantingTableBlockEntity extends SimpleInventoryBlockEntity implements Nameable {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
package org.violetmoon.quark.addons.oddities.block.be;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Random;
import java.util.function.Predicate;

import org.jetbrains.annotations.NotNull;
import org.joml.Vector3f;
import org.violetmoon.quark.addons.oddities.block.pipe.BasePipeBlock;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.quark.base.handler.QuarkSounds;
import org.violetmoon.zeta.util.MiscUtil;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis;
Expand Down Expand Up @@ -28,18 +47,6 @@
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.common.capabilities.ForgeCapabilities;

import org.jetbrains.annotations.NotNull;
import org.joml.Vector3f;

import org.violetmoon.quark.addons.oddities.block.pipe.BasePipeBlock;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.quark.base.handler.QuarkSounds;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import java.util.*;
import java.util.function.Predicate;

public class PipeBlockEntity extends SimpleInventoryBlockEntity {

public PipeBlockEntity(BlockPos pos, BlockState state) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
package org.violetmoon.quark.addons.oddities.block.be;

import java.util.HashMap;
import java.util.Map;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.block.TinyPotatoBlock;
import org.violetmoon.quark.addons.oddities.module.TinyPotatoModule;
import org.violetmoon.quark.addons.oddities.util.TinyPotatoInfo;
import org.violetmoon.quark.base.handler.QuarkSounds;
import org.violetmoon.zeta.util.MiscUtil;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -17,19 +29,6 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import org.violetmoon.quark.addons.oddities.block.TinyPotatoBlock;
import org.violetmoon.quark.addons.oddities.module.TinyPotatoModule;
import org.violetmoon.quark.addons.oddities.util.TinyPotatoInfo;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.quark.base.handler.QuarkSounds;
import org.violetmoon.zeta.util.SimpleInventoryBlockEntity;

import java.util.HashMap;
import java.util.Map;

public class TinyPotatoBlockEntity extends SimpleInventoryBlockEntity implements Nameable {
public static final String TAG_NAME = "name";
public static final String TAG_ANGRY = TinyPotatoBlock.ANGRY;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
package org.violetmoon.quark.addons.oddities.block.pipe;

import java.util.HashSet;
import java.util.Set;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.block.be.PipeBlockEntity;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.RenderLayerRegistry;
import org.violetmoon.zeta.util.MiscUtil;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
Expand All @@ -12,7 +24,11 @@
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.Mirror;
import net.minecraft.world.level.block.Rotation;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityTicker;
import net.minecraft.world.level.block.entity.BlockEntityType;
Expand All @@ -23,18 +39,6 @@
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.block.be.PipeBlockEntity;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.RenderLayerRegistry;

import java.util.HashSet;
import java.util.Set;

import static org.violetmoon.quark.base.handler.MiscUtil.directionProperty;

public abstract class BasePipeBlock extends ZetaBlock implements EntityBlock {

Expand Down Expand Up @@ -155,7 +159,7 @@ public BlockState mirror(@NotNull BlockState state, @NotNull Mirror mirror) {
@Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighbor, LevelAccessor level, BlockPos pos, BlockPos neighborPos) {
PipeBlockEntity.ConnectionType type = PipeBlockEntity.computeConnectionTo(level, pos, direction);
state = state.setValue(directionProperty(direction), allowsFullConnection(type));
state = state.setValue(MiscUtil.directionProperty(direction), allowsFullConnection(type));
return state;
}

Expand Down Expand Up @@ -187,14 +191,14 @@ protected BlockState getTargetState(LevelAccessor level, BlockPos pos) {
for(Direction facing : Direction.values()) {
PipeBlockEntity.ConnectionType type = PipeBlockEntity.computeConnectionTo(level, pos, facing);

newState = newState.setValue(directionProperty(facing), allowsFullConnection(type));
newState = newState.setValue(MiscUtil.directionProperty(facing), allowsFullConnection(type));
}

return newState;
}

public static boolean isConnected(BlockState state, Direction side) {
return state.getValue(directionProperty(side));
return state.getValue(MiscUtil.directionProperty(side));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package org.violetmoon.quark.addons.oddities.block.pipe;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.block.be.PipeBlockEntity;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.util.MiscUtil;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
Expand Down Expand Up @@ -29,15 +36,6 @@
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.PipeBlockEntity;
import org.violetmoon.quark.addons.oddities.module.PipesModule;
import org.violetmoon.zeta.module.ZetaModule;

import static org.violetmoon.quark.base.handler.MiscUtil.directionProperty;

public class CopperPipeBlock extends BasePipeBlock implements SimpleWaterloggedBlock {

private static final VoxelShape CENTER_SHAPE = Shapes.box(0.3125, 0.3125, 0.3125, 0.6875, 0.6875, 0.6875);
Expand Down Expand Up @@ -134,7 +132,7 @@ protected void createBlockStateDefinition(Builder<Block, BlockState> builder) {
public VoxelShape getShape(@NotNull BlockState state, @NotNull BlockGetter worldIn, @NotNull BlockPos pos, @NotNull CollisionContext context) {
int index = 0;
for(Direction dir : Direction.values()) {
if(state.getValue(directionProperty(dir)))
if(state.getValue(MiscUtil.directionProperty(dir)))
index += (1 << dir.ordinal());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
package org.violetmoon.quark.addons.oddities.client.screen;

import com.google.common.collect.Lists;
import com.mojang.blaze3d.systems.RenderSystem;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import java.util.List;

import org.jetbrains.annotations.NotNull;

import org.violetmoon.quark.addons.oddities.inventory.CrateMenu;
import org.violetmoon.quark.addons.oddities.module.CrateModule;
import org.violetmoon.quark.api.IQuarkButtonAllowed;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.client.handler.ClientUtil;
import org.violetmoon.quark.base.client.handler.InventoryButtonHandler;
import org.violetmoon.quark.base.client.handler.InventoryButtonHandler.ButtonTargetType;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.quark.content.client.module.ChestSearchingModule;

import java.util.List;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.systems.RenderSystem;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;

public class CrateScreen extends AbstractContainerScreen<CrateMenu> implements IQuarkButtonAllowed {
private static final ResourceLocation TEXTURE = new ResourceLocation(Quark.MOD_ID, "textures/gui/crate.png");
Expand Down Expand Up @@ -154,14 +153,14 @@ protected void renderBg(@NotNull GuiGraphics guiGraphics, float partialTicks, in
if(!Quark.ZETA.modules.get(ChestSearchingModule.class).searchBarShown()) {
String s = menu.getTotal() + "/" + CrateModule.maxItems;

int color = MiscUtil.Client.getGuiTextColor("crate_count");
int color = ClientUtil.getGuiTextColor("crate_count");
guiGraphics.drawString(font, s, i + this.imageWidth - font.width(s) - 8 - InventoryButtonHandler.getActiveButtons(ButtonTargetType.CONTAINER_INVENTORY).size() * 12, j + 6, color, false);
}
}

@Override
protected void renderLabels(@NotNull GuiGraphics guiGraphics, int mouseX, int mouseY) {
int color = MiscUtil.Client.getGuiTextColor("crate_count");
int color = ClientUtil.getGuiTextColor("crate_count");

guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, color, false);
guiGraphics.drawString(this.font, this.playerInventoryTitle, this.inventoryLabelX, this.inventoryLabelY, color, false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.violetmoon.quark.addons.oddities.client.screen;

import java.util.LinkedList;
import java.util.List;

import org.jetbrains.annotations.NotNull;
import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity;
import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix;
import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix.Piece;
import org.violetmoon.quark.addons.oddities.inventory.MatrixEnchantingMenu;
import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.QuarkClient;
import org.violetmoon.quark.base.client.handler.ClientUtil;
import org.violetmoon.quark.base.network.message.oddities.MatrixEnchanterOperationMessage;

import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;

Expand All @@ -16,21 +30,6 @@
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.entity.player.Inventory;

import org.jetbrains.annotations.NotNull;

import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity;
import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix;
import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix.Piece;
import org.violetmoon.quark.addons.oddities.inventory.MatrixEnchantingMenu;
import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.QuarkClient;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.quark.base.network.message.oddities.MatrixEnchanterOperationMessage;

import java.util.LinkedList;
import java.util.List;

public class MatrixEnchantingScreen extends AbstractContainerScreen<MatrixEnchantingMenu> {

public static final ResourceLocation BACKGROUND = new ResourceLocation(Quark.MOD_ID, "textures/misc/matrix_enchanting.png");
Expand Down Expand Up @@ -128,7 +127,7 @@ protected void renderBg(@NotNull GuiGraphics guiGraphics, float partialTicks, in

@Override
protected void renderLabels(@NotNull GuiGraphics guiGraphics, int mouseX, int mouseY) {
int color = MiscUtil.Client.getGuiTextColor("matrix_enchanting");
int color = ClientUtil.getGuiTextColor("matrix_enchanting");

guiGraphics.drawString(font, enchanter.getDisplayName().getString(), 12, 5, color, false);
guiGraphics.drawString(font, playerInv.getDisplayName().getString(), 8, imageHeight - 96 + 2, color, false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
package org.violetmoon.quark.addons.oddities.magnetsystem;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.piston.PistonBaseBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.PushReaction;
import java.util.HashMap;
import java.util.HashSet;

import org.jetbrains.annotations.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.MagnetBlockEntity;
import org.violetmoon.quark.addons.oddities.module.MagnetsModule;
import org.violetmoon.quark.api.IMagnetMoveAction;
import org.violetmoon.quark.api.IMagnetTracker;
import org.violetmoon.quark.api.QuarkCapabilities;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.handler.RecipeCrawlHandler;
import org.violetmoon.zeta.util.handler.RecipeCrawlHandler;

import java.util.HashMap;
import java.util.HashSet;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.piston.PistonBaseBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.PushReaction;

public class MagnetSystem {

Expand Down
Loading

0 comments on commit dc8d28b

Please sign in to comment.