Skip to content

Commit

Permalink
(GIANT commit) IQuarkBlock -> IZetaBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
quat1024 committed Nov 11, 2023
1 parent 5bc99b4 commit 2653d7d
Show file tree
Hide file tree
Showing 143 changed files with 1,099 additions and 1,207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.CrateBlockEntity;
import org.violetmoon.quark.addons.oddities.module.CrateModule;
import org.violetmoon.quark.base.block.QuarkBlock;
import org.violetmoon.zeta.module.ZetaModule;

import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
Expand All @@ -33,8 +28,12 @@
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraftforge.network.NetworkHooks;
import org.violetmoon.quark.addons.oddities.block.be.CrateBlockEntity;
import org.violetmoon.quark.addons.oddities.module.CrateModule;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;

public class CrateBlock extends QuarkBlock implements EntityBlock {
public class CrateBlock extends ZetaBlock implements EntityBlock {

public static final BooleanProperty PROPERTY_OPEN = BlockStateProperties.OPEN;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.MagnetBlockEntity;
import org.violetmoon.quark.addons.oddities.block.be.MagnetizedBlockBlockEntity;
import org.violetmoon.quark.addons.oddities.magnetsystem.MagnetSystem;
import org.violetmoon.quark.addons.oddities.module.MagnetsModule;
import org.violetmoon.quark.base.block.QuarkBlock;
import org.violetmoon.zeta.module.ZetaModule;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -36,8 +29,14 @@
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.level.material.PushReaction;
import org.violetmoon.quark.addons.oddities.block.be.MagnetBlockEntity;
import org.violetmoon.quark.addons.oddities.block.be.MagnetizedBlockBlockEntity;
import org.violetmoon.quark.addons.oddities.magnetsystem.MagnetSystem;
import org.violetmoon.quark.addons.oddities.module.MagnetsModule;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;

public class MagnetBlock extends QuarkBlock implements EntityBlock {
public class MagnetBlock extends ZetaBlock implements EntityBlock {

public static final DirectionProperty FACING = BlockStateProperties.FACING;
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity;
import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule;
import org.violetmoon.quark.api.IEnchantmentInfluencer;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.block.IQuarkBlock;
import org.violetmoon.zeta.module.ZetaModule;

import com.mojang.math.Vector3f;

import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.core.particles.DustParticleOptions;
Expand All @@ -38,8 +30,14 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraftforge.network.NetworkHooks;
import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity;
import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule;
import org.violetmoon.quark.api.IEnchantmentInfluencer;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.zeta.block.IZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;

public class MatrixEnchantingTableBlock extends EnchantmentTableBlock implements IQuarkBlock {
public class MatrixEnchantingTableBlock extends EnchantmentTableBlock implements IZetaBlock {

private final ZetaModule module;
private BooleanSupplier enabledSupplier = () -> true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.violetmoon.quark.addons.oddities.block.be.MagnetizedBlockBlockEntity;
import org.violetmoon.quark.addons.oddities.module.MagnetsModule;
import org.violetmoon.quark.base.block.QuarkBlock;
import org.violetmoon.zeta.module.ZetaModule;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
Expand Down Expand Up @@ -40,12 +35,16 @@
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.violetmoon.quark.addons.oddities.block.be.MagnetizedBlockBlockEntity;
import org.violetmoon.quark.addons.oddities.module.MagnetsModule;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;

/**
* @author WireSegal
* Created at 3:05 PM on 2/26/20.
*/
public class MovingMagnetizedBlock extends QuarkBlock implements EntityBlock {
public class MovingMagnetizedBlock extends ZetaBlock implements EntityBlock {
public static final DirectionProperty FACING = PistonHeadBlock.FACING;

public MovingMagnetizedBlock(ZetaModule module) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.violetmoon.quark.addons.oddities.block;

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

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes;
Expand Down Expand Up @@ -37,17 +40,12 @@
import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;

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

import org.violetmoon.quark.addons.oddities.block.be.TinyPotatoBlockEntity;
import org.violetmoon.quark.addons.oddities.item.TinyPotatoBlockItem;
import org.violetmoon.quark.addons.oddities.module.TinyPotatoModule;
import org.violetmoon.quark.base.block.QuarkBlock;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.IZetaBlockItemProvider;
import org.violetmoon.zeta.util.ItemNBTHelper;
Expand All @@ -56,7 +54,7 @@
* @author WireSegal
* Created at 10:16 AM on 3/14/22.
*/
public class TinyPotatoBlock extends QuarkBlock implements SimpleWaterloggedBlock, EntityBlock, IZetaBlockItemProvider {
public class TinyPotatoBlock extends ZetaBlock implements SimpleWaterloggedBlock, EntityBlock, IZetaBlockItemProvider {

public static final DirectionProperty HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING;
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package org.violetmoon.quark.addons.oddities.block.pipe;

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

import javax.annotation.Nonnull;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
Expand All @@ -12,7 +17,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 @@ -25,18 +34,13 @@
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.quark.base.block.QuarkBlock;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.RenderLayerRegistry;

import javax.annotation.Nonnull;

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

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

public abstract class BasePipeBlock extends QuarkBlock implements EntityBlock {
public abstract class BasePipeBlock extends ZetaBlock implements EntityBlock {

protected static final BooleanProperty DOWN = BlockStateProperties.DOWN;
protected static final BooleanProperty UP = BlockStateProperties.UP;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
package org.violetmoon.quark.addons.oddities.module;

import org.violetmoon.quark.addons.oddities.client.screen.BackpackInventoryScreen;
import org.violetmoon.quark.addons.oddities.inventory.BackpackMenu;
import org.violetmoon.quark.addons.oddities.item.BackpackItem;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.QuarkClient;
import org.violetmoon.quark.base.block.QuarkBlock;
import org.violetmoon.quark.base.client.handler.ModelHandler;
import org.violetmoon.quark.base.config.Config;
import org.violetmoon.quark.base.item.QuarkItem;
import org.violetmoon.quark.base.network.QuarkNetwork;
import org.violetmoon.quark.base.network.message.oddities.HandleBackpackMessage;
import org.violetmoon.zeta.client.event.load.ZAddItemColorHandlers;
import org.violetmoon.zeta.client.event.load.ZClientSetup;
import org.violetmoon.zeta.client.event.play.ZScreen;
import org.violetmoon.zeta.client.event.play.ZStartClientTick;
import org.violetmoon.zeta.event.bus.LoadEvent;
import org.violetmoon.zeta.event.bus.PlayEvent;
import org.violetmoon.zeta.event.load.ZCommonSetup;
import org.violetmoon.zeta.event.load.ZRegister;
import org.violetmoon.zeta.event.play.entity.living.ZLivingDrops;
import org.violetmoon.zeta.module.ZetaLoadModule;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.util.Hint;

import net.minecraft.client.Minecraft;
import net.minecraft.client.color.item.ItemColor;
import net.minecraft.client.gui.screens.MenuScreens;
Expand Down Expand Up @@ -52,6 +28,28 @@
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;
import net.minecraftforge.common.extensions.IForgeMenuType;
import org.violetmoon.quark.addons.oddities.client.screen.BackpackInventoryScreen;
import org.violetmoon.quark.addons.oddities.inventory.BackpackMenu;
import org.violetmoon.quark.addons.oddities.item.BackpackItem;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.QuarkClient;
import org.violetmoon.quark.base.client.handler.ModelHandler;
import org.violetmoon.quark.base.config.Config;
import org.violetmoon.quark.base.network.message.oddities.HandleBackpackMessage;
import org.violetmoon.zeta.block.ZetaBlock;
import org.violetmoon.zeta.client.event.load.ZAddItemColorHandlers;
import org.violetmoon.zeta.client.event.load.ZClientSetup;
import org.violetmoon.zeta.client.event.play.ZScreen;
import org.violetmoon.zeta.client.event.play.ZStartClientTick;
import org.violetmoon.zeta.event.bus.LoadEvent;
import org.violetmoon.zeta.event.bus.PlayEvent;
import org.violetmoon.zeta.event.load.ZCommonSetup;
import org.violetmoon.zeta.event.load.ZRegister;
import org.violetmoon.zeta.event.play.entity.living.ZLivingDrops;
import org.violetmoon.zeta.item.ZetaItem;
import org.violetmoon.zeta.module.ZetaLoadModule;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.util.Hint;

@ZetaLoadModule(category = "oddities")
public class BackpackModule extends ZetaModule {
Expand Down Expand Up @@ -81,12 +79,12 @@ public class BackpackModule extends ZetaModule {
@LoadEvent
public final void register(ZRegister event) {
backpack = new BackpackItem(this);
ravager_hide = new QuarkItem("ravager_hide", this, new Item.Properties().rarity(Rarity.RARE).tab(CreativeModeTab.TAB_MATERIALS)).setCondition(() -> enableRavagerHide);
ravager_hide = new ZetaItem("ravager_hide", this, new Item.Properties().rarity(Rarity.RARE).tab(CreativeModeTab.TAB_MATERIALS)).setCondition(() -> enableRavagerHide);

menyType = IForgeMenuType.create(BackpackMenu::fromNetwork);
Quark.ZETA.registry.register(menyType, "backpack", Registry.MENU_REGISTRY);

bonded_ravager_hide = new QuarkBlock("bonded_ravager_hide", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.BLACK)
bonded_ravager_hide = new ZetaBlock("bonded_ravager_hide", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.BLACK)
.strength(1F)
.sound(SoundType.WOOL))
.setCondition(() -> enableRavagerHide);
Expand Down
33 changes: 16 additions & 17 deletions src/main/java/org/violetmoon/quark/base/block/QuarkSlabBlock.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package org.violetmoon.quark.base.block;

import java.util.function.BooleanSupplier;

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

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
Expand All @@ -9,43 +14,37 @@
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.SlabBlock;
import net.minecraft.world.level.block.state.BlockState;

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

import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.handler.VariantHandler;
import org.violetmoon.zeta.block.IZetaBlock;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.IZetaBlockColorProvider;
import org.violetmoon.zeta.registry.IZetaItemColorProvider;

import java.util.function.BooleanSupplier;

public class QuarkSlabBlock extends SlabBlock implements IQuarkBlock, IZetaBlockColorProvider {
public class QuarkSlabBlock extends SlabBlock implements IZetaBlock, IZetaBlockColorProvider {

public final IQuarkBlock parent;
public final IZetaBlock parent;
private BooleanSupplier enabledSupplier = () -> true;

public QuarkSlabBlock(IQuarkBlock parent) {
public QuarkSlabBlock(IZetaBlock parent) {
super(VariantHandler.realStateCopy(parent));

this.parent = parent;
String resloc = IQuarkBlock.inheritQuark(parent, "%s_slab");
Quark.ZETA.registry.registerBlock(this, resloc, true);
Quark.ZETA.registry.setCreativeTab(this, CreativeModeTab.TAB_BUILDING_BLOCKS);
Quark.ZETA.renderLayerRegistry.mock(this, parent.getBlock());
String resloc = parent.getModule().zeta.registryUtil.inheritQuark(parent, "%s_slab");
parent.getModule().zeta.registry.registerBlock(this, resloc, true);
parent.getModule().zeta.registry.setCreativeTab(this, CreativeModeTab.TAB_BUILDING_BLOCKS);
parent.getModule().zeta.renderLayerRegistry.mock(this, parent.getBlock());
}

@Override
public boolean isFlammableZeta(BlockState state, BlockGetter world, BlockPos pos, Direction face) {
BlockState parentState = parent.getBlock().defaultBlockState();
return Quark.ZETA.blockExtensions.get(parentState).isFlammableZeta(parentState, world, pos, face);
return parent.getModule().zeta.blockExtensions.get(parentState).isFlammableZeta(parentState, world, pos, face);
}

@Override
public int getFlammabilityZeta(BlockState state, BlockGetter world, BlockPos pos, Direction face) {
BlockState parentState = parent.getBlock().defaultBlockState();
return Quark.ZETA.blockExtensions.get(parentState).getFlammabilityZeta(parentState, world, pos, face);
return parent.getModule().zeta.blockExtensions.get(parentState).getFlammabilityZeta(parentState, world, pos, face);
}

@Override
Expand Down Expand Up @@ -75,7 +74,7 @@ public boolean doesConditionApply() {
@Override
public float[] getBeaconColorMultiplierZeta(BlockState state, LevelReader world, BlockPos pos, BlockPos beaconPos) {
BlockState parentState = parent.getBlock().defaultBlockState();
return Quark.ZETA.blockExtensions.get(parentState).getBeaconColorMultiplierZeta(parentState, world, pos, beaconPos);
return parent.getModule().zeta.blockExtensions.get(parentState).getBeaconColorMultiplierZeta(parentState, world, pos, beaconPos);
}

@Override
Expand Down
Loading

0 comments on commit 2653d7d

Please sign in to comment.