diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/CrateBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/CrateBlock.java index 3cd1a6ca11..092c1d382d 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/CrateBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/CrateBlock.java @@ -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; @@ -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; diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java index e2ed0baddf..149d7c92b4 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java @@ -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; @@ -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; diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java index e40eca1027..79cd9107a4 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java @@ -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; @@ -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; diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/MovingMagnetizedBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/MovingMagnetizedBlock.java index 008e2b6f52..1a448d7347 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/MovingMagnetizedBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/MovingMagnetizedBlock.java @@ -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; @@ -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) { diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/TinyPotatoBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/TinyPotatoBlock.java index 0ba9a84262..59fe219830 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/TinyPotatoBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/TinyPotatoBlock.java @@ -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; @@ -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; @@ -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; diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java index d9be172c27..e3c1532ffe 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java @@ -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; @@ -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; @@ -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; diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/module/BackpackModule.java b/src/main/java/org/violetmoon/quark/addons/oddities/module/BackpackModule.java index 19ab832923..dd65391089 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/module/BackpackModule.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/module/BackpackModule.java @@ -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; @@ -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 { @@ -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); diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkSlabBlock.java b/src/main/java/org/violetmoon/quark/base/block/QuarkSlabBlock.java index d325ce62a5..f93e347a3a 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkSlabBlock.java +++ b/src/main/java/org/violetmoon/quark/base/block/QuarkSlabBlock.java @@ -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; @@ -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 @@ -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 diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkStairsBlock.java b/src/main/java/org/violetmoon/quark/base/block/QuarkStairsBlock.java index 26d1fe9adc..f69de2126a 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkStairsBlock.java +++ b/src/main/java/org/violetmoon/quark/base/block/QuarkStairsBlock.java @@ -5,12 +5,6 @@ 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.module.ZetaModule; -import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -import org.violetmoon.zeta.registry.IZetaItemColorProvider; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; @@ -20,20 +14,25 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.StairBlock; import net.minecraft.world.level.block.state.BlockState; +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; -public class QuarkStairsBlock extends StairBlock implements IQuarkBlock, IZetaBlockColorProvider { +public class QuarkStairsBlock extends StairBlock implements IZetaBlock, IZetaBlockColorProvider { - private final IQuarkBlock parent; + private final IZetaBlock parent; private BooleanSupplier enabledSupplier = () -> true; - public QuarkStairsBlock(IQuarkBlock parent) { + public QuarkStairsBlock(IZetaBlock parent) { super(parent.getBlock()::defaultBlockState, VariantHandler.realStateCopy(parent)); this.parent = parent; - String resloc = IQuarkBlock.inheritQuark(parent, "%s_stairs"); - 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_stairs"); + 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 @@ -45,13 +44,13 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis @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); } @Nullable @@ -74,7 +73,7 @@ public boolean doesConditionApply() { @Nullable @Override public float[] getBeaconColorMultiplierZeta(BlockState state, LevelReader world, BlockPos pos, BlockPos beaconPos) { - return Quark.ZETA.blockExtensions.get(state).getBeaconColorMultiplierZeta(state, world, pos, beaconPos); + return parent.getModule().zeta.blockExtensions.get(state).getBeaconColorMultiplierZeta(state, world, pos, beaconPos); } @Override diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkTrapdoorBlock.java b/src/main/java/org/violetmoon/quark/base/block/QuarkTrapdoorBlock.java index 4f890e5ac6..e06ddf17e4 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkTrapdoorBlock.java +++ b/src/main/java/org/violetmoon/quark/base/block/QuarkTrapdoorBlock.java @@ -5,9 +5,6 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; import net.minecraft.world.entity.LivingEntity; @@ -16,8 +13,11 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.TrapDoorBlock; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class QuarkTrapdoorBlock extends TrapDoorBlock implements IQuarkBlock { +public class QuarkTrapdoorBlock extends TrapDoorBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkWallBlock.java b/src/main/java/org/violetmoon/quark/base/block/QuarkWallBlock.java index 7de63051fb..23351ca569 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkWallBlock.java +++ b/src/main/java/org/violetmoon/quark/base/block/QuarkWallBlock.java @@ -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.NonNullList; import net.minecraft.world.item.CreativeModeTab; @@ -7,32 +12,25 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.WallBlock; 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 QuarkWallBlock extends WallBlock implements IQuarkBlock, IZetaBlockColorProvider { +public class QuarkWallBlock extends WallBlock implements IZetaBlock, IZetaBlockColorProvider { - private final IQuarkBlock parent; + private final IZetaBlock parent; private BooleanSupplier enabledSupplier = () -> true; - public QuarkWallBlock(IQuarkBlock parent) { + public QuarkWallBlock(IZetaBlock parent) { super(VariantHandler.realStateCopy(parent)); this.parent = parent; - String resloc = IQuarkBlock.inheritQuark(parent, "%s_wall"); - Quark.ZETA.registry.registerBlock(this, resloc, true); - Quark.ZETA.registry.setCreativeTab(this, CreativeModeTab.TAB_DECORATIONS); - - Quark.ZETA.renderLayerRegistry.mock(this, parent.getBlock()); + String resloc = parent.getModule().zeta.registryUtil.inheritQuark(parent, "%s_wall"); + parent.getModule().zeta.registry.registerBlock(this, resloc, true); + parent.getModule().zeta.registry.setCreativeTab(this, CreativeModeTab.TAB_DECORATIONS); + parent.getModule().zeta.renderLayerRegistry.mock(this, parent.getBlock()); } @Override @@ -62,7 +60,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 diff --git a/src/main/java/org/violetmoon/quark/base/handler/VariantHandler.java b/src/main/java/org/violetmoon/quark/base/handler/VariantHandler.java index d84abf6250..a968a686e1 100644 --- a/src/main/java/org/violetmoon/quark/base/handler/VariantHandler.java +++ b/src/main/java/org/violetmoon/quark/base/handler/VariantHandler.java @@ -1,5 +1,9 @@ package org.violetmoon.quark.base.handler; +import java.util.LinkedList; +import java.util.List; +import java.util.function.Function; + import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; @@ -7,16 +11,11 @@ import net.minecraft.world.level.block.FlowerPotBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; - -import java.util.LinkedList; -import java.util.List; -import java.util.function.Function; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.base.block.QuarkSlabBlock; import org.violetmoon.quark.base.block.QuarkStairsBlock; import org.violetmoon.quark.base.block.QuarkWallBlock; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.registry.RenderLayerRegistry; public class VariantHandler { @@ -25,29 +24,29 @@ public class VariantHandler { public static final List STAIRS = new LinkedList<>(); public static final List WALLS = new LinkedList<>(); - public static Block addSlabStairsWall(IQuarkBlock block) { + public static Block addSlabStairsWall(IZetaBlock block) { addSlabAndStairs(block); addWall(block); return block.getBlock(); } - public static IQuarkBlock addSlabAndStairs(IQuarkBlock block) { + public static IZetaBlock addSlabAndStairs(IZetaBlock block) { addSlab(block); addStairs(block); return block; } - public static IQuarkBlock addSlab(IQuarkBlock block) { + public static IZetaBlock addSlab(IZetaBlock block) { SLABS.add(new QuarkSlabBlock(block).setCondition(block::doesConditionApply)); return block; } - public static IQuarkBlock addStairs(IQuarkBlock block) { + public static IZetaBlock addStairs(IZetaBlock block) { STAIRS.add(new QuarkStairsBlock(block).setCondition(block::doesConditionApply)); return block; } - public static IQuarkBlock addWall(IQuarkBlock block) { + public static IZetaBlock addWall(IZetaBlock block) { WALLS.add(new QuarkWallBlock(block).setCondition(block::doesConditionApply)); return block; } @@ -68,7 +67,7 @@ public static FlowerPotBlock addFlowerPot(Block block, String name, Function true); diff --git a/src/main/java/org/violetmoon/quark/base/handler/WoodSetHandler.java b/src/main/java/org/violetmoon/quark/base/handler/WoodSetHandler.java index 4139ce8e75..d7b38f8a4b 100644 --- a/src/main/java/org/violetmoon/quark/base/handler/WoodSetHandler.java +++ b/src/main/java/org/violetmoon/quark/base/handler/WoodSetHandler.java @@ -8,42 +8,7 @@ import java.util.Set; import java.util.stream.Stream; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkDoorBlock; -import org.violetmoon.quark.base.block.QuarkFenceBlock; -import org.violetmoon.quark.base.block.QuarkFenceGateBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; -import org.violetmoon.quark.base.block.QuarkPressurePlateBlock; -import org.violetmoon.quark.base.block.QuarkStandingSignBlock; -import org.violetmoon.quark.base.block.QuarkTrapdoorBlock; -import org.violetmoon.quark.base.block.QuarkWallSignBlock; -import org.violetmoon.quark.base.block.QuarkWoodenButtonBlock; -import org.violetmoon.quark.base.client.render.QuarkBoatRenderer; -import org.violetmoon.quark.base.item.QuarkSignItem; -import org.violetmoon.quark.base.item.boat.QuarkBoat; -import org.violetmoon.quark.base.item.boat.QuarkBoatDispenseItemBehavior; -import org.violetmoon.quark.base.item.boat.QuarkBoatItem; -import org.violetmoon.quark.base.item.boat.QuarkChestBoat; -import org.violetmoon.quark.content.building.block.HollowLogBlock; -import org.violetmoon.quark.content.building.block.VariantBookshelfBlock; -import org.violetmoon.quark.content.building.block.VariantLadderBlock; -import org.violetmoon.quark.content.building.block.WoodPostBlock; -import org.violetmoon.quark.content.building.module.HollowLogsModule; -import org.violetmoon.quark.content.building.module.VariantBookshelvesModule; -import org.violetmoon.quark.content.building.module.VariantChestsModule; -import org.violetmoon.quark.content.building.module.VariantLaddersModule; -import org.violetmoon.quark.content.building.module.VerticalPlanksModule; -import org.violetmoon.quark.content.building.module.WoodenPostsModule; -import org.violetmoon.zeta.client.event.load.ZClientSetup; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZCommonSetup; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.module.ZetaModule; - import com.google.common.collect.ImmutableSet; - import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.core.Direction; @@ -66,6 +31,39 @@ import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; import net.minecraftforge.common.ToolActions; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.block.QuarkTrapdoorBlock; +import org.violetmoon.quark.base.client.render.QuarkBoatRenderer; +import org.violetmoon.quark.base.item.boat.QuarkBoat; +import org.violetmoon.quark.base.item.boat.QuarkBoatDispenseItemBehavior; +import org.violetmoon.quark.base.item.boat.QuarkBoatItem; +import org.violetmoon.quark.base.item.boat.QuarkChestBoat; +import org.violetmoon.quark.content.building.block.HollowLogBlock; +import org.violetmoon.quark.content.building.block.VariantBookshelfBlock; +import org.violetmoon.quark.content.building.block.VariantLadderBlock; +import org.violetmoon.quark.content.building.block.WoodPostBlock; +import org.violetmoon.quark.content.building.module.HollowLogsModule; +import org.violetmoon.quark.content.building.module.VariantBookshelvesModule; +import org.violetmoon.quark.content.building.module.VariantChestsModule; +import org.violetmoon.quark.content.building.module.VariantLaddersModule; +import org.violetmoon.quark.content.building.module.VerticalPlanksModule; +import org.violetmoon.quark.content.building.module.WoodenPostsModule; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaDoorBlock; +import org.violetmoon.zeta.block.ZetaFenceBlock; +import org.violetmoon.zeta.block.ZetaFenceGateBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; +import org.violetmoon.zeta.block.ZetaPressurePlateBlock; +import org.violetmoon.zeta.block.ZetaStandingSignBlock; +import org.violetmoon.zeta.block.ZetaWallSignBlock; +import org.violetmoon.zeta.block.ZetaWoodenButtonBlock; +import org.violetmoon.zeta.client.event.load.ZClientSetup; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZCommonSetup; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.item.ZetaSignItem; +import org.violetmoon.zeta.module.ZetaModule; public class WoodSetHandler { @@ -116,26 +114,26 @@ public static WoodSet addWoodSet(ZetaModule module, String name, MaterialColor c if(hasLog) { set.log = log(name + "_log", module, color, barkColor); - set.wood = new QuarkPillarBlock(name + "_wood", module, CreativeModeTab.TAB_BUILDING_BLOCKS, BlockBehaviour.Properties.of(Material.WOOD, barkColor).strength(2.0F).sound(SoundType.WOOD)); + set.wood = new ZetaPillarBlock(name + "_wood", module, CreativeModeTab.TAB_BUILDING_BLOCKS, BlockBehaviour.Properties.of(Material.WOOD, barkColor).strength(2.0F).sound(SoundType.WOOD)); set.strippedLog = log("stripped_" + name + "_log", module, color, color); - set.strippedWood = new QuarkPillarBlock("stripped_" + name + "_wood", module, CreativeModeTab.TAB_BUILDING_BLOCKS, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F).sound(SoundType.WOOD)); + set.strippedWood = new ZetaPillarBlock("stripped_" + name + "_wood", module, CreativeModeTab.TAB_BUILDING_BLOCKS, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F).sound(SoundType.WOOD)); } - set.planks = new QuarkBlock(name + "_planks", module, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); + set.planks = new ZetaBlock(name + "_planks", module, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); - set.slab = VariantHandler.addSlab((IQuarkBlock) set.planks).getBlock(); - set.stairs = VariantHandler.addStairs((IQuarkBlock) set.planks).getBlock(); - set.fence = new QuarkFenceBlock(name + "_fence", module, CreativeModeTab.TAB_DECORATIONS, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); - set.fenceGate = new QuarkFenceGateBlock(name + "_fence_gate", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); + set.slab = VariantHandler.addSlab((IZetaBlock) set.planks).getBlock(); + set.stairs = VariantHandler.addStairs((IZetaBlock) set.planks).getBlock(); + set.fence = new ZetaFenceBlock(name + "_fence", module, CreativeModeTab.TAB_DECORATIONS, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); + set.fenceGate = new ZetaFenceGateBlock(name + "_fence_gate", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).strength(2.0F, 3.0F).sound(SoundType.WOOD)); - set.door = new QuarkDoorBlock(name + "_door", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).strength(3.0F).sound(SoundType.WOOD).noOcclusion()); + set.door = new ZetaDoorBlock(name + "_door", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).strength(3.0F).sound(SoundType.WOOD).noOcclusion()); set.trapdoor = new QuarkTrapdoorBlock(name + "_trapdoor", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).strength(3.0F).sound(SoundType.WOOD).noOcclusion().isValidSpawn((s, g, p, e) -> false)); - set.button = new QuarkWoodenButtonBlock(name + "_button", module, BlockBehaviour.Properties.of(Material.DECORATION).noCollission().strength(0.5F).sound(SoundType.WOOD)); - set.pressurePlate = new QuarkPressurePlateBlock(Sensitivity.EVERYTHING, name + "_pressure_plate", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(0.5F).sound(SoundType.WOOD)); + set.button = new ZetaWoodenButtonBlock(name + "_button", module, BlockBehaviour.Properties.of(Material.DECORATION).noCollission().strength(0.5F).sound(SoundType.WOOD)); + set.pressurePlate = new ZetaPressurePlateBlock(Sensitivity.EVERYTHING, name + "_pressure_plate", module, CreativeModeTab.TAB_REDSTONE, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(0.5F).sound(SoundType.WOOD)); - set.sign = new QuarkStandingSignBlock(name + "_sign", module, type, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(1.0F).sound(SoundType.WOOD)); - set.wallSign = new QuarkWallSignBlock(name + "_wall_sign", module, type, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(1.0F).sound(SoundType.WOOD).lootFrom(() -> set.sign)); + set.sign = new ZetaStandingSignBlock(name + "_sign", module, type, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(1.0F).sound(SoundType.WOOD)); + set.wallSign = new ZetaWallSignBlock(name + "_wall_sign", module, type, BlockBehaviour.Properties.of(Material.WOOD, color).noCollission().strength(1.0F).sound(SoundType.WOOD).lootFrom(() -> set.sign)); set.bookshelf = new VariantBookshelfBlock(name, module, true).setCondition(() -> Quark.ZETA.modules.isEnabledOrOverlapping(VariantBookshelvesModule.class)); set.ladder = new VariantLadderBlock(name, module, true).setCondition(() -> Quark.ZETA.modules.isEnabledOrOverlapping(VariantLaddersModule.class)); @@ -150,7 +148,7 @@ public static WoodSet addWoodSet(ZetaModule module, String name, MaterialColor c VariantChestsModule.addChest(name, module, () -> Block.Properties.copy(Blocks.CHEST), true); - set.signItem = new QuarkSignItem(module, set.sign, set.wallSign); + set.signItem = new ZetaSignItem(module, set.sign, set.wallSign); if(hasBoat) { set.boatItem = new QuarkBoatItem(name, module, false); @@ -188,7 +186,7 @@ public static void makeSignWork(Block sign, Block wallSign) { } private static RotatedPillarBlock log(String name, ZetaModule module, MaterialColor topColor, MaterialColor sideColor) { - return new QuarkPillarBlock(name, module, CreativeModeTab.TAB_BUILDING_BLOCKS, + return new ZetaPillarBlock(name, module, CreativeModeTab.TAB_BUILDING_BLOCKS, BlockBehaviour.Properties.of(Material.WOOD, s -> s.getValue(RotatedPillarBlock.AXIS) == Direction.Axis.Y ? topColor : sideColor) .strength(2.0F).sound(SoundType.WOOD)); } diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkItem.java b/src/main/java/org/violetmoon/quark/base/item/QuarkItem.java deleted file mode 100644 index b8022abbbe..0000000000 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkItem.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.violetmoon.quark.base.item; - -import net.minecraft.core.NonNullList; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; - -import javax.annotation.Nonnull; - -import org.violetmoon.zeta.item.IZetaItem; -import org.violetmoon.zeta.item.ZetaItem; -import org.violetmoon.zeta.module.ZetaModule; - -import java.util.function.BooleanSupplier; - -public class QuarkItem extends ZetaItem implements IZetaItem { - - private final ZetaModule module; - private BooleanSupplier enabledSupplier = () -> true; - - public QuarkItem(String regname, ZetaModule module, Properties properties) { - super(properties); - - this.module = module; - module.zeta.registry.registerItem(this, regname); - - if(module != null && module.category.isAddon()) - module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod); - } - - @Override - public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullList items) { - if(isEnabled() || group == CreativeModeTab.TAB_SEARCH) - super.fillItemCategory(group, items); - } - - @Override - public QuarkItem setCondition(BooleanSupplier enabledSupplier) { - this.enabledSupplier = enabledSupplier; - return this; - } - - @Override - public ZetaModule getModule() { - return module; - } - - @Override - public boolean doesConditionApply() { - return enabledSupplier.getAsBoolean(); - } - -} diff --git a/src/main/java/org/violetmoon/quark/base/item/boat/QuarkBoatItem.java b/src/main/java/org/violetmoon/quark/base/item/boat/QuarkBoatItem.java index 4340431c63..cbe6bda13a 100644 --- a/src/main/java/org/violetmoon/quark/base/item/boat/QuarkBoatItem.java +++ b/src/main/java/org/violetmoon/quark/base/item/boat/QuarkBoatItem.java @@ -5,10 +5,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.handler.WoodSetHandler; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; @@ -26,8 +22,11 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; +import org.violetmoon.quark.base.handler.WoodSetHandler; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkBoatItem extends QuarkItem { +public class QuarkBoatItem extends ZetaItem { private static final Predicate ENTITY_PREDICATE = EntitySelector.NO_SPECTATORS.and(Entity::isPickable); diff --git a/src/main/java/org/violetmoon/quark/base/world/EntitySpawnHandler.java b/src/main/java/org/violetmoon/quark/base/world/EntitySpawnHandler.java index a8d97d0ecd..3d49e70a0e 100644 --- a/src/main/java/org/violetmoon/quark/base/world/EntitySpawnHandler.java +++ b/src/main/java/org/violetmoon/quark/base/world/EntitySpawnHandler.java @@ -4,14 +4,6 @@ import java.util.List; import java.util.function.BooleanSupplier; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.config.type.CostSensitiveEntitySpawnConfig; -import org.violetmoon.quark.base.config.type.EntitySpawnConfig; -import org.violetmoon.quark.base.item.QuarkSpawnEggItem; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZConfigChanged; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.world.entity.EntityType; @@ -27,6 +19,13 @@ import net.minecraft.world.level.levelgen.Heightmap; import net.minecraftforge.common.world.MobSpawnSettingsBuilder; import net.minecraftforge.common.world.ModifiableBiomeInfo; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.config.type.CostSensitiveEntitySpawnConfig; +import org.violetmoon.quark.base.config.type.EntitySpawnConfig; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZConfigChanged; +import org.violetmoon.zeta.item.ZetaSpawnEggItem; +import org.violetmoon.zeta.module.ZetaModule; public class EntitySpawnHandler { @@ -47,7 +46,7 @@ public static void addEgg(ZetaModule module, EntityType entityTyp } public static void addEgg(EntityType entityType, int color1, int color2, ZetaModule module, BooleanSupplier enabledSupplier) { - new QuarkSpawnEggItem(() -> entityType, color1, color2, Quark.ZETA.registry.getRegistryName(entityType, Registry.ENTITY_TYPE) + "_spawn_egg", module, + new ZetaSpawnEggItem(() -> entityType, color1, color2, Quark.ZETA.registry.getRegistryName(entityType, Registry.ENTITY_TYPE) + "_spawn_egg", module, new Item.Properties().tab(CreativeModeTab.TAB_MISC)) .setCondition(enabledSupplier); } diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java index ea32931959..a26bc8c84a 100755 --- a/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.content.automation.block.be.ChuteBlockEntity; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; @@ -23,8 +18,12 @@ 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.content.automation.block.be.ChuteBlockEntity; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class ChuteBlock extends QuarkBlock implements EntityBlock { +public class ChuteBlock extends ZetaBlock implements EntityBlock { private static final VoxelShape INPUT_SHAPE = Block.box(0.0D, 10.0D, 0.0D, 16.0D, 16.0D, 16.0D); private static final VoxelShape MIDDLE_SHAPE = Block.box(4.0D, 4.0D, 4.0D, 12.0D, 10.0D, 12.0D); diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/EnderWatcherBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/EnderWatcherBlock.java index 26168396c9..d716ae8da6 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/EnderWatcherBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/EnderWatcherBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.automation.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; @@ -18,15 +20,12 @@ import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.content.automation.block.be.EnderWatcherBlockEntity; import org.violetmoon.quark.content.automation.module.EnderWatcherModule; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -public class EnderWatcherBlock extends QuarkBlock implements EntityBlock { +public class EnderWatcherBlock extends ZetaBlock implements EntityBlock { public static final BooleanProperty WATCHED = BooleanProperty.create("watched"); public static final IntegerProperty POWER = BlockStateProperties.POWER; diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/FeedingTroughBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/FeedingTroughBlock.java index fc5708a034..9f3dde63ce 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/FeedingTroughBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/FeedingTroughBlock.java @@ -1,5 +1,8 @@ package org.violetmoon.quark.content.automation.block; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.Containers; @@ -25,22 +28,22 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.shapes.*; +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.util.ForgeSoundType; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.content.automation.block.be.FeedingTroughBlockEntity; import org.violetmoon.quark.content.automation.module.FeedingTroughModule; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 9:39 AM on 9/20/19. */ -public class FeedingTroughBlock extends QuarkBlock implements EntityBlock { +public class FeedingTroughBlock extends ZetaBlock implements EntityBlock { private static final SoundType WOOD_WITH_PLANT_STEP = new ForgeSoundType(1.0F, 1.0F, () -> SoundEvents.WOOD_BREAK, () -> SoundEvents.GRASS_STEP, () -> SoundEvents.WOOD_PLACE, () -> SoundEvents.WOOD_HIT, () -> SoundEvents.WOOD_FALL); diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/GravisandBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/GravisandBlock.java index 78fecd826a..b3bbaa6c51 100755 --- a/src/main/java/org/violetmoon/quark/content/automation/block/GravisandBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/GravisandBlock.java @@ -2,10 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.content.automation.entity.Gravisand; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; @@ -17,8 +13,11 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; +import org.violetmoon.quark.content.automation.entity.Gravisand; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class GravisandBlock extends QuarkBlock { +public class GravisandBlock extends ZetaBlock { public GravisandBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(regname, module, creativeTab, properties); diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java index cc83d4b6b1..29d7588063 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java @@ -1,5 +1,10 @@ package org.violetmoon.quark.content.automation.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; @@ -15,19 +20,13 @@ import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.Material; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.content.automation.module.IronRodModule; import org.violetmoon.zeta.api.ICollateralMover; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; -import java.util.function.BooleanSupplier; - -public class IronRodBlock extends EndRodBlock implements ICollateralMover, IQuarkBlock { +public class IronRodBlock extends EndRodBlock implements ICollateralMover, IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/MetalButtonBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/MetalButtonBlock.java index 40879ef48e..c11815270b 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/MetalButtonBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/MetalButtonBlock.java @@ -2,21 +2,20 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkButtonBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; +import org.violetmoon.zeta.block.ZetaButtonBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 9:14 PM on 10/8/19. */ -public class MetalButtonBlock extends QuarkButtonBlock { +public class MetalButtonBlock extends ZetaButtonBlock { private final int speed; diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/ObsidianPressurePlateBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/ObsidianPressurePlateBlock.java index 7c95af5fd1..0c8551f94f 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/ObsidianPressurePlateBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/ObsidianPressurePlateBlock.java @@ -4,9 +4,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkPressurePlateBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -18,12 +15,14 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.AABB; +import org.violetmoon.zeta.block.ZetaPressurePlateBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 9:47 PM on 10/8/19. */ -public class ObsidianPressurePlateBlock extends QuarkPressurePlateBlock { +public class ObsidianPressurePlateBlock extends ZetaPressurePlateBlock { public static final BooleanProperty POWERED = BlockStateProperties.POWERED; public ObsidianPressurePlateBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java index f307ae90b5..3c33b79619 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java @@ -4,11 +4,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.content.automation.base.RandomizerPowerState; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.DustParticleOptions; @@ -33,13 +28,17 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.ticks.TickPriority; import net.minecraftforge.event.ForgeEventFactory; +import org.violetmoon.quark.content.automation.base.RandomizerPowerState; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; /** * @author WireSegal * Created at 9:57 AM on 8/26/19. */ -public class RedstoneRandomizerBlock extends QuarkBlock { +public class RedstoneRandomizerBlock extends ZetaBlock { protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/BambooMatBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/BambooMatBlock.java index c0efa9cce4..e46dc133c9 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/BambooMatBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/BambooMatBlock.java @@ -1,8 +1,5 @@ package org.violetmoon.quark.content.building.block; -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.item.CreativeModeTab; @@ -15,8 +12,10 @@ import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class BambooMatBlock extends QuarkBlock { +public class BambooMatBlock extends ZetaBlock { private static final EnumProperty FACING = BlockStateProperties.FACING_HOPPER; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/CutVineBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/CutVineBlock.java index 041b02313f..3b032a83ee 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/CutVineBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/CutVineBlock.java @@ -4,20 +4,18 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.phys.HitResult; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.QuarkVineBlock; +import org.violetmoon.zeta.block.ZetaVineBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -public class CutVineBlock extends QuarkVineBlock implements IZetaBlockColorProvider { +public class CutVineBlock extends ZetaVineBlock implements IZetaBlockColorProvider { public CutVineBlock(ZetaModule module) { super(module, "cut_vine", false); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java index a50edb2b83..48e3acc5cd 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java @@ -1,14 +1,14 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import it.unimi.dsi.fastutil.floats.Float2ObjectArrayMap; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ExperienceOrb; -import net.minecraft.world.entity.SpawnPlacements; import net.minecraft.world.entity.animal.Animal; import net.minecraft.world.entity.animal.WaterAnimal; import net.minecraft.world.entity.item.ItemEntity; @@ -35,16 +35,13 @@ import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.event.ForgeEventFactory; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.api.ICrawlSpaceBlock; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.SimpleFluidloggedBlock; +import org.violetmoon.zeta.block.SimpleFluidloggedBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class GrateBlock extends QuarkBlock implements SimpleFluidloggedBlock, ICrawlSpaceBlock { +public class GrateBlock extends ZetaBlock implements SimpleFluidloggedBlock, ICrawlSpaceBlock { private static final VoxelShape TRUE_SHAPE = box(0, 15, 0, 16, 16, 16); private static final Float2ObjectArrayMap WALK_BLOCK_CACHE = new Float2ObjectArrayMap<>(); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java index 206c5a74d6..fdaa2cb901 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java @@ -5,7 +5,6 @@ import javax.annotation.Nonnull; import com.google.common.collect.ImmutableList; - import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.core.BlockPos; @@ -29,15 +28,15 @@ import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.content.building.module.HedgesModule; import org.violetmoon.quark.content.world.block.BlossomLeavesBlock; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; import org.violetmoon.zeta.registry.RenderLayerRegistry; //TODO ZETA: extend QuarkFenceBlock -public class HedgeBlock extends FenceBlock implements IQuarkBlock, IZetaBlockColorProvider { +public class HedgeBlock extends FenceBlock implements IZetaBlock, IZetaBlockColorProvider { private static final VoxelShape WOOD_SHAPE = box(6F, 0F, 6F, 10F, 15F, 10F); private static final VoxelShape HEDGE_CENTER_SHAPE = box(2F, 1F, 2F, 14F, 16F, 14F); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowFrameBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowFrameBlock.java index 4c1d14bab6..70d6da3cb4 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowFrameBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowFrameBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.entity.LivingEntity; @@ -18,15 +20,16 @@ import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.Vec3; -import net.minecraft.world.phys.shapes.*; - -import javax.annotation.Nonnull; - +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; import org.violetmoon.quark.api.ICrawlSpaceBlock; -import org.violetmoon.quark.base.block.QuarkBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -public abstract class HollowFrameBlock extends QuarkBlock implements SimpleWaterloggedBlock, ICrawlSpaceBlock { +public abstract class HollowFrameBlock extends ZetaBlock implements SimpleWaterloggedBlock, ICrawlSpaceBlock { public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java index 0755c9336e..75b948528e 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java @@ -1,23 +1,22 @@ package org.violetmoon.quark.content.building.block; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.handler.MiscUtil; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.handler.MiscUtil; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; public class HollowLogBlock extends HollowPillarBlock { private final boolean flammable; public HollowLogBlock(Block sourceLog, ZetaModule module, boolean flammable) { - this(IQuarkBlock.inherit(sourceLog, "hollow_%s"), sourceLog, module, flammable); + this(Quark.ZETA.registryUtil.inherit(sourceLog, "hollow_%s"), sourceLog, module, flammable); } public HollowLogBlock(String name, Block sourceLog, ZetaModule module, boolean flammable) { diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowPillarBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowPillarBlock.java index 9a19824a72..0e6372aa42 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowPillarBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowPillarBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -22,14 +24,11 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.api.ICrawlSpaceBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; import org.violetmoon.zeta.module.ZetaModule; -public class HollowPillarBlock extends QuarkPillarBlock implements SimpleWaterloggedBlock, ICrawlSpaceBlock { +public class HollowPillarBlock extends ZetaPillarBlock implements SimpleWaterloggedBlock, ICrawlSpaceBlock { public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java index 69e5912c43..6e71b67356 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java @@ -1,11 +1,12 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.Rotation; @@ -14,18 +15,14 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.ToolAction; -import net.minecraftforge.common.ToolActions; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.IQuarkBlock; +import org.violetmoon.quark.base.Quark; import org.violetmoon.quark.base.handler.MiscUtil; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; import static org.violetmoon.quark.base.handler.MiscUtil.directionProperty; -import javax.annotation.Nonnull; - /** * Unfortunately, due to Ladder Weirdness (tm) this block is NYI */ @@ -41,7 +38,7 @@ public class HollowWoodBlock extends HollowFrameBlock { private final boolean flammable; public HollowWoodBlock(Block sourceLog, ZetaModule module, boolean flammable) { - this(IQuarkBlock.inherit(sourceLog, "hollow_%s"), sourceLog, module, flammable); + this(Quark.ZETA.registryUtil.inherit(sourceLog, "hollow_%s"), sourceLog, module, flammable); } public HollowWoodBlock(String name, Block sourceLog, ZetaModule module, boolean flammable) { diff --git a/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java index 3db32fdd97..c9f93f1d1c 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java @@ -19,12 +19,12 @@ import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.QuarkBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class LeafCarpetBlock extends QuarkBlock implements IZetaBlockColorProvider { +public class LeafCarpetBlock extends ZetaBlock implements IZetaBlockColorProvider { private static final VoxelShape SHAPE = box(0, 0, 0, 16, 1, 16); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/MudBrickLatticeBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/MudBrickLatticeBlock.java index c68ab91520..f755807010 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/MudBrickLatticeBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/MudBrickLatticeBlock.java @@ -2,9 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkGlassBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; @@ -19,8 +16,10 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; +import org.violetmoon.zeta.block.ZetaGlassBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class MudBrickLatticeBlock extends QuarkGlassBlock implements SimpleWaterloggedBlock { +public class MudBrickLatticeBlock extends ZetaGlassBlock implements SimpleWaterloggedBlock { public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/MyalitePillarBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/MyalitePillarBlock.java index 2147d09383..07e62d2906 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/MyalitePillarBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/MyalitePillarBlock.java @@ -2,11 +2,11 @@ import net.minecraft.world.item.CreativeModeTab; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.QuarkPillarBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -public class MyalitePillarBlock extends QuarkPillarBlock implements IZetaBlockColorProvider { +public class MyalitePillarBlock extends ZetaPillarBlock implements IZetaBlockColorProvider { public MyalitePillarBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(regname, module, creativeTab, properties); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/PaperLanternBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/PaperLanternBlock.java index c1d3cfdcab..ccda10ccf5 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/PaperLanternBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/PaperLanternBlock.java @@ -2,9 +2,6 @@ import javax.annotation.Nonnull; -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.item.CreativeModeTab; @@ -17,8 +14,10 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class PaperLanternBlock extends QuarkBlock { +public class PaperLanternBlock extends ZetaBlock { private static final VoxelShape POST_SHAPE = box(6, 0, 6, 10, 16, 10); private static final VoxelShape LANTERN_SHAPE = box(2, 2, 2, 14, 14, 14); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/PaperWallBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/PaperWallBlock.java index 43803e57d6..982b0462db 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/PaperWallBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/PaperWallBlock.java @@ -10,18 +10,17 @@ */ package org.violetmoon.quark.content.building.block; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkInheritedPaneBlock; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.block.ZetaInheritedPaneBlock; -public class PaperWallBlock extends QuarkInheritedPaneBlock { +public class PaperWallBlock extends ZetaInheritedPaneBlock { - public PaperWallBlock(IQuarkBlock parent, String name) { + public PaperWallBlock(IZetaBlock parent, String name) { super(parent, name, Block.Properties.copy(parent.getBlock()) .lightLevel(b -> 0)); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/QuarkVerticalSlabBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/QuarkVerticalSlabBlock.java index e884bb3e6f..d185ec1474 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/QuarkVerticalSlabBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/QuarkVerticalSlabBlock.java @@ -1,30 +1,28 @@ package org.violetmoon.quark.content.building.block; +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SlabBlock; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.base.block.QuarkSlabBlock; -import org.violetmoon.zeta.util.RequiredModTooltipHandler; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; - -public class QuarkVerticalSlabBlock extends VerticalSlabBlock implements IQuarkBlock { +public class QuarkVerticalSlabBlock extends VerticalSlabBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; public QuarkVerticalSlabBlock(Block parent, ZetaModule module) { super(() -> parent, Block.Properties.copy(parent)); - String resloc = IQuarkBlock.inherit(parent, s -> s.replace("_slab", "_vertical_slab")); + String resloc = Quark.ZETA.registryUtil.inherit(parent, s -> s.replace("_slab", "_vertical_slab")); Quark.ZETA.registry.registerBlock(this, resloc, true); this.module = module; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/RainbowLampBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/RainbowLampBlock.java index e1a8cee5c9..1636d5b1dd 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/RainbowLampBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/RainbowLampBlock.java @@ -1,5 +1,8 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; @@ -15,19 +18,15 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.quark.base.block.QuarkGlassBlock; import org.violetmoon.quark.content.building.module.RainbowLampsModule; +import org.violetmoon.zeta.block.ZetaGlassBlock; import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 12:31 PM on 9/19/19. */ -public class RainbowLampBlock extends QuarkGlassBlock { +public class RainbowLampBlock extends ZetaGlassBlock { public final float[] colorComponents; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java index dea11bc772..a6c8bc8373 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.sounds.SoundEvents; @@ -9,7 +11,11 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.*; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.PotionUtils; import net.minecraft.world.item.alchemy.Potions; import net.minecraft.world.item.context.BlockPlaceContext; @@ -17,7 +23,11 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.LevelEvent; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -34,18 +44,15 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.fluids.FluidUtil; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.content.automation.module.PistonsMoveTileEntitiesModule; import org.violetmoon.quark.content.building.module.RopeModule; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.item.ZetaBlockItem; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockItemProvider; import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class RopeBlock extends QuarkBlock implements IZetaBlockItemProvider, SimpleWaterloggedBlock { +public class RopeBlock extends ZetaBlock implements IZetaBlockItemProvider, SimpleWaterloggedBlock { private static final VoxelShape SHAPE = box(6, 0, 6, 10, 16, 10); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/StoolBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/StoolBlock.java index f968c2b563..ccbb477c96 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/StoolBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/StoolBlock.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.content.building.entity.Stool; -import org.violetmoon.quark.content.building.module.StoolsModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -40,8 +35,12 @@ 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.content.building.entity.Stool; +import org.violetmoon.quark.content.building.module.StoolsModule; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class StoolBlock extends QuarkBlock implements SimpleWaterloggedBlock { +public class StoolBlock extends ZetaBlock implements SimpleWaterloggedBlock { private static final VoxelShape SHAPE_TOP = Block.box(0F, 1F, 0F, 16F, 9F, 16F); private static final VoxelShape SHAPE_LEG = Block.box(0F, 0F, 0F, 4F, 1F, 4F); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/SturdyStoneBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/SturdyStoneBlock.java index b2ff9f50e7..462bf81f17 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/SturdyStoneBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/SturdyStoneBlock.java @@ -1,18 +1,17 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.PushReaction; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -public class SturdyStoneBlock extends QuarkBlock { +public class SturdyStoneBlock extends ZetaBlock { public SturdyStoneBlock(ZetaModule module) { super("sturdy_stone", module, CreativeModeTab.TAB_BUILDING_BLOCKS, diff --git a/src/main/java/org/violetmoon/quark/content/building/block/ThatchBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/ThatchBlock.java index 5caa51c8e4..2f9817ad39 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/ThatchBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/ThatchBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.building.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -10,14 +12,11 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkFlammableBlock; import org.violetmoon.quark.content.building.module.ThatchModule; +import org.violetmoon.zeta.block.ZetaFlammableBlock; import org.violetmoon.zeta.module.ZetaModule; -public class ThatchBlock extends QuarkFlammableBlock { +public class ThatchBlock extends ZetaFlammableBlock { public ThatchBlock(ZetaModule module) { super("thatch", module, CreativeModeTab.TAB_BUILDING_BLOCKS, 300, diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantBookshelfBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantBookshelfBlock.java index b3d0d37257..52dad37bbb 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantBookshelfBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantBookshelfBlock.java @@ -1,8 +1,5 @@ package org.violetmoon.quark.content.building.block; -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.item.CreativeModeTab; @@ -11,8 +8,10 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class VariantBookshelfBlock extends QuarkBlock { +public class VariantBookshelfBlock extends ZetaBlock { private final boolean flammable; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java index 313656ac87..ab64edd059 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java @@ -1,5 +1,11 @@ package org.violetmoon.quark.content.building.block; +import java.util.function.BooleanSupplier; +import java.util.function.Supplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; @@ -12,19 +18,12 @@ import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.fml.ModList; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.content.building.block.be.VariantChestBlockEntity; import org.violetmoon.quark.content.building.module.VariantChestsModule.IChestTextureProvider; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; -import java.util.function.Supplier; - -public class VariantChestBlock extends ChestBlock implements IQuarkBlock, IChestTextureProvider { +public class VariantChestBlock extends ChestBlock implements IZetaBlock, IChestTextureProvider { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java index a75b161ac1..80280760f6 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java @@ -1,5 +1,9 @@ package org.violetmoon.quark.content.building.block; +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.stats.Stats; import net.minecraft.world.entity.player.Player; @@ -11,17 +15,12 @@ import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.content.building.block.be.VariantFurnaceBlockEntity; import org.violetmoon.quark.content.building.module.VariantFurnacesModule; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; - -public class VariantFurnaceBlock extends FurnaceBlock implements IQuarkBlock { +public class VariantFurnaceBlock extends FurnaceBlock implements IZetaBlock { private final ZetaModule module; @@ -59,7 +58,7 @@ public ZetaModule getModule() { } @Override - public IQuarkBlock setCondition(BooleanSupplier condition) { + public IZetaBlock setCondition(BooleanSupplier condition) { return this; } diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java index f94ce79d7f..f2d53024c5 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java @@ -1,5 +1,9 @@ package org.violetmoon.quark.content.building.block; +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; @@ -10,16 +14,11 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LadderBlock; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.IQuarkBlock; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; -import java.util.function.BooleanSupplier; - -public class VariantLadderBlock extends LadderBlock implements IQuarkBlock { +public class VariantLadderBlock extends LadderBlock implements IZetaBlock { private final ZetaModule module; private final boolean flammable; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java index 14ef1694ca..0268bb7c31 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java @@ -1,5 +1,11 @@ package org.violetmoon.quark.content.building.block; +import java.util.function.BooleanSupplier; +import java.util.function.Supplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; @@ -16,19 +22,12 @@ import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.fml.ModList; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.content.building.block.be.VariantTrappedChestBlockEntity; import org.violetmoon.quark.content.building.module.VariantChestsModule.IChestTextureProvider; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; -import java.util.function.Supplier; - -public class VariantTrappedChestBlock extends ChestBlock implements IQuarkBlock, IChestTextureProvider { +public class VariantTrappedChestBlock extends ChestBlock implements IZetaBlock, IChestTextureProvider { public final String type; private final ZetaModule module; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java index 7fd1a95c83..4496456c86 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -29,8 +24,12 @@ import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class WoodPostBlock extends QuarkBlock implements SimpleWaterloggedBlock { +public class WoodPostBlock extends ZetaBlock implements SimpleWaterloggedBlock { private static final VoxelShape SHAPE_X = Block.box(0F, 6F, 6F, 16F, 10F, 10F); private static final VoxelShape SHAPE_Y = Block.box(6F, 0F, 6F, 10F, 16F, 10F); @@ -49,7 +48,7 @@ public class WoodPostBlock extends QuarkBlock implements SimpleWaterloggedBlock }; public WoodPostBlock(ZetaModule module, Block parent, String prefix, boolean nether) { - super(IQuarkBlock.inherit(parent, s -> prefix + s.replace("_fence", "_post")), + super(Quark.ZETA.registryUtil.inherit(parent, s -> prefix + s.replace("_fence", "_post")), module, CreativeModeTab.TAB_DECORATIONS, Properties.copy(parent).sound(nether ? SoundType.STEM : SoundType.WOOD)); diff --git a/src/main/java/org/violetmoon/quark/content/building/item/QuarkItemFrameItem.java b/src/main/java/org/violetmoon/quark/content/building/item/QuarkItemFrameItem.java index 10c6cab827..dd305a86fe 100644 --- a/src/main/java/org/violetmoon/quark/content/building/item/QuarkItemFrameItem.java +++ b/src/main/java/org/violetmoon/quark/content/building/item/QuarkItemFrameItem.java @@ -2,10 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.base.util.TriFunction; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -19,12 +15,15 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.gameevent.GameEvent; +import org.violetmoon.quark.base.util.TriFunction; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 11:04 AM on 8/25/19. */ -public class QuarkItemFrameItem extends QuarkItem { +public class QuarkItemFrameItem extends ZetaItem { private final TriFunction entityProvider; public QuarkItemFrameItem(String name, ZetaModule module, TriFunction entityProvider) { diff --git a/src/main/java/org/violetmoon/quark/content/building/module/CelebratoryLampsModule.java b/src/main/java/org/violetmoon/quark/content/building/module/CelebratoryLampsModule.java index 73d3b090b6..47a02b111c 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/CelebratoryLampsModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/CelebratoryLampsModule.java @@ -1,14 +1,5 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.config.Config; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.bus.PlayEvent; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.event.play.ZItemTooltip; -import org.violetmoon.zeta.module.ZetaLoadModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; import net.minecraft.world.item.CreativeModeTab; @@ -16,6 +7,14 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; +import org.violetmoon.quark.base.config.Config; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.bus.PlayEvent; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.event.play.ZItemTooltip; +import org.violetmoon.zeta.module.ZetaLoadModule; +import org.violetmoon.zeta.module.ZetaModule; @ZetaLoadModule(category = "building") public class CelebratoryLampsModule extends ZetaModule { @@ -27,8 +26,8 @@ public class CelebratoryLampsModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - stone_lamp = new QuarkBlock("stone_lamp", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.STONE).lightLevel(s -> lightLevel)); - stone_brick_lamp = new QuarkBlock("stone_brick_lamp", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.STONE_BRICKS).lightLevel(s -> lightLevel)); + stone_lamp = new ZetaBlock("stone_lamp", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.STONE).lightLevel(s -> lightLevel)); + stone_brick_lamp = new ZetaBlock("stone_brick_lamp", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.STONE_BRICKS).lightLevel(s -> lightLevel)); } @ZetaLoadModule(clientReplacement = true) diff --git a/src/main/java/org/violetmoon/quark/content/building/module/CompressedBlocksModule.java b/src/main/java/org/violetmoon/quark/content/building/module/CompressedBlocksModule.java index c9cd34baa3..d44bc6abe4 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/CompressedBlocksModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/CompressedBlocksModule.java @@ -1,5 +1,8 @@ package org.violetmoon.quark.content.building.module; +import java.util.List; +import java.util.function.BooleanSupplier; + import com.google.common.collect.Lists; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.DyeColor; @@ -8,17 +11,11 @@ import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; -import net.minecraftforge.common.ToolActions; - -import java.util.List; -import java.util.function.BooleanSupplier; - -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkFlammableBlock; -import org.violetmoon.quark.base.block.QuarkFlammablePillarBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.handler.FuelHandler; -import org.violetmoon.quark.base.handler.ToolInteractionHandler; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaFlammableBlock; +import org.violetmoon.zeta.block.ZetaFlammablePillarBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZLoadComplete; import org.violetmoon.zeta.event.load.ZRegister; @@ -77,7 +74,7 @@ public class CompressedBlocksModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - charcoal_block = new QuarkBlock("charcoal_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, + charcoal_block = new ZetaBlock("charcoal_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.STONE, MaterialColor.COLOR_BLACK) .requiresCorrectToolForDrops() .strength(5F, 10F) @@ -102,19 +99,19 @@ public final void register(ZRegister event) { sack("berry", MaterialColor.COLOR_RED, true, () -> enableBerrySack); sack("glowberry", MaterialColor.COLOR_YELLOW, 14, true, () -> enableGlowBerrySack); - blaze_lantern = new QuarkBlock("blaze_lantern", this, CreativeModeTab.TAB_BUILDING_BLOCKS, + blaze_lantern = new ZetaBlock("blaze_lantern", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.GLASS, DyeColor.YELLOW) .strength(0.3F) .sound(SoundType.GLASS) .lightLevel(b -> 15)) .setCondition(() -> enableBlazeLantern); - new QuarkBlock("bonded_leather", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.ORANGE) + new ZetaBlock("bonded_leather", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.ORANGE) .strength(0.4F) .sound(SoundType.WOOL)) .setCondition(() -> enableBondedLeather); - new QuarkBlock("bonded_rabbit_hide", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.WHITE) + new ZetaBlock("bonded_rabbit_hide", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.WOOL, DyeColor.WHITE) .strength(0.4F) .sound(SoundType.WOOL)) .setCondition(() -> enableBondedRabbitHide); @@ -134,7 +131,7 @@ public void loadComplete(ZLoadComplete event) { } private Block pillar(String name, MaterialColor color, boolean compost, BooleanSupplier cond, int flammability) { - Block block = new QuarkFlammablePillarBlock(name + "_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, flammability, + Block block = new ZetaFlammablePillarBlock(name + "_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, flammability, Block.Properties.of(Material.WOOD, color) .strength(0.5F) .sound(SoundType.WOOD)) @@ -146,7 +143,7 @@ private Block pillar(String name, MaterialColor color, boolean compost, BooleanS } private Block crate(String name, MaterialColor color, boolean compost, BooleanSupplier cond) { - Block block = new QuarkFlammableBlock(name + "_crate", this, CreativeModeTab.TAB_DECORATIONS, 150, + Block block = new ZetaFlammableBlock(name + "_crate", this, CreativeModeTab.TAB_DECORATIONS, 150, Block.Properties.of(Material.WOOD, color) .strength(1.5F) .sound(SoundType.WOOD)) @@ -162,7 +159,7 @@ private Block sack(String name, MaterialColor color, boolean compost, BooleanSup } private Block sack(String name, MaterialColor color, int light, boolean compost, BooleanSupplier cond) { - Block block = new QuarkFlammableBlock(name + "_sack", this, CreativeModeTab.TAB_DECORATIONS, 150, + Block block = new ZetaFlammableBlock(name + "_sack", this, CreativeModeTab.TAB_DECORATIONS, 150, Block.Properties.of(Material.WOOL, color) .strength(0.5F) .lightLevel(s -> light) diff --git a/src/main/java/org/violetmoon/quark/content/building/module/DuskboundBlocksModule.java b/src/main/java/org/violetmoon/quark/content/building/module/DuskboundBlocksModule.java index 19d358a3a5..37f195270f 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/DuskboundBlocksModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/DuskboundBlocksModule.java @@ -1,24 +1,23 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; - @ZetaLoadModule(category = "building") public class DuskboundBlocksModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - VariantHandler.addSlabAndStairs(new QuarkBlock("duskbound_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PURPUR_BLOCK))); + VariantHandler.addSlabAndStairs(new ZetaBlock("duskbound_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PURPUR_BLOCK))); - new QuarkBlock("duskbound_lantern", this, CreativeModeTab.TAB_BUILDING_BLOCKS, + new ZetaBlock("duskbound_lantern", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PURPUR_BLOCK) .lightLevel(b -> 15)); } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/FramedGlassModule.java b/src/main/java/org/violetmoon/quark/content/building/module/FramedGlassModule.java index 05f3a0eb46..b642a41108 100755 --- a/src/main/java/org/violetmoon/quark/content/building/module/FramedGlassModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/FramedGlassModule.java @@ -1,17 +1,16 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkGlassBlock; -import org.violetmoon.quark.base.block.QuarkInheritedPaneBlock; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.module.ZetaLoadModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; +import org.violetmoon.zeta.block.ZetaGlassBlock; +import org.violetmoon.zeta.block.ZetaInheritedPaneBlock; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.module.ZetaLoadModule; +import org.violetmoon.zeta.module.ZetaModule; @ZetaLoadModule(category = "building") public class FramedGlassModule extends ZetaModule { @@ -22,10 +21,10 @@ public final void register(ZRegister event) { .strength(3F, 10F) .sound(SoundType.GLASS); - new QuarkInheritedPaneBlock(new QuarkGlassBlock("framed_glass", this, CreativeModeTab.TAB_BUILDING_BLOCKS, false, props)); + new ZetaInheritedPaneBlock(new ZetaGlassBlock("framed_glass", this, CreativeModeTab.TAB_BUILDING_BLOCKS, false, props)); for(DyeColor dye : DyeColor.values()) - new QuarkInheritedPaneBlock(new QuarkGlassBlock(dye.getName() + "_framed_glass", this, CreativeModeTab.TAB_BUILDING_BLOCKS, true, props)); + new ZetaInheritedPaneBlock(new ZetaGlassBlock(dye.getName() + "_framed_glass", this, CreativeModeTab.TAB_BUILDING_BLOCKS, true, props)); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/GoldBarsModule.java b/src/main/java/org/violetmoon/quark/content/building/module/GoldBarsModule.java index 49c2a2626e..91322cb50f 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/GoldBarsModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/GoldBarsModule.java @@ -1,9 +1,15 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkPaneBlock; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockBehaviour.Properties; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.structure.BuiltinStructures; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.handler.StructureBlockReplacementHandler; import org.violetmoon.quark.base.handler.StructureBlockReplacementHandler.StructureHolder; +import org.violetmoon.zeta.block.ZetaPaneBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZConfigChanged; import org.violetmoon.zeta.event.load.ZRegister; @@ -11,13 +17,6 @@ import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; -import net.minecraft.world.level.ServerLevelAccessor; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.state.BlockBehaviour.Properties; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.levelgen.structure.BuiltinStructures; - @ZetaLoadModule(category = "building") public class GoldBarsModule extends ZetaModule { @@ -29,7 +28,7 @@ public class GoldBarsModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - gold_bars = new QuarkPaneBlock("gold_bars", this, Properties.copy(Blocks.IRON_BARS), RenderLayerRegistry.Layer.CUTOUT); + gold_bars = new ZetaPaneBlock("gold_bars", this, Properties.copy(Blocks.IRON_BARS), RenderLayerRegistry.Layer.CUTOUT); StructureBlockReplacementHandler.addReplacement(GoldBarsModule::getGenerationBarBlockState); } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/IndustrialPaletteModule.java b/src/main/java/org/violetmoon/quark/content/building/module/IndustrialPaletteModule.java index 9065a10623..2aea2ef8e2 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/IndustrialPaletteModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/IndustrialPaletteModule.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.building.module; +import java.util.function.BooleanSupplier; + import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; @@ -7,14 +9,11 @@ import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraftforge.common.util.ForgeSoundType; - -import java.util.function.BooleanSupplier; - -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.handler.VariantHandler; import org.violetmoon.quark.content.building.block.VariantLadderBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; @@ -43,10 +42,10 @@ public final void register(ZRegister event) { BooleanSupplier ironPlateCond = () -> enableIronPlates; BooleanSupplier ironLadderCond = () -> enableIronLadder; - VariantHandler.addSlabAndStairs(new QuarkBlock("iron_plate", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond)); - VariantHandler.addSlabAndStairs(new QuarkBlock("rusty_iron_plate", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond)); + VariantHandler.addSlabAndStairs(new ZetaBlock("iron_plate", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond)); + VariantHandler.addSlabAndStairs(new ZetaBlock("rusty_iron_plate", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond)); - new QuarkPillarBlock("iron_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond); + new ZetaPillarBlock("iron_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(ironPlateCond); new VariantLadderBlock("iron", this, Block.Properties.of(Material.DECORATION) .strength(0.8F) diff --git a/src/main/java/org/violetmoon/quark/content/building/module/JapanesePaletteModule.java b/src/main/java/org/violetmoon/quark/content/building/module/JapanesePaletteModule.java index c385427dad..6899b52a95 100755 --- a/src/main/java/org/violetmoon/quark/content/building/module/JapanesePaletteModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/JapanesePaletteModule.java @@ -12,12 +12,12 @@ import java.util.function.BooleanSupplier; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.content.building.block.BambooMatBlock; import org.violetmoon.quark.content.building.block.BambooMatCarpetBlock; import org.violetmoon.quark.content.building.block.PaperLanternBlock; import org.violetmoon.quark.content.building.block.PaperWallBlock; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; @@ -37,7 +37,7 @@ public final void register(ZRegister event) { BooleanSupplier paperBlockCond = () -> enablePaperBlocks; BooleanSupplier bambooMatCond = () -> enableBambooMats; - IQuarkBlock parent = new PaperLanternBlock("paper_lantern", this).setCondition(paperBlockCond); + IZetaBlock parent = new PaperLanternBlock("paper_lantern", this).setCondition(paperBlockCond); new PaperLanternBlock("paper_lantern_sakura", this).setCondition(paperBlockCond); new PaperWallBlock(parent, "paper_wall").setCondition(paperBlockCond); diff --git a/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java b/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java index bae3ad81e3..ecb18c4e24 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java @@ -3,8 +3,10 @@ import java.util.LinkedList; import java.util.List; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.ComposterBlock; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.quark.base.util.VanillaWoods; import org.violetmoon.quark.base.util.VanillaWoods.Wood; import org.violetmoon.quark.content.building.block.LeafCarpetBlock; @@ -20,10 +22,6 @@ import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.ComposterBlock; - @ZetaLoadModule(category = "building", antiOverlap = { "woodworks", "immersive_weathering" }) public class LeafCarpetModule extends ZetaModule { @@ -64,7 +62,7 @@ private void blossomCarpet(BlossomLeavesBlock base) { } private LeafCarpetBlock carpetBlock(Block base) { - LeafCarpetBlock carpet = new LeafCarpetBlock(IQuarkBlock.inherit(base, s -> s.replaceAll("_leaves", "_leaf_carpet")), base, this); + LeafCarpetBlock carpet = new LeafCarpetBlock(Quark.ZETA.registryUtil.inherit(base, s -> s.replaceAll("_leaves", "_leaf_carpet")), base, this); carpets.add(carpet); return carpet; } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/MidoriModule.java b/src/main/java/org/violetmoon/quark/content/building/module/MidoriModule.java index 8554e87dec..8965b08264 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/MidoriModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/MidoriModule.java @@ -1,21 +1,20 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; -import org.violetmoon.quark.base.handler.VariantHandler; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZLoadComplete; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.module.ZetaLoadModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.ComposterBlock; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZLoadComplete; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaLoadModule; +import org.violetmoon.zeta.module.ZetaModule; @ZetaLoadModule(category = "building") public class MidoriModule extends ZetaModule { @@ -24,14 +23,14 @@ public class MidoriModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - moss_paste = new QuarkItem("moss_paste", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); + moss_paste = new ZetaItem("moss_paste", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); Block.Properties props = Block.Properties.of(Material.STONE, MaterialColor.COLOR_LIGHT_GREEN) .requiresCorrectToolForDrops() .strength(1.5F, 6.0F); - VariantHandler.addSlabAndStairs(new QuarkBlock("midori_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); - new QuarkPillarBlock("midori_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); + VariantHandler.addSlabAndStairs(new ZetaBlock("midori_block", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); + new ZetaPillarBlock("midori_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); } @LoadEvent diff --git a/src/main/java/org/violetmoon/quark/content/building/module/MoreBrickTypesModule.java b/src/main/java/org/violetmoon/quark/content/building/module/MoreBrickTypesModule.java index 1740bd5531..4b59fdd1fc 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/MoreBrickTypesModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/MoreBrickTypesModule.java @@ -1,15 +1,14 @@ package org.violetmoon.quark.content.building.module; +import java.util.function.BooleanSupplier; + import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; - -import java.util.function.BooleanSupplier; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; @@ -53,7 +52,7 @@ public final void register(ZRegister event) { } private void add(String name, Block parent, BooleanSupplier cond) { - VariantHandler.addSlabStairsWall(new QuarkBlock(name + "_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, + VariantHandler.addSlabStairsWall(new ZetaBlock(name + "_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(parent) .requiresCorrectToolForDrops()) .setCondition(cond)); diff --git a/src/main/java/org/violetmoon/quark/content/building/module/MoreMudBlocksModule.java b/src/main/java/org/violetmoon/quark/content/building/module/MoreMudBlocksModule.java index 0c438fc556..ed4d08fc25 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/MoreMudBlocksModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/MoreMudBlocksModule.java @@ -1,18 +1,17 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockBehaviour.Properties; import org.violetmoon.quark.content.building.block.MudBrickLatticeBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.BlockBehaviour.Properties; - @ZetaLoadModule(category = "building") public class MoreMudBlocksModule extends ZetaModule { @@ -20,8 +19,8 @@ public class MoreMudBlocksModule extends ZetaModule { public final void register(ZRegister event) { BlockBehaviour.Properties props = Properties.copy(Blocks.MUD_BRICKS); - new QuarkBlock("carved_mud_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); - new QuarkPillarBlock("mud_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); + new ZetaBlock("carved_mud_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); + new ZetaPillarBlock("mud_pillar", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); new MudBrickLatticeBlock(this, props); } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/MoreStoneVariantsModule.java b/src/main/java/org/violetmoon/quark/content/building/module/MoreStoneVariantsModule.java index 7ded8ba947..68781f1e3e 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/MoreStoneVariantsModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/MoreStoneVariantsModule.java @@ -1,22 +1,21 @@ package org.violetmoon.quark.content.building.module; +import java.util.function.BooleanSupplier; + import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import java.util.function.BooleanSupplier; - -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkPillarBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.config.ConfigFlagManager; import org.violetmoon.quark.base.handler.VariantHandler; import org.violetmoon.quark.content.building.block.MyalitePillarBlock; import org.violetmoon.quark.content.world.block.MyaliteBlock; import org.violetmoon.quark.content.world.module.NewStoneTypesModule; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZRegister; @@ -64,20 +63,20 @@ public final void moreFlags(ZGatherAdditionalFlags event) { } public static void expandVanillaStone(ZetaModule module, Block raw, String name) { - NewStoneTypesModule.makeStone(module, raw, name, null, null, () -> true, null, QuarkBlock::new); + NewStoneTypesModule.makeStone(module, raw, name, null, null, () -> true, null, ZetaBlock::new); } private void add(String name, MaterialColor color, SoundType sound, BooleanSupplier cond) { - add(name, color, sound, cond, QuarkBlock::new, QuarkPillarBlock::new); + add(name, color, sound, cond, ZetaBlock::new, ZetaPillarBlock::new); } - private void add(String name, MaterialColor color, SoundType sound, BooleanSupplier cond, QuarkBlock.Constructor constr, QuarkBlock.Constructor pillarConstr) { + private void add(String name, MaterialColor color, SoundType sound, BooleanSupplier cond, ZetaBlock.Constructor constr, ZetaBlock.Constructor pillarConstr) { Block.Properties props = Block.Properties.of(Material.STONE, color) .requiresCorrectToolForDrops() .sound(sound) .strength(1.5F, 6.0F); - QuarkBlock bricks = constr.make(name + "_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props) + ZetaBlock bricks = constr.make(name + "_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props) .setCondition(() -> cond.getAsBoolean() && enableBricks); VariantHandler.addSlabStairsWall(bricks); diff --git a/src/main/java/org/violetmoon/quark/content/building/module/NetherBrickFenceGateModule.java b/src/main/java/org/violetmoon/quark/content/building/module/NetherBrickFenceGateModule.java index 20f67228ad..2f7071d8d0 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/NetherBrickFenceGateModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/NetherBrickFenceGateModule.java @@ -1,16 +1,15 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkFenceGateBlock; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.module.ZetaLoadModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.zeta.block.ZetaFenceGateBlock; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.module.ZetaLoadModule; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal @@ -20,7 +19,7 @@ public class NetherBrickFenceGateModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - new QuarkFenceGateBlock("nether_brick_fence_gate", this, CreativeModeTab.TAB_REDSTONE, + new ZetaFenceGateBlock("nether_brick_fence_gate", this, CreativeModeTab.TAB_REDSTONE, Block.Properties.of(Material.STONE, MaterialColor.NETHER) .requiresCorrectToolForDrops() .sound(SoundType.NETHER_BRICKS) diff --git a/src/main/java/org/violetmoon/quark/content/building/module/RawMetalBricksModule.java b/src/main/java/org/violetmoon/quark/content/building/module/RawMetalBricksModule.java index 096882b744..045d74b84f 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/RawMetalBricksModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/RawMetalBricksModule.java @@ -1,26 +1,25 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlock; +import com.google.common.collect.ImmutableSet; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockBehaviour.Properties; import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import com.google.common.collect.ImmutableSet; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.state.BlockBehaviour.Properties; - @ZetaLoadModule(category = "building") public class RawMetalBricksModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - IQuarkBlock iron = new QuarkBlock("raw_iron_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_IRON_BLOCK)); - IQuarkBlock gold = new QuarkBlock("raw_gold_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_GOLD_BLOCK)); - IQuarkBlock copper = new QuarkBlock("raw_copper_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_COPPER_BLOCK)); + IZetaBlock iron = new ZetaBlock("raw_iron_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_IRON_BLOCK)); + IZetaBlock gold = new ZetaBlock("raw_gold_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_GOLD_BLOCK)); + IZetaBlock copper = new ZetaBlock("raw_copper_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Properties.copy(Blocks.RAW_COPPER_BLOCK)); ImmutableSet.of(iron, gold, copper).forEach(VariantHandler::addSlabAndStairs); } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/ShinglesModule.java b/src/main/java/org/violetmoon/quark/content/building/module/ShinglesModule.java index eed0322b61..187ed1c09d 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/ShinglesModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/ShinglesModule.java @@ -1,39 +1,38 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; - @ZetaLoadModule(category = "building") public class ShinglesModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - VariantHandler.addSlabAndStairs(new QuarkBlock("shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("white_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.WHITE_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("orange_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.ORANGE_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("magenta_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.MAGENTA_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("light_blue_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIGHT_BLUE_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("yellow_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.YELLOW_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("lime_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIME_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("pink_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PINK_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("gray_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.GRAY_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("light_gray_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIGHT_GRAY_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("cyan_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.CYAN_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("purple_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PURPLE_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("blue_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BLUE_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("brown_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BROWN_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("green_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.GREEN_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("red_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.RED_TERRACOTTA))); - VariantHandler.addSlabAndStairs(new QuarkBlock("black_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BLACK_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("white_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.WHITE_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("orange_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.ORANGE_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("magenta_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.MAGENTA_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("light_blue_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIGHT_BLUE_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("yellow_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.YELLOW_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("lime_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIME_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("pink_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PINK_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("gray_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.GRAY_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("light_gray_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.LIGHT_GRAY_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("cyan_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.CYAN_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("purple_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.PURPLE_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("blue_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BLUE_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("brown_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BROWN_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("green_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.GREEN_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("red_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.RED_TERRACOTTA))); + VariantHandler.addSlabAndStairs(new ZetaBlock("black_shingles", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(Blocks.BLACK_TERRACOTTA))); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/SoulSandstoneModule.java b/src/main/java/org/violetmoon/quark/content/building/module/SoulSandstoneModule.java index 2d5cfbb3f4..1ef41c37a2 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/SoulSandstoneModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/SoulSandstoneModule.java @@ -1,17 +1,16 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MaterialColor; import org.violetmoon.quark.base.handler.VariantHandler; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.material.Material; -import net.minecraft.world.level.material.MaterialColor; - @ZetaLoadModule(category = "building") public class SoulSandstoneModule extends ZetaModule { @@ -21,10 +20,10 @@ public final void register(ZRegister event) { .requiresCorrectToolForDrops() .strength(0.8F); - VariantHandler.addSlabStairsWall(new QuarkBlock("soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); - new QuarkBlock("chiseled_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); - VariantHandler.addSlab(new QuarkBlock("cut_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); - VariantHandler.addSlabAndStairs(new QuarkBlock("smooth_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); + VariantHandler.addSlabStairsWall(new ZetaBlock("soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); + new ZetaBlock("chiseled_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); + VariantHandler.addSlab(new ZetaBlock("cut_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); + VariantHandler.addSlabAndStairs(new ZetaBlock("smooth_soul_sandstone", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props)); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/VerticalPlanksModule.java b/src/main/java/org/violetmoon/quark/content/building/module/VerticalPlanksModule.java index d21a1cd527..32c36e3455 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/VerticalPlanksModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/VerticalPlanksModule.java @@ -1,16 +1,15 @@ package org.violetmoon.quark.content.building.module; -import org.violetmoon.quark.base.block.QuarkBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Block; import org.violetmoon.quark.base.util.VanillaWoods; import org.violetmoon.quark.base.util.VanillaWoods.Wood; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; - @ZetaLoadModule(category = "building", antiOverlap = { "woodworks" }) public class VerticalPlanksModule extends ZetaModule { @@ -20,8 +19,8 @@ public final void register(ZRegister event) { add(type.name(), type.planks(), this); } - public static QuarkBlock add(String name, Block base, ZetaModule module) { - return new QuarkBlock("vertical_" + name + "_planks", module, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(base)); + public static ZetaBlock add(String name, Block base, ZetaModule module) { + return new ZetaBlock("vertical_" + name + "_planks", module, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(base)); } } diff --git a/src/main/java/org/violetmoon/quark/content/client/tooltip/EnchantedBookTooltips.java b/src/main/java/org/violetmoon/quark/content/client/tooltip/EnchantedBookTooltips.java index a3b170a423..370c3d8149 100755 --- a/src/main/java/org/violetmoon/quark/content/client/tooltip/EnchantedBookTooltips.java +++ b/src/main/java/org/violetmoon/quark/content/client/tooltip/EnchantedBookTooltips.java @@ -6,14 +6,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.client.module.ImprovedTooltipsModule; -import org.violetmoon.quark.content.tools.item.AncientTomeItem; -import org.violetmoon.quark.content.tools.module.AncientTomesModule; -import org.violetmoon.zeta.client.event.play.ZGatherTooltipComponents; -import org.violetmoon.zeta.util.ItemNBTHelper; - import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.mojang.blaze3d.systems.RenderSystem; @@ -34,6 +26,13 @@ import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.EnchantmentInstance; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.content.client.module.ImprovedTooltipsModule; +import org.violetmoon.quark.content.tools.item.AncientTomeItem; +import org.violetmoon.quark.content.tools.module.AncientTomesModule; +import org.violetmoon.zeta.client.event.play.ZGatherTooltipComponents; +import org.violetmoon.zeta.module.IDisableable; +import org.violetmoon.zeta.util.ItemNBTHelper; public class EnchantedBookTooltips { @@ -90,7 +89,7 @@ private static List getItemsForEnchantment(Enchantment e, boolean onl for(ItemStack stack : getTestItems()) { Item item = stack.getItem(); - if(item instanceof QuarkItem && !((QuarkItem) item).isEnabled()) + if(item instanceof IDisableable disableable && !disableable.isEnabled()) continue; if(!stack.isEmpty() && e.canEnchant(stack)) { diff --git a/src/main/java/org/violetmoon/quark/content/experimental/item/HammerItem.java b/src/main/java/org/violetmoon/quark/content/experimental/item/HammerItem.java index 0a776b2860..02f71c71da 100644 --- a/src/main/java/org/violetmoon/quark/content/experimental/item/HammerItem.java +++ b/src/main/java/org/violetmoon/quark/content/experimental/item/HammerItem.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.experimental.module.VariantSelectorModule; -import org.violetmoon.quark.content.tweaks.module.LockRotationModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionResult; @@ -18,8 +13,12 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.quark.content.experimental.module.VariantSelectorModule; +import org.violetmoon.quark.content.tweaks.module.LockRotationModule; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; -public class HammerItem extends QuarkItem { +public class HammerItem extends ZetaItem { public HammerItem(ZetaModule module) { super("hammer", module, new Item.Properties() diff --git a/src/main/java/org/violetmoon/quark/content/mobs/item/DiamondHeartItem.java b/src/main/java/org/violetmoon/quark/content/mobs/item/DiamondHeartItem.java index 598c5522f7..263a2c6ce2 100755 --- a/src/main/java/org/violetmoon/quark/content/mobs/item/DiamondHeartItem.java +++ b/src/main/java/org/violetmoon/quark/content/mobs/item/DiamondHeartItem.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.mobs.item; +import javax.annotation.Nonnull; + import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -17,16 +19,13 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LevelEvent; import net.minecraft.world.level.block.state.BlockState; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.mobs.entity.Stoneling; import org.violetmoon.quark.content.mobs.entity.Stoneling.StonelingVariant; import org.violetmoon.quark.content.mobs.module.StonelingsModule; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; -public class DiamondHeartItem extends QuarkItem { +public class DiamondHeartItem extends ZetaItem { public DiamondHeartItem(String regname, ZetaModule module, Properties properties) { super(regname, module, properties); diff --git a/src/main/java/org/violetmoon/quark/content/mobs/item/SoulBeadItem.java b/src/main/java/org/violetmoon/quark/content/mobs/item/SoulBeadItem.java index ede03ee1b1..c82e09c9cb 100644 --- a/src/main/java/org/violetmoon/quark/content/mobs/item/SoulBeadItem.java +++ b/src/main/java/org/violetmoon/quark/content/mobs/item/SoulBeadItem.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.mobs.item; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundSource; @@ -13,16 +15,13 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.base.handler.QuarkSounds; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.mobs.entity.SoulBead; import org.violetmoon.quark.content.mobs.module.WraithModule; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; -public class SoulBeadItem extends QuarkItem { +public class SoulBeadItem extends ZetaItem { public SoulBeadItem(ZetaModule module) { super("soul_bead", module, new Item.Properties().tab(CreativeModeTab.TAB_MISC)); diff --git a/src/main/java/org/violetmoon/quark/content/mobs/module/CrabsModule.java b/src/main/java/org/violetmoon/quark/content/mobs/module/CrabsModule.java index 6a8b34b352..5ea1e441d3 100644 --- a/src/main/java/org/violetmoon/quark/content/mobs/module/CrabsModule.java +++ b/src/main/java/org/violetmoon/quark/content/mobs/module/CrabsModule.java @@ -1,29 +1,5 @@ package org.violetmoon.quark.content.mobs.module; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.config.Config; -import org.violetmoon.quark.base.config.type.CompoundBiomeConfig; -import org.violetmoon.quark.base.config.type.EntitySpawnConfig; -import org.violetmoon.quark.base.handler.GeneralConfig; -import org.violetmoon.quark.base.handler.QuarkSounds; -import org.violetmoon.zeta.advancement.modifier.BalancedDietModifier; -import org.violetmoon.zeta.advancement.modifier.FuriousCocktailModifier; -import org.violetmoon.zeta.advancement.modifier.TwoByTwoModifier; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.base.item.QuarkMobBucketItem; -import org.violetmoon.quark.base.util.QuarkEffect; -import org.violetmoon.quark.base.world.EntitySpawnHandler; -import org.violetmoon.quark.content.mobs.client.render.entity.CrabRenderer; -import org.violetmoon.quark.content.mobs.entity.Crab; -import org.violetmoon.zeta.client.event.load.ZClientSetup; -import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.load.ZCommonSetup; -import org.violetmoon.zeta.event.load.ZEntityAttributeCreation; -import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.module.ZetaLoadModule; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.util.Hint; - import com.google.common.collect.ImmutableSet; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.core.Registry; @@ -45,6 +21,29 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.levelgen.Heightmap.Types; import net.minecraft.world.level.material.Fluids; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.config.Config; +import org.violetmoon.quark.base.config.type.CompoundBiomeConfig; +import org.violetmoon.quark.base.config.type.EntitySpawnConfig; +import org.violetmoon.quark.base.handler.GeneralConfig; +import org.violetmoon.quark.base.handler.QuarkSounds; +import org.violetmoon.quark.base.util.QuarkEffect; +import org.violetmoon.quark.base.world.EntitySpawnHandler; +import org.violetmoon.quark.content.mobs.client.render.entity.CrabRenderer; +import org.violetmoon.quark.content.mobs.entity.Crab; +import org.violetmoon.zeta.advancement.modifier.BalancedDietModifier; +import org.violetmoon.zeta.advancement.modifier.FuriousCocktailModifier; +import org.violetmoon.zeta.advancement.modifier.TwoByTwoModifier; +import org.violetmoon.zeta.client.event.load.ZClientSetup; +import org.violetmoon.zeta.event.bus.LoadEvent; +import org.violetmoon.zeta.event.load.ZCommonSetup; +import org.violetmoon.zeta.event.load.ZEntityAttributeCreation; +import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.item.ZetaMobBucketItem; +import org.violetmoon.zeta.module.ZetaLoadModule; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.util.Hint; /** * @author WireSegal @@ -74,7 +73,7 @@ public class CrabsModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - crab_leg = new QuarkItem("crab_leg", this, new Item.Properties() + crab_leg = new ZetaItem("crab_leg", this, new Item.Properties() .tab(CreativeModeTab.TAB_FOOD) .food(new FoodProperties.Builder() .meat() @@ -82,7 +81,7 @@ public final void register(ZRegister event) { .saturationMod(0.3F) .build())); - Item cookedCrabLeg = new QuarkItem("cooked_crab_leg", this, new Item.Properties() + Item cookedCrabLeg = new ZetaItem("cooked_crab_leg", this, new Item.Properties() .tab(CreativeModeTab.TAB_FOOD) .food(new FoodProperties.Builder() .meat() @@ -90,10 +89,10 @@ public final void register(ZRegister event) { .saturationMod(0.8F) .build())); - crab_shell = new QuarkItem("crab_shell", this, new Item.Properties().tab(CreativeModeTab.TAB_BREWING)) + crab_shell = new ZetaItem("crab_shell", this, new Item.Properties().tab(CreativeModeTab.TAB_BREWING)) .setCondition(() -> enableBrewing); - crab_bucket = new QuarkMobBucketItem(() -> crabType, () -> Fluids.WATER, () -> QuarkSounds.BUCKET_EMPTY_CRAB, "crab_bucket", this); + crab_bucket = new ZetaMobBucketItem(() -> crabType, () -> Fluids.WATER, () -> QuarkSounds.BUCKET_EMPTY_CRAB, "crab_bucket", this); resilience = new QuarkEffect("resilience", MobEffectCategory.BENEFICIAL, 0x5b1a04); resilience.addAttributeModifier(Attributes.KNOCKBACK_RESISTANCE, "2ddf3f0a-f386-47b6-aeb0-6bd32851f215", 0.5, AttributeModifier.Operation.ADDITION); diff --git a/src/main/java/org/violetmoon/quark/content/tools/block/CloudBlock.java b/src/main/java/org/violetmoon/quark/content/tools/block/CloudBlock.java index 44def85483..71996823ce 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/block/CloudBlock.java +++ b/src/main/java/org/violetmoon/quark/content/tools/block/CloudBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.tools.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; @@ -23,17 +25,13 @@ import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.content.tools.block.be.CloudBlockEntity; import org.violetmoon.quark.content.tools.module.BottledCloudModule; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -public class CloudBlock extends QuarkBlock implements EntityBlock { +public class CloudBlock extends ZetaBlock implements EntityBlock { public CloudBlock(ZetaModule module) { super("cloud", module, null, diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/AbacusItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/AbacusItem.java index 2a1bf7db10..a7ba761c94 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/AbacusItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/AbacusItem.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.tools.item; +import javax.annotation.Nonnull; + import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.BlockPos; @@ -13,14 +15,11 @@ import net.minecraft.world.level.Level; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.item.QuarkItem; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.ItemNBTHelper; -public class AbacusItem extends QuarkItem { +public class AbacusItem extends ZetaItem { public static final String TAG_POS_X = "boundPosX"; public static final String TAG_POS_Y = "boundPosY"; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/AncientTomeItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/AncientTomeItem.java index d3d6c3db68..b1f9163f6b 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/AncientTomeItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/AncientTomeItem.java @@ -1,24 +1,28 @@ package org.violetmoon.quark.content.tools.item; +import java.util.List; + +import javax.annotation.Nonnull; + import net.minecraft.ChatFormatting; import net.minecraft.core.NonNullList; import net.minecraft.core.Registry; import net.minecraft.network.chat.Component; -import net.minecraft.world.item.*; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.EnchantedBookItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Rarity; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentInstance; import net.minecraft.world.level.Level; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.experimental.module.EnchantmentsBegoneModule; import org.violetmoon.quark.content.tools.module.AncientTomesModule; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; -import java.util.List; - -public class AncientTomeItem extends QuarkItem { +public class AncientTomeItem extends ZetaItem { public AncientTomeItem(ZetaModule module) { super("ancient_tome", module, diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/BottledCloudItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/BottledCloudItem.java index 47f66c6dc1..c58396cc48 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/BottledCloudItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/BottledCloudItem.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.tools.item; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -11,20 +13,17 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.ClipContext.Block; import net.minecraft.world.level.ClipContext.Fluid; -import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.Level; +import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.tools.module.BottledCloudModule; import org.violetmoon.quark.integration.claim.IClaimIntegration; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; -public class BottledCloudItem extends QuarkItem { +public class BottledCloudItem extends ZetaItem { public BottledCloudItem(ZetaModule module) { super("bottled_cloud", module, new Item.Properties().tab(CreativeModeTab.TAB_TOOLS)); diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/ParrotEggItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/ParrotEggItem.java index 0155b1fd22..c53b8c9b99 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/ParrotEggItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/ParrotEggItem.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.tools.entity.ParrotEgg; -import org.violetmoon.quark.content.tools.module.ParrotEggsModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -18,8 +13,12 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import org.violetmoon.quark.content.tools.entity.ParrotEgg; +import org.violetmoon.quark.content.tools.module.ParrotEggsModule; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; -public class ParrotEggItem extends QuarkItem { +public class ParrotEggItem extends ZetaItem { private final int variant; public ParrotEggItem(String suffix, int variant, ZetaModule module) { diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/PathfindersQuillItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/PathfindersQuillItem.java index 0438b9656f..38fde78c30 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/PathfindersQuillItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/PathfindersQuillItem.java @@ -9,16 +9,6 @@ import javax.annotation.Nullable; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.QuarkClient; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.mobs.module.StonelingsModule; -import org.violetmoon.quark.content.tools.module.PathfinderMapsModule; -import org.violetmoon.quark.content.tools.module.PathfinderMapsModule.TradeInfo; -import org.violetmoon.quark.content.world.module.GlimmeringWealdModule; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.util.ItemNBTHelper; - import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -53,8 +43,17 @@ import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.QuarkClient; +import org.violetmoon.quark.content.mobs.module.StonelingsModule; +import org.violetmoon.quark.content.tools.module.PathfinderMapsModule; +import org.violetmoon.quark.content.tools.module.PathfinderMapsModule.TradeInfo; +import org.violetmoon.quark.content.world.module.GlimmeringWealdModule; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.util.ItemNBTHelper; -public class PathfindersQuillItem extends QuarkItem { +public class PathfindersQuillItem extends ZetaItem { private static final Direction[] DIRECTIONS = new Direction[]{Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.NORTH}; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/PickarangItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/PickarangItem.java index b3bfdb9f12..d4ce59d9dc 100755 --- a/src/main/java/org/violetmoon/quark/content/tools/item/PickarangItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/PickarangItem.java @@ -1,5 +1,10 @@ package org.violetmoon.quark.content.tools.item; +import java.util.HashMap; +import java.util.HashSet; + +import javax.annotation.Nonnull; + import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; @@ -24,22 +29,15 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.base.Quark; import org.violetmoon.quark.base.handler.QuarkSounds; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.tools.config.PickarangType; import org.violetmoon.quark.content.tools.entity.rang.AbstractPickarang; import org.violetmoon.quark.content.tools.module.PickarangModule; -import org.violetmoon.zeta.item.ext.IZetaItemExtensions; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; -import java.util.HashMap; -import java.util.HashSet; - -public class PickarangItem extends QuarkItem { +public class PickarangItem extends ZetaItem { public final PickarangType type; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/RuneItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/RuneItem.java index ced1f57b3c..9993d1f4ec 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/RuneItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/RuneItem.java @@ -2,19 +2,18 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.api.IRuneColorProvider; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import org.violetmoon.quark.api.IRuneColorProvider; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 2:27 PM on 8/17/19. */ -public class RuneItem extends QuarkItem implements IRuneColorProvider { +public class RuneItem extends ZetaItem implements IRuneColorProvider { private final int color; private final boolean glow; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/SeedPouchItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/SeedPouchItem.java index a56b283059..46c2478c67 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/SeedPouchItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/SeedPouchItem.java @@ -1,5 +1,11 @@ package org.violetmoon.quark.content.tools.item; +import java.util.List; +import java.util.Optional; +import java.util.function.Predicate; + +import javax.annotation.Nonnull; + import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; @@ -25,19 +31,14 @@ import org.apache.commons.lang3.tuple.Pair; import org.violetmoon.quark.api.ITrowelable; import org.violetmoon.quark.api.IUsageTickerOverride; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.tools.module.SeedPouchModule; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.IDisableable; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.ItemNBTHelper; import org.violetmoon.zeta.util.RegistryUtil; -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Optional; -import java.util.function.Predicate; - -public class SeedPouchItem extends QuarkItem implements IUsageTickerOverride, ITrowelable { +public class SeedPouchItem extends ZetaItem implements IUsageTickerOverride, ITrowelable { public static final String TAG_STORED_ITEM = "storedItem"; public static final String TAG_COUNT = "itemCount"; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/SlimeInABucketItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/SlimeInABucketItem.java index cfeb7151b7..09240fbb6d 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/SlimeInABucketItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/SlimeInABucketItem.java @@ -2,10 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.util.ItemNBTHelper; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -31,8 +27,11 @@ import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.levelgen.WorldgenRandom; import net.minecraft.world.phys.Vec3; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.util.ItemNBTHelper; -public class SlimeInABucketItem extends QuarkItem { +public class SlimeInABucketItem extends ZetaItem { public static final String TAG_ENTITY_DATA = "slime_nbt"; public static final String TAG_EXCITED = "excited"; diff --git a/src/main/java/org/violetmoon/quark/content/tools/item/TrowelItem.java b/src/main/java/org/violetmoon/quark/content/tools/item/TrowelItem.java index b08b36d49d..9d5f60cc3c 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/item/TrowelItem.java +++ b/src/main/java/org/violetmoon/quark/content/tools/item/TrowelItem.java @@ -1,5 +1,11 @@ package org.violetmoon.quark.content.tools.item; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import javax.annotation.Nonnull; + import net.minecraft.nbt.CompoundTag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -12,22 +18,15 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.phys.BlockHitResult; - -import javax.annotation.Nonnull; - import org.violetmoon.quark.api.ITrowelable; import org.violetmoon.quark.api.IUsageTickerOverride; import org.violetmoon.quark.base.handler.MiscUtil; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.tools.module.TrowelModule; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.ItemNBTHelper; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -public class TrowelItem extends QuarkItem implements IUsageTickerOverride { +public class TrowelItem extends ZetaItem implements IUsageTickerOverride { private static final String TAG_PLACING_SEED = "placing_seed"; private static final String TAG_LAST_STACK = "last_stack"; diff --git a/src/main/java/org/violetmoon/quark/content/tools/module/TorchArrowModule.java b/src/main/java/org/violetmoon/quark/content/tools/module/TorchArrowModule.java index fcf7254b36..5917db84a1 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/module/TorchArrowModule.java +++ b/src/main/java/org/violetmoon/quark/content/tools/module/TorchArrowModule.java @@ -1,26 +1,25 @@ package org.violetmoon.quark.content.tools.module; +import net.minecraft.client.renderer.entity.EntityRenderers; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobCategory; +import net.minecraft.world.item.Item; import org.violetmoon.quark.base.Quark; import org.violetmoon.quark.base.config.Config; -import org.violetmoon.quark.base.item.QuarkArrowItem; import org.violetmoon.quark.content.tools.client.render.entity.TorchArrowRenderer; import org.violetmoon.quark.content.tools.entity.TorchArrow; import org.violetmoon.zeta.client.event.load.ZClientSetup; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.item.ZetaArrowItem; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; -import net.minecraft.client.renderer.entity.EntityRenderers; -import net.minecraft.core.Registry; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.TagKey; -import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.MobCategory; -import net.minecraft.world.item.Item; - @ZetaLoadModule(category = "tools") public class TorchArrowModule extends ZetaModule { @@ -34,7 +33,7 @@ public class TorchArrowModule extends ZetaModule { @LoadEvent public final void register(ZRegister event) { - torch_arrow = new QuarkArrowItem.Impl("torch_arrow", this, (level, stack, living) -> new TorchArrow(level, living)); + torch_arrow = new ZetaArrowItem.Impl("torch_arrow", this, (level, stack, living) -> new TorchArrow(level, living)); torchArrowType = EntityType.Builder.of(TorchArrow::new, MobCategory.MISC) .sized(0.5F, 0.5F) diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/block/DirtyGlassBlock.java b/src/main/java/org/violetmoon/quark/content/tweaks/block/DirtyGlassBlock.java index 2901692d88..8c510fb738 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/block/DirtyGlassBlock.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/block/DirtyGlassBlock.java @@ -2,19 +2,18 @@ import javax.annotation.Nullable; -import org.violetmoon.quark.base.block.QuarkGlassBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.block.ZetaGlassBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 12:49 PM on 8/24/19. */ -public class DirtyGlassBlock extends QuarkGlassBlock { +public class DirtyGlassBlock extends ZetaGlassBlock { private static final float[] BEACON_COLOR_MULTIPLIER = new float[] { 0.25F, 0.125F, 0F }; diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/DragonScalesModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/DragonScalesModule.java index b0d547717f..327a30736e 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/DragonScalesModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/DragonScalesModule.java @@ -1,23 +1,22 @@ package org.violetmoon.quark.content.tweaks.module; -import org.violetmoon.quark.base.item.QuarkItem; +import net.minecraft.core.Registry; +import net.minecraft.world.entity.boss.enderdragon.EnderDragon; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; import org.violetmoon.quark.content.tweaks.recipe.ElytraDuplicationRecipe; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.event.play.entity.living.ZLivingTick; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; -import net.minecraft.core.Registry; -import net.minecraft.world.entity.boss.enderdragon.EnderDragon; -import net.minecraft.world.entity.item.ItemEntity; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.phys.Vec3; - @ZetaLoadModule(category = "tweaks") public class DragonScalesModule extends ZetaModule { @@ -27,7 +26,7 @@ public class DragonScalesModule extends ZetaModule { public final void register(ZRegister event) { event.getRegistry().register(ElytraDuplicationRecipe.SERIALIZER, "elytra_duplication", Registry.RECIPE_SERIALIZER_REGISTRY); - dragon_scale = new QuarkItem("dragon_scale", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); + dragon_scale = new ZetaItem("dragon_scale", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); } @PlayEvent diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/GlassShardModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/GlassShardModule.java index 6dd0674c2a..965f904eaa 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/GlassShardModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/GlassShardModule.java @@ -1,5 +1,8 @@ package org.violetmoon.quark.content.tweaks.module; +import java.util.HashMap; +import java.util.Map; + import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; @@ -10,18 +13,14 @@ import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import java.util.HashMap; -import java.util.Map; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkInheritedPaneBlock; -import org.violetmoon.quark.base.item.QuarkItem; import org.violetmoon.quark.content.tweaks.block.DirtyGlassBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaInheritedPaneBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.event.load.ZRegister; +import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; @@ -32,7 +31,7 @@ @ZetaLoadModule(category = "tweaks") public class GlassShardModule extends ZetaModule { - public static QuarkBlock dirtyGlass; + public static ZetaBlock dirtyGlass; public static TagKey shardTag; @@ -45,13 +44,13 @@ public class GlassShardModule extends ZetaModule { public final void register(ZRegister event) { dirtyGlass = new DirtyGlassBlock("dirty_glass", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.GLASS, MaterialColor.COLOR_BROWN).strength(0.3F).sound(SoundType.GLASS)); - new QuarkInheritedPaneBlock(dirtyGlass); + new ZetaInheritedPaneBlock(dirtyGlass); - clearShard = new QuarkItem("clear_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); - dirtyShard = new QuarkItem("dirty_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); + clearShard = new ZetaItem("clear_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); + dirtyShard = new ZetaItem("dirty_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)); for(DyeColor color : DyeColor.values()) - shardColors.put(color, new QuarkItem(color.getSerializedName() + "_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS))); + shardColors.put(color, new ZetaItem(color.getSerializedName() + "_shard", this, new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS))); } @LoadEvent diff --git a/src/main/java/org/violetmoon/quark/content/world/block/AncientSaplingBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/AncientSaplingBlock.java index 6a4cb31def..61a24c46c6 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/AncientSaplingBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/AncientSaplingBlock.java @@ -9,13 +9,8 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkSaplingBlock; -import org.violetmoon.quark.content.world.module.AncientWoodModule; -import org.violetmoon.zeta.module.ZetaModule; - import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; - import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.util.RandomSource; @@ -35,8 +30,11 @@ import net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecoratorType; import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer; import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType; +import org.violetmoon.quark.content.world.module.AncientWoodModule; +import org.violetmoon.zeta.block.ZetaSaplingBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class AncientSaplingBlock extends QuarkSaplingBlock { +public class AncientSaplingBlock extends ZetaSaplingBlock { public AncientSaplingBlock(ZetaModule module) { super("ancient", module, new AncientTree()); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/BlossomLeavesBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/BlossomLeavesBlock.java index bd9a7c205f..74fd056171 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/BlossomLeavesBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/BlossomLeavesBlock.java @@ -2,10 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkLeavesBlock; -import org.violetmoon.quark.content.world.module.BlossomTreesModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.particles.BlockParticleOption; import net.minecraft.core.particles.ParticleTypes; @@ -13,8 +9,11 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.quark.content.world.module.BlossomTreesModule; +import org.violetmoon.zeta.block.ZetaLeavesBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class BlossomLeavesBlock extends QuarkLeavesBlock { +public class BlossomLeavesBlock extends ZetaLeavesBlock { public BlossomLeavesBlock(String colorName, ZetaModule module, MaterialColor color) { super(colorName + "_blossom", module, color); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/BlossomSaplingBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/BlossomSaplingBlock.java index 068448b42f..82b813dbb7 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/BlossomSaplingBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/BlossomSaplingBlock.java @@ -4,10 +4,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkSaplingBlock; -import org.violetmoon.quark.content.world.module.BlossomTreesModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.Holder; import net.minecraft.util.RandomSource; import net.minecraft.util.valueproviders.ConstantInt; @@ -21,8 +17,11 @@ import net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; import net.minecraft.world.level.levelgen.feature.trunkplacers.FancyTrunkPlacer; +import org.violetmoon.quark.content.world.module.BlossomTreesModule; +import org.violetmoon.zeta.block.ZetaSaplingBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class BlossomSaplingBlock extends QuarkSaplingBlock { +public class BlossomSaplingBlock extends ZetaSaplingBlock { public BlossomSaplingBlock(String colorName, ZetaModule module, BlossomTree tree) { super(colorName + "_blossom", module, tree); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java index 7f86954636..e51444d73c 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java @@ -2,11 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.content.world.module.ChorusVegetationModule; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; @@ -37,8 +32,12 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.IForgeShearable; +import org.violetmoon.quark.content.world.module.ChorusVegetationModule; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class ChorusVegetationBlock extends QuarkBlock implements BonemealableBlock, IForgeShearable { +public class ChorusVegetationBlock extends ZetaBlock implements BonemealableBlock, IForgeShearable { protected static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 13, 14); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/CorundumBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/CorundumBlock.java index 609e4d32b1..71f6f192a0 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/CorundumBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/CorundumBlock.java @@ -3,14 +3,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkGlassBlock; -import org.violetmoon.quark.content.world.module.CorundumModule; -import org.violetmoon.quark.content.world.module.SpiralSpiresModule; -import org.violetmoon.zeta.module.ZetaModule; - import com.mojang.math.Vector3f; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.DustParticleOptions; @@ -25,12 +18,17 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.content.world.module.CorundumModule; +import org.violetmoon.quark.content.world.module.SpiralSpiresModule; +import org.violetmoon.zeta.block.ZetaGlassBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 12:31 PM on 9/19/19. */ -public class CorundumBlock extends QuarkGlassBlock { +public class CorundumBlock extends ZetaGlassBlock { public final float[] colorComponents; public final boolean waxed; diff --git a/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java index 2c35ee6167..2204e5a2bd 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java @@ -2,10 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.tags.FluidTags; @@ -28,8 +24,11 @@ import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class CorundumClusterBlock extends QuarkBlock implements SimpleWaterloggedBlock { +public class CorundumClusterBlock extends ZetaBlock implements SimpleWaterloggedBlock { public final CorundumBlock base; @@ -55,7 +54,7 @@ public class CorundumClusterBlock extends QuarkBlock implements SimpleWaterlogge } public CorundumClusterBlock(CorundumBlock base) { - super(IQuarkBlock.inheritQuark(base, "%s_cluster"), base.getModule(), CreativeModeTab.TAB_DECORATIONS, + super(Quark.ZETA.registryUtil.inheritQuark(base, "%s_cluster"), base.getModule(), CreativeModeTab.TAB_DECORATIONS, Block.Properties.copy(base) .sound(SoundType.AMETHYST_CLUSTER)); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/ElderPrismarineBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/ElderPrismarineBlock.java index b85a8fc90a..6ee81fdb30 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/ElderPrismarineBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/ElderPrismarineBlock.java @@ -1,14 +1,13 @@ package org.violetmoon.quark.content.world.block; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class ElderPrismarineBlock extends QuarkBlock { +public class ElderPrismarineBlock extends ZetaBlock { public ElderPrismarineBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(regname, module, creativeTab, properties); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/GlowLichenGrowthBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/GlowLichenGrowthBlock.java index cca5273351..9444e136f6 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/GlowLichenGrowthBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/GlowLichenGrowthBlock.java @@ -5,12 +5,7 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBushBlock; -import org.violetmoon.quark.base.handler.MiscUtil; -import org.violetmoon.zeta.module.ZetaModule; - import com.google.common.collect.Lists; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; @@ -25,8 +20,11 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; +import org.violetmoon.quark.base.handler.MiscUtil; +import org.violetmoon.zeta.block.ZetaBushBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class GlowLichenGrowthBlock extends QuarkBushBlock implements BonemealableBlock { +public class GlowLichenGrowthBlock extends ZetaBushBlock implements BonemealableBlock { protected static final VoxelShape SHAPE = Block.box(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomBlock.java index aad378268a..1d2f8c94b0 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomBlock.java @@ -2,9 +2,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.QuarkBushBlock; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; @@ -18,8 +15,10 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; +import org.violetmoon.zeta.block.ZetaBushBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class GlowShroomBlock extends QuarkBushBlock implements BonemealableBlock { +public class GlowShroomBlock extends ZetaBushBlock implements BonemealableBlock { protected static final VoxelShape SHAPE = Block.box(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java index 5acf168a72..dbdf165758 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java @@ -1,5 +1,9 @@ package org.violetmoon.quark.content.world.block; +import java.util.Map; + +import javax.annotation.Nonnull; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import net.minecraft.core.BlockPos; @@ -9,7 +13,13 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -22,17 +32,12 @@ import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; - -import javax.annotation.Nonnull; - -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 java.util.Map; - // Mostly a copy of BaseCoralWallFanBlock -public class GlowShroomRingBlock extends QuarkBlock implements SimpleWaterloggedBlock { +public class GlowShroomRingBlock extends ZetaBlock implements SimpleWaterloggedBlock { public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; diff --git a/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java index 083d3f7f89..bc19f453fd 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java @@ -4,11 +4,6 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.handler.MiscUtil; -import org.violetmoon.quark.content.world.module.GlimmeringWealdModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; @@ -21,8 +16,12 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.HugeMushroomBlock; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.quark.base.handler.MiscUtil; +import org.violetmoon.quark.content.world.module.GlimmeringWealdModule; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class HugeGlowShroomBlock extends HugeMushroomBlock implements IQuarkBlock { +public class HugeGlowShroomBlock extends HugeMushroomBlock implements IZetaBlock { private final ZetaModule module; private final boolean glowing; @@ -134,7 +133,7 @@ public ZetaModule getModule() { } @Override - public IQuarkBlock setCondition(BooleanSupplier condition) { + public IZetaBlock setCondition(BooleanSupplier condition) { return this; } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java index 13fdd8656f..fd6ebf309e 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.world.block; +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -12,16 +14,13 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.pathfinder.PathComputationType; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.content.world.block.be.MonsterBoxBlockEntity; import org.violetmoon.quark.content.world.module.MonsterBoxModule; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class MonsterBoxBlock extends QuarkBlock implements EntityBlock { +public class MonsterBoxBlock extends ZetaBlock implements EntityBlock { public MonsterBoxBlock(ZetaModule module) { super("monster_box", module, null, diff --git a/src/main/java/org/violetmoon/quark/content/world/block/MyaliteBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/MyaliteBlock.java index f4f77348aa..cc19a8b0f1 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/MyaliteBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/MyaliteBlock.java @@ -2,11 +2,11 @@ import net.minecraft.world.item.CreativeModeTab; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.QuarkBlock; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -public class MyaliteBlock extends QuarkBlock implements IZetaBlockColorProvider { +public class MyaliteBlock extends ZetaBlock implements IZetaBlockColorProvider { public MyaliteBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(regname, module, creativeTab, properties); diff --git a/src/main/java/org/violetmoon/quark/content/world/block/MyaliteCrystalBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/MyaliteCrystalBlock.java index b196776975..48a684106e 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/MyaliteCrystalBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/MyaliteCrystalBlock.java @@ -9,11 +9,11 @@ import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.QuarkGlassBlock; +import org.violetmoon.zeta.block.ZetaGlassBlock; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -public class MyaliteCrystalBlock extends QuarkGlassBlock implements IZetaBlockColorProvider { +public class MyaliteCrystalBlock extends ZetaGlassBlock implements IZetaBlockColorProvider { public MyaliteCrystalBlock(ZetaModule module) { super("myalite_crystal", module, CreativeModeTab.TAB_DECORATIONS, true, diff --git a/src/main/java/org/violetmoon/quark/content/world/item/AncientFruitItem.java b/src/main/java/org/violetmoon/quark/content/world/item/AncientFruitItem.java index 937f5ab1cd..c2c2b8cd3e 100644 --- a/src/main/java/org/violetmoon/quark/content/world/item/AncientFruitItem.java +++ b/src/main/java/org/violetmoon/quark/content/world/item/AncientFruitItem.java @@ -1,9 +1,5 @@ package org.violetmoon.quark.content.world.item; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.world.module.AncientWoodModule; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.entity.LivingEntity; @@ -13,8 +9,11 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import org.violetmoon.quark.content.world.module.AncientWoodModule; +import org.violetmoon.zeta.item.ZetaItem; +import org.violetmoon.zeta.module.ZetaModule; -public class AncientFruitItem extends QuarkItem { +public class AncientFruitItem extends ZetaItem { public AncientFruitItem(ZetaModule module) { super("ancient_fruit", module, new Item.Properties().tab(CreativeModeTab.TAB_FOOD) diff --git a/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java b/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java index 334bfb2165..d5a3679e13 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java @@ -1,17 +1,27 @@ package org.violetmoon.quark.content.world.module; +import com.google.common.base.Functions; +import com.google.common.collect.ImmutableSet; +import net.minecraft.core.Registry; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.ComposterBlock; +import net.minecraft.world.level.material.MaterialColor; +import net.minecraft.world.level.storage.loot.BuiltInLootTables; +import net.minecraft.world.level.storage.loot.entries.LootItem; +import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkLeavesBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.config.Config.Min; import org.violetmoon.quark.base.handler.GeneralConfig; import org.violetmoon.quark.base.handler.VariantHandler; import org.violetmoon.quark.base.handler.WoodSetHandler; import org.violetmoon.quark.base.handler.WoodSetHandler.WoodSet; -import org.violetmoon.zeta.advancement.ManualTrigger; -import org.violetmoon.zeta.advancement.modifier.BalancedDietModifier; import org.violetmoon.quark.content.world.block.AncientSaplingBlock; import org.violetmoon.quark.content.world.item.AncientFruitItem; +import org.violetmoon.zeta.advancement.ManualTrigger; +import org.violetmoon.zeta.advancement.modifier.BalancedDietModifier; +import org.violetmoon.zeta.block.ZetaLeavesBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; @@ -21,18 +31,6 @@ import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; -import com.google.common.base.Functions; -import com.google.common.collect.ImmutableSet; - -import net.minecraft.core.Registry; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.ComposterBlock; -import net.minecraft.world.level.material.MaterialColor; -import net.minecraft.world.level.storage.loot.BuiltInLootTables; -import net.minecraft.world.level.storage.loot.entries.LootItem; -import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer; - @ZetaLoadModule(category = "world") public class AncientWoodModule extends ZetaModule { @@ -70,7 +68,7 @@ public void setup(ZCommonSetup e) { @LoadEvent public void register(ZRegister event) { woodSet = WoodSetHandler.addWoodSet(this, "ancient", MaterialColor.TERRACOTTA_WHITE, MaterialColor.TERRACOTTA_WHITE, true); - ancient_leaves = new QuarkLeavesBlock(woodSet.name, this, MaterialColor.PLANT); + ancient_leaves = new ZetaLeavesBlock(woodSet.name, this, MaterialColor.PLANT); ancient_sapling = new AncientSaplingBlock(this); ancient_fruit = new AncientFruitItem(this); diff --git a/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java b/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java index 036a94face..72ed159d02 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java @@ -1,5 +1,7 @@ package org.violetmoon.quark.content.world.module; +import java.util.List; + import com.google.common.collect.Lists; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; @@ -14,7 +16,6 @@ import net.minecraft.world.level.material.MaterialColor; import org.apache.commons.lang3.tuple.Pair; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkInheritedPaneBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.handler.ToolInteractionHandler; import org.violetmoon.quark.base.util.CorundumColor; @@ -25,6 +26,7 @@ import org.violetmoon.quark.content.world.undergroundstyle.base.AbstractUndergroundStyleModule; import org.violetmoon.quark.content.world.undergroundstyle.base.UndergroundStyleConfig; import org.violetmoon.zeta.api.IIndirectConnector; +import org.violetmoon.zeta.block.ZetaInheritedPaneBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; @@ -34,8 +36,6 @@ import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.util.Hint; -import java.util.List; - @ZetaLoadModule(category = "world") public class CorundumModule extends AbstractUndergroundStyleModule { @@ -107,7 +107,7 @@ private void add(String name, int color, MaterialColor material) { CorundumBlock waxed = new CorundumBlock("waxed_" + name + "_corundum", color, this, material, true); ToolInteractionHandler.registerWaxedBlock(this, crystal, waxed); - new QuarkInheritedPaneBlock(crystal); + new ZetaInheritedPaneBlock(crystal); CorundumClusterBlock cluster = new CorundumClusterBlock(crystal); clusters.add(cluster); diff --git a/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java b/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java index 34b5705131..732aa779b7 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java @@ -5,10 +5,22 @@ import java.util.Queue; import java.util.function.BooleanSupplier; +import com.google.common.collect.Maps; +import net.minecraft.client.Minecraft; +import net.minecraft.client.color.block.BlockColor; +import net.minecraft.client.color.item.ItemColor; +import net.minecraft.core.BlockPos; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockAndTintGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.GenerationStep.Decoration; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MaterialColor; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlock; -import org.violetmoon.quark.base.block.QuarkBlockWrapper; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.config.type.DimensionConfig; import org.violetmoon.quark.base.handler.VariantHandler; @@ -19,6 +31,9 @@ import org.violetmoon.quark.content.world.block.MyaliteColorLogic; import org.violetmoon.quark.content.world.config.BigStoneClusterConfig; import org.violetmoon.quark.content.world.config.StoneTypeConfig; +import org.violetmoon.zeta.block.IZetaBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaBlockWrapper; import org.violetmoon.zeta.client.event.load.ZAddBlockColorHandlers; import org.violetmoon.zeta.client.event.load.ZAddItemColorHandlers; import org.violetmoon.zeta.event.bus.LoadEvent; @@ -29,23 +44,6 @@ import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; -import com.google.common.collect.Maps; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.color.block.BlockColor; -import net.minecraft.client.color.item.ItemColor; -import net.minecraft.core.BlockPos; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.levelgen.GenerationStep.Decoration; -import net.minecraft.world.level.material.Material; -import net.minecraft.world.level.material.MaterialColor; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.HitResult; - @ZetaLoadModule(category = "world") public class NewStoneTypesModule extends ZetaModule { @@ -79,10 +77,10 @@ public final void register(ZRegister event) { } public static Block makeStone(ZetaModule module, String name, StoneTypeConfig config, BigStoneClusterConfig bigConfig, BooleanSupplier enabledCond, MaterialColor color) { - return makeStone(module, null, name, config, bigConfig, enabledCond, color, QuarkBlock::new); + return makeStone(module, null, name, config, bigConfig, enabledCond, color, ZetaBlock::new); } - public static Block makeStone(ZetaModule module, final Block raw, String name, StoneTypeConfig config, BigStoneClusterConfig bigConfig, BooleanSupplier enabledCond, MaterialColor color, QuarkBlock.Constructor constr) { + public static Block makeStone(ZetaModule module, final Block raw, String name, StoneTypeConfig config, BigStoneClusterConfig bigConfig, BooleanSupplier enabledCond, MaterialColor color, ZetaBlock.Constructor constr) { BooleanSupplier trueEnabledCond = () -> (bigConfig == null || !bigConfig.enabled || !Quark.ZETA.modules.isEnabled(BigStoneClustersModule.class)) && enabledCond.getAsBoolean(); Block.Properties props; @@ -99,10 +97,10 @@ public static Block makeStone(ZetaModule module, final Block raw, String name, S else normal = constr.make(name, module, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(enabledCond); - QuarkBlock polished = constr.make("polished_" + name, module, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(enabledCond); + ZetaBlock polished = constr.make("polished_" + name, module, CreativeModeTab.TAB_BUILDING_BLOCKS, props).setCondition(enabledCond); polishedBlocks.put(normal, polished); - VariantHandler.addSlabStairsWall(normal instanceof IQuarkBlock quarkBlock ? quarkBlock : new QuarkBlockWrapper(normal, module).setCondition(enabledCond)); + VariantHandler.addSlabStairsWall(normal instanceof IZetaBlock quarkBlock ? quarkBlock : new ZetaBlockWrapper(normal, module).setCondition(enabledCond)); VariantHandler.addSlabAndStairs(polished); if(raw == null) { diff --git a/src/main/java/org/violetmoon/quark/content/world/module/PermafrostModule.java b/src/main/java/org/violetmoon/quark/content/world/module/PermafrostModule.java index 3108305364..9ad535e275 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/PermafrostModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/PermafrostModule.java @@ -1,37 +1,36 @@ package org.violetmoon.quark.content.world.module; -import org.violetmoon.quark.base.block.QuarkBlock; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MaterialColor; import org.violetmoon.quark.base.config.type.CompoundBiomeConfig; import org.violetmoon.quark.base.handler.VariantHandler; import org.violetmoon.quark.content.world.undergroundstyle.PermafrostStyle; import org.violetmoon.quark.content.world.undergroundstyle.base.AbstractUndergroundStyleModule; import org.violetmoon.quark.content.world.undergroundstyle.base.UndergroundStyleConfig; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.util.Hint; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.material.Material; -import net.minecraft.world.level.material.MaterialColor; - @ZetaLoadModule(category = "world") public class PermafrostModule extends AbstractUndergroundStyleModule { - @Hint public static QuarkBlock permafrost; + @Hint public static ZetaBlock permafrost; @LoadEvent public final void register(ZRegister event) { - permafrost = new QuarkBlock("permafrost", this, CreativeModeTab.TAB_BUILDING_BLOCKS, + permafrost = new ZetaBlock("permafrost", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.of(Material.STONE, MaterialColor.COLOR_LIGHT_BLUE) .requiresCorrectToolForDrops() .strength(1.5F, 10F) .sound(SoundType.STONE)); VariantHandler.addSlabStairsWall(permafrost); - VariantHandler.addSlabStairsWall(new QuarkBlock("permafrost_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(permafrost))); + VariantHandler.addSlabStairsWall(new ZetaBlock("permafrost_bricks", this, CreativeModeTab.TAB_BUILDING_BLOCKS, Block.Properties.copy(permafrost))); generationSettings.biomeObj.setBlock(permafrost.defaultBlockState()); } diff --git a/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java b/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java index 20c73414ad..07b2fe5df8 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java @@ -1,5 +1,8 @@ package org.violetmoon.quark.content.world.module; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Direction.Axis; @@ -16,22 +19,18 @@ import net.minecraft.world.level.levelgen.GenerationStep.Decoration; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; - -import java.util.ArrayList; -import java.util.List; - import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.QuarkBlock; import org.violetmoon.quark.base.config.Config; import org.violetmoon.quark.base.config.Config.Max; import org.violetmoon.quark.base.config.Config.Min; import org.violetmoon.quark.base.config.type.CompoundBiomeConfig; import org.violetmoon.quark.base.config.type.DimensionConfig; -import org.violetmoon.zeta.advancement.ManualTrigger; import org.violetmoon.quark.base.world.WorldGenHandler; import org.violetmoon.quark.base.world.WorldGenWeights; import org.violetmoon.quark.content.world.block.MyaliteCrystalBlock; import org.violetmoon.quark.content.world.gen.SpiralSpireGenerator; +import org.violetmoon.zeta.advancement.ManualTrigger; +import org.violetmoon.zeta.block.ZetaBlock; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; @@ -76,7 +75,7 @@ public final void register(ZRegister event) { Block.Properties props = Block.Properties.of(Material.STONE, MaterialColor.TERRACOTTA_PURPLE) .requiresCorrectToolForDrops() .strength(1.5F, 6.0F); - dusky_myalite = new QuarkBlock("dusky_myalite", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); + dusky_myalite = new ZetaBlock("dusky_myalite", this, CreativeModeTab.TAB_BUILDING_BLOCKS, props); myalite_crystal = new MyaliteCrystalBlock(this); diff --git a/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java b/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java index 5ee76aab1d..dcd62cb17f 100644 --- a/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java +++ b/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java @@ -10,32 +10,7 @@ import javax.annotation.Nonnull; -import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity; -import org.violetmoon.quark.addons.oddities.client.screen.BackpackInventoryScreen; -import org.violetmoon.quark.addons.oddities.client.screen.CrateScreen; -import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule; -import org.violetmoon.quark.addons.oddities.util.Influence; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.util.RequiredModTooltipHandler; -import org.violetmoon.quark.base.handler.GeneralConfig; -import org.violetmoon.quark.base.item.QuarkItem; -import org.violetmoon.quark.content.building.module.VariantFurnacesModule; -import org.violetmoon.quark.content.client.module.ImprovedTooltipsModule; -import org.violetmoon.quark.content.client.tooltip.EnchantedBookTooltips; -import org.violetmoon.quark.content.tools.item.AncientTomeItem; -import org.violetmoon.quark.content.tools.module.AncientTomesModule; -import org.violetmoon.quark.content.tools.module.ColorRunesModule; -import org.violetmoon.quark.content.tools.module.PickarangModule; -import org.violetmoon.quark.content.tweaks.module.DiamondRepairModule; -import org.violetmoon.quark.content.tweaks.recipe.ElytraDuplicationRecipe; -import org.violetmoon.quark.content.tweaks.recipe.SlabToBlockRecipe; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; -import org.violetmoon.zeta.module.IDisableable; -import org.violetmoon.zeta.util.ItemNBTHelper; -import org.violetmoon.zeta.util.RegistryUtil; - import com.google.common.collect.Sets; - import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; import mezz.jei.api.constants.RecipeTypes; @@ -78,6 +53,27 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; +import org.violetmoon.quark.addons.oddities.block.be.MatrixEnchantingTableBlockEntity; +import org.violetmoon.quark.addons.oddities.client.screen.BackpackInventoryScreen; +import org.violetmoon.quark.addons.oddities.client.screen.CrateScreen; +import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule; +import org.violetmoon.quark.addons.oddities.util.Influence; +import org.violetmoon.quark.base.Quark; +import org.violetmoon.quark.base.handler.GeneralConfig; +import org.violetmoon.quark.content.building.module.VariantFurnacesModule; +import org.violetmoon.quark.content.client.module.ImprovedTooltipsModule; +import org.violetmoon.quark.content.client.tooltip.EnchantedBookTooltips; +import org.violetmoon.quark.content.tools.item.AncientTomeItem; +import org.violetmoon.quark.content.tools.module.AncientTomesModule; +import org.violetmoon.quark.content.tools.module.ColorRunesModule; +import org.violetmoon.quark.content.tools.module.PickarangModule; +import org.violetmoon.quark.content.tweaks.module.DiamondRepairModule; +import org.violetmoon.quark.content.tweaks.recipe.ElytraDuplicationRecipe; +import org.violetmoon.quark.content.tweaks.recipe.SlabToBlockRecipe; +import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.module.IDisableable; +import org.violetmoon.zeta.util.ItemNBTHelper; +import org.violetmoon.zeta.util.RegistryUtil; @JeiPlugin public class QuarkJeiPlugin implements IModPlugin { @@ -246,7 +242,7 @@ private void registerRuneAnvilRecipes(@Nonnull IRecipeRegistration registration, } List used = displayItems - .filter(it -> !(it.getItem() instanceof QuarkItem qItem) || qItem.isEnabled()) + .filter(it -> !(it.getItem() instanceof IDisableable dis) || dis.isEnabled()) .map(item -> makeEnchantedDisplayItem(item, random)) .collect(Collectors.toList()); diff --git a/src/main/java/org/violetmoon/zeta/Zeta.java b/src/main/java/org/violetmoon/zeta/Zeta.java index bc00b7e70e..185b23655a 100644 --- a/src/main/java/org/violetmoon/zeta/Zeta.java +++ b/src/main/java/org/violetmoon/zeta/Zeta.java @@ -7,8 +7,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; -import org.violetmoon.zeta.util.NameChanger; -import org.violetmoon.zeta.util.RaytracingUtil; import org.violetmoon.zeta.advancement.AdvancementModifierRegistry; import org.violetmoon.zeta.block.ext.BlockExtensionFactory; import org.violetmoon.zeta.capability.ZetaCapabilityManager; @@ -30,6 +28,9 @@ import org.violetmoon.zeta.registry.DyeablesRegistry; import org.violetmoon.zeta.registry.RenderLayerRegistry; import org.violetmoon.zeta.registry.ZetaRegistry; +import org.violetmoon.zeta.util.NameChanger; +import org.violetmoon.zeta.util.RaytracingUtil; +import org.violetmoon.zeta.util.RegistryUtil; import org.violetmoon.zeta.util.RequiredModTooltipHandler; import org.violetmoon.zeta.util.ZetaSide; @@ -78,6 +79,7 @@ public Zeta(String modid, Logger log, ZetaSide side) { //registry public final ZetaRegistry registry; + public final RegistryUtil registryUtil = new RegistryUtil(this); //TODO: Delete this, only needed cause there's no way to get early registry names. public final RenderLayerRegistry renderLayerRegistry; public final DyeablesRegistry dyeables; public final CraftingExtensionsRegistry craftingExtensions; diff --git a/src/main/java/org/violetmoon/quark/base/block/IQuarkBlock.java b/src/main/java/org/violetmoon/zeta/block/IZetaBlock.java similarity index 67% rename from src/main/java/org/violetmoon/quark/base/block/IQuarkBlock.java rename to src/main/java/org/violetmoon/zeta/block/IZetaBlock.java index 4d1d4deb1a..aaa0d0c32f 100644 --- a/src/main/java/org/violetmoon/quark/base/block/IQuarkBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/IZetaBlock.java @@ -1,4 +1,4 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -9,10 +9,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.material.Material; - -import java.util.function.Function; - -import org.violetmoon.quark.base.Quark; import org.violetmoon.zeta.block.ext.IZetaBlockExtensions; import org.violetmoon.zeta.module.IDisableable; @@ -20,7 +16,7 @@ * @author WireSegal * Created at 1:14 PM on 9/19/19. */ -public interface IQuarkBlock extends IZetaBlockExtensions, IDisableable { +public interface IZetaBlock extends IZetaBlockExtensions, IDisableable { default Block getBlock() { return (Block) this; @@ -50,18 +46,5 @@ default int getFireSpreadSpeedZeta(BlockState state, BlockGetter world, BlockPos return 30; return state.getMaterial().isFlammable() ? 5 : 0; } - - static String inheritQuark(IQuarkBlock parent, String format) { - return inherit(parent.getBlock(), format); - } - - static String inherit(Block parent, String format) { - ResourceLocation parentName = Quark.ZETA.registry.getRegistryName(parent, Registry.BLOCK); - return String.format(String.format("%s:%s", Quark.MOD_ID, format), parentName.getPath()); - } - - static String inherit(Block parent, Function fun) { - ResourceLocation parentName = Quark.ZETA.registry.getRegistryName(parent, Registry.BLOCK); - return String.format(String.format("%s:%s", Quark.MOD_ID, fun.apply(parentName.getPath()))); - } + } diff --git a/src/main/java/org/violetmoon/quark/base/block/SimpleFluidloggedBlock.java b/src/main/java/org/violetmoon/zeta/block/SimpleFluidloggedBlock.java similarity index 98% rename from src/main/java/org/violetmoon/quark/base/block/SimpleFluidloggedBlock.java rename to src/main/java/org/violetmoon/zeta/block/SimpleFluidloggedBlock.java index f492699b5c..468715ab5a 100644 --- a/src/main/java/org/violetmoon/quark/base/block/SimpleFluidloggedBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/SimpleFluidloggedBlock.java @@ -1,4 +1,8 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; + +import java.util.Optional; + +import javax.annotation.Nonnull; import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundEvent; @@ -13,9 +17,6 @@ import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; -import javax.annotation.Nonnull; -import java.util.Optional; - public interface SimpleFluidloggedBlock extends BucketPickup, LiquidBlockContainer { @Override diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaBlock.java similarity index 85% rename from src/main/java/org/violetmoon/quark/base/block/QuarkBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaBlock.java index 988f3dead1..036dae89ee 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaBlock.java @@ -1,4 +1,9 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; + +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; @@ -7,21 +12,14 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.violetmoon.zeta.util.RequiredModTooltipHandler; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; - -public class QuarkBlock extends Block implements IQuarkBlock { +public class ZetaBlock extends Block implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; @@ -39,7 +37,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkBlockWrapper.java b/src/main/java/org/violetmoon/zeta/block/ZetaBlockWrapper.java similarity index 64% rename from src/main/java/org/violetmoon/quark/base/block/QuarkBlockWrapper.java rename to src/main/java/org/violetmoon/zeta/block/ZetaBlockWrapper.java index b6a02f1327..86d9631e33 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkBlockWrapper.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaBlockWrapper.java @@ -1,20 +1,19 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.level.block.Block; +import org.violetmoon.zeta.module.ZetaModule; -// Wrapper to allow vanilla blocks to be treated as quark blocks contextualized under a module -public class QuarkBlockWrapper implements IQuarkBlock { +// Wrapper to allow vanilla blocks to be treated as zeta blocks contextualized under a module +public class ZetaBlockWrapper implements IZetaBlock { private final Block parent; private final ZetaModule module; private BooleanSupplier condition; - public QuarkBlockWrapper(Block parent, ZetaModule module) { + public ZetaBlockWrapper(Block parent, ZetaModule module) { this.parent = parent; this.module = module; } @@ -30,7 +29,7 @@ public ZetaModule getModule() { } @Override - public QuarkBlockWrapper setCondition(BooleanSupplier condition) { + public ZetaBlockWrapper setCondition(BooleanSupplier condition) { this.condition = condition; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkBushBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaBushBlock.java similarity index 80% rename from src/main/java/org/violetmoon/quark/base/block/QuarkBushBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaBushBlock.java index a771e65470..cf4d445521 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkBushBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaBushBlock.java @@ -1,24 +1,23 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.BushBlock; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class QuarkBushBlock extends BushBlock implements IQuarkBlock { +public class ZetaBushBlock extends BushBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkBushBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaBushBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; @@ -34,7 +33,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkBushBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaBushBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkButtonBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaButtonBlock.java similarity index 80% rename from src/main/java/org/violetmoon/quark/base/block/QuarkButtonBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaButtonBlock.java index ad61541042..baa41b68dd 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkButtonBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaButtonBlock.java @@ -1,28 +1,27 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; + +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.core.NonNullList; import net.minecraft.sounds.SoundEvent; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.ButtonBlock; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; - /** * @author WireSegal * Created at 9:14 PM on 10/8/19. */ -public abstract class QuarkButtonBlock extends ButtonBlock implements IQuarkBlock { +public abstract class ZetaButtonBlock extends ButtonBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkButtonBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaButtonBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(false, properties); this.module = module; @@ -44,7 +43,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkButtonBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaButtonBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkDoorBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaDoorBlock.java similarity index 77% rename from src/main/java/org/violetmoon/quark/base/block/QuarkDoorBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaDoorBlock.java index acf5cf7893..507c9a410f 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkDoorBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaDoorBlock.java @@ -1,15 +1,10 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.quark.base.item.QuarkDoubleHighBlockItem; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.IZetaBlockItemProvider; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; @@ -17,13 +12,17 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoorBlock; +import org.violetmoon.zeta.item.ZetaDoubleHighBlockItem; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.IZetaBlockItemProvider; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class QuarkDoorBlock extends DoorBlock implements IQuarkBlock, IZetaBlockItemProvider { +public class ZetaDoorBlock extends DoorBlock implements IZetaBlock, IZetaBlockItemProvider { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkDoorBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaDoorBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; @@ -39,7 +38,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkDoorBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaDoorBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } @@ -57,7 +56,7 @@ public ZetaModule getModule() { @Override public BlockItem provideItemBlock(Block block, Item.Properties props) { - return new QuarkDoubleHighBlockItem(this, props); + return new ZetaDoubleHighBlockItem(this, props); } } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkFenceBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaFenceBlock.java similarity index 77% rename from src/main/java/org/violetmoon/quark/base/block/QuarkFenceBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaFenceBlock.java index 156eedac41..156d43937d 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkFenceBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaFenceBlock.java @@ -1,23 +1,22 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.FenceBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkFenceBlock extends FenceBlock implements IQuarkBlock { +public class ZetaFenceBlock extends FenceBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkFenceBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaFenceBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; @@ -32,7 +31,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkFenceBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaFenceBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkFenceGateBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaFenceGateBlock.java similarity index 78% rename from src/main/java/org/violetmoon/quark/base/block/QuarkFenceGateBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaFenceGateBlock.java index 05458e166e..218d84e88b 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkFenceGateBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaFenceGateBlock.java @@ -1,27 +1,26 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.FenceGateBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 9:14 PM on 10/8/19. */ -public class QuarkFenceGateBlock extends FenceGateBlock implements IQuarkBlock { +public class ZetaFenceGateBlock extends FenceGateBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkFenceGateBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaFenceGateBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; @@ -36,7 +35,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkFenceGateBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaFenceGateBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkFlammableBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaFlammableBlock.java similarity index 74% rename from src/main/java/org/violetmoon/quark/base/block/QuarkFlammableBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaFlammableBlock.java index b41edfd49b..41541b0591 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkFlammableBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaFlammableBlock.java @@ -1,18 +1,17 @@ -package org.violetmoon.quark.base.block; - -import org.violetmoon.zeta.module.ZetaModule; +package org.violetmoon.zeta.block; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkFlammableBlock extends QuarkBlock { +public class ZetaFlammableBlock extends ZetaBlock { private final int flammability; - public QuarkFlammableBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, int flamability, Properties properties) { + public ZetaFlammableBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, int flamability, Properties properties) { super(regname, module, creativeTab, properties); this.flammability = flamability; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkFlammablePillarBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaFlammablePillarBlock.java similarity index 72% rename from src/main/java/org/violetmoon/quark/base/block/QuarkFlammablePillarBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaFlammablePillarBlock.java index 215f0ff7a8..9d7f509085 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkFlammablePillarBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaFlammablePillarBlock.java @@ -1,18 +1,17 @@ -package org.violetmoon.quark.base.block; - -import org.violetmoon.zeta.module.ZetaModule; +package org.violetmoon.zeta.block; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkFlammablePillarBlock extends QuarkPillarBlock { +public class ZetaFlammablePillarBlock extends ZetaPillarBlock { private final int flammability; - public QuarkFlammablePillarBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, int flamability, Properties properties) { + public ZetaFlammablePillarBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, int flamability, Properties properties) { super(regname, module, creativeTab, properties); this.flammability = flamability; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkGlassBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaGlassBlock.java similarity index 89% rename from src/main/java/org/violetmoon/quark/base/block/QuarkGlassBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaGlassBlock.java index a01450e309..bd219b2ef9 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkGlassBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaGlassBlock.java @@ -1,10 +1,7 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import javax.annotation.Nonnull; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.CreativeModeTab; @@ -15,14 +12,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.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; /** * @author WireSegal * Created at 12:46 PM on 8/24/19. */ -public class QuarkGlassBlock extends QuarkBlock { +public class ZetaGlassBlock extends ZetaBlock { - public QuarkGlassBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, boolean translucent, Properties properties) { + public ZetaGlassBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, boolean translucent, Properties properties) { super(regname, module, creativeTab, properties .noOcclusion() .isValidSpawn((state, world, pos, entityType) -> false) diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkInheritedPaneBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaInheritedPaneBlock.java similarity index 62% rename from src/main/java/org/violetmoon/quark/base/block/QuarkInheritedPaneBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaInheritedPaneBlock.java index 79862a00a2..c0a84e882e 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkInheritedPaneBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaInheritedPaneBlock.java @@ -1,36 +1,34 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import javax.annotation.Nullable; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.registry.IZetaBlockColorProvider; -import org.violetmoon.zeta.registry.IZetaItemColorProvider; - import net.minecraft.core.BlockPos; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; +import org.violetmoon.zeta.registry.IZetaBlockColorProvider; +import org.violetmoon.zeta.registry.IZetaItemColorProvider; /** * @author WireSegal * Created at 1:09 PM on 9/19/19. */ -public class QuarkInheritedPaneBlock extends QuarkPaneBlock implements IQuarkBlock, IZetaBlockColorProvider { +public class ZetaInheritedPaneBlock extends ZetaPaneBlock implements IZetaBlock, IZetaBlockColorProvider { - public final IQuarkBlock parent; + public final IZetaBlock parent; - public QuarkInheritedPaneBlock(IQuarkBlock parent, String name, Block.Properties properties) { + public ZetaInheritedPaneBlock(IZetaBlock parent, String name, Block.Properties properties) { super(name, parent.getModule(), properties, null); this.parent = parent; - Quark.ZETA.renderLayerRegistry.mock(this, parent.getBlock()); + parent.getModule().zeta.renderLayerRegistry.mock(this, parent.getBlock()); } - public QuarkInheritedPaneBlock(IQuarkBlock parent, Block.Properties properties) { - this(parent, IQuarkBlock.inheritQuark(parent, "%s_pane"), properties); + public ZetaInheritedPaneBlock(IZetaBlock parent, Block.Properties properties) { + this(parent, parent.getModule().zeta.registryUtil.inheritQuark(parent, "%s_pane"), properties); } - public QuarkInheritedPaneBlock(IQuarkBlock parent) { + public ZetaInheritedPaneBlock(IZetaBlock parent) { this(parent, Block.Properties.copy(parent.getBlock())); } @@ -43,7 +41,7 @@ public boolean isEnabled() { @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 diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkLeavesBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaLeavesBlock.java similarity index 83% rename from src/main/java/org/violetmoon/quark/base/block/QuarkLeavesBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaLeavesBlock.java index 460d609f73..8ab5b61c1d 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkLeavesBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaLeavesBlock.java @@ -1,25 +1,24 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.MaterialColor; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class QuarkLeavesBlock extends LeavesBlock implements IQuarkBlock { +public class ZetaLeavesBlock extends LeavesBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkLeavesBlock(String name, ZetaModule module, MaterialColor color) { + public ZetaLeavesBlock(String name, ZetaModule module, MaterialColor color) { super(Block.Properties.of(Material.LEAVES, color) .strength(0.2F) .randomTicks() @@ -44,7 +43,7 @@ public ZetaModule getModule() { } @Override - public QuarkLeavesBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaLeavesBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkPaneBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaPaneBlock.java similarity index 81% rename from src/main/java/org/violetmoon/quark/base/block/QuarkPaneBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaPaneBlock.java index 5671942eb5..cf388a8528 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkPaneBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaPaneBlock.java @@ -1,25 +1,24 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; + +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.IronBarsBlock; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.registry.RenderLayerRegistry.Layer; -import java.util.function.BooleanSupplier; - -public class QuarkPaneBlock extends IronBarsBlock implements IQuarkBlock { +public class ZetaPaneBlock extends IronBarsBlock implements IZetaBlock { public final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkPaneBlock(String name, ZetaModule module, Block.Properties properties, Layer renderLayer) { + public ZetaPaneBlock(String name, ZetaModule module, Block.Properties properties, Layer renderLayer) { super(properties); this.module = module; @@ -43,7 +42,7 @@ public ZetaModule getModule() { } @Override - public QuarkPaneBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaPaneBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkPillarBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaPillarBlock.java similarity index 77% rename from src/main/java/org/violetmoon/quark/base/block/QuarkPillarBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaPillarBlock.java index 5cdea6b1e1..40d8f33059 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkPillarBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaPillarBlock.java @@ -1,23 +1,22 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.RotatedPillarBlock; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkPillarBlock extends RotatedPillarBlock implements IQuarkBlock { +public class ZetaPillarBlock extends RotatedPillarBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkPillarBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaPillarBlock(String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(properties); this.module = module; module.zeta.registry.registerBlock(this, regname, true); @@ -37,7 +36,7 @@ public ZetaModule getModule() { } @Override - public QuarkPillarBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaPillarBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkPressurePlateBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaPressurePlateBlock.java similarity index 76% rename from src/main/java/org/violetmoon/quark/base/block/QuarkPressurePlateBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaPressurePlateBlock.java index 1c60854933..3174e55c2b 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkPressurePlateBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaPressurePlateBlock.java @@ -1,27 +1,26 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.PressurePlateBlock; +import org.violetmoon.zeta.module.ZetaModule; /** * @author WireSegal * Created at 9:41 PM on 10/8/19. */ -public class QuarkPressurePlateBlock extends PressurePlateBlock implements IQuarkBlock { +public class ZetaPressurePlateBlock extends PressurePlateBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkPressurePlateBlock(Sensitivity sensitivity, String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { + public ZetaPressurePlateBlock(Sensitivity sensitivity, String regname, ZetaModule module, CreativeModeTab creativeTab, Properties properties) { super(sensitivity, properties); this.module = module; @@ -36,7 +35,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkPressurePlateBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaPressurePlateBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkSaplingBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaSaplingBlock.java similarity index 82% rename from src/main/java/org/violetmoon/quark/base/block/QuarkSaplingBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaSaplingBlock.java index ddac2e8033..3d8156e1ab 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkSaplingBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaSaplingBlock.java @@ -1,12 +1,9 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; @@ -14,13 +11,15 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SaplingBlock; import net.minecraft.world.level.block.grower.AbstractTreeGrower; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public abstract class QuarkSaplingBlock extends SaplingBlock implements IQuarkBlock { +public abstract class ZetaSaplingBlock extends SaplingBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkSaplingBlock(String name, ZetaModule module, AbstractTreeGrower tree) { + public ZetaSaplingBlock(String name, ZetaModule module, AbstractTreeGrower tree) { super(tree, Block.Properties.copy(Blocks.OAK_SAPLING)); this.module = module; @@ -42,7 +41,7 @@ public ZetaModule getModule() { } @Override - public QuarkSaplingBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaSaplingBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkStandingSignBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaStandingSignBlock.java similarity index 60% rename from src/main/java/org/violetmoon/quark/base/block/QuarkStandingSignBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaStandingSignBlock.java index 366d0bafbc..8a75c8bcda 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkStandingSignBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaStandingSignBlock.java @@ -1,29 +1,27 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nullable; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.level.block.StandingSignBlock; import net.minecraft.world.level.block.state.properties.WoodType; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkStandingSignBlock extends StandingSignBlock implements IQuarkBlock { +public class ZetaStandingSignBlock extends StandingSignBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkStandingSignBlock(String regname, ZetaModule module, WoodType type, Properties properties) { + public ZetaStandingSignBlock(String regname, ZetaModule module, WoodType type, Properties properties) { super(properties, type); this.module = module; - Quark.ZETA.registry.registerBlock(this, regname, false); + module.zeta.registry.registerBlock(this, regname, false); } @Override - public QuarkStandingSignBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaStandingSignBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkVineBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaVineBlock.java similarity index 89% rename from src/main/java/org/violetmoon/quark/base/block/QuarkVineBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaVineBlock.java index 34322bb2c7..5710175b4b 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkVineBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaVineBlock.java @@ -1,13 +1,10 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.violetmoon.zeta.module.ZetaModule; -import org.violetmoon.zeta.registry.RenderLayerRegistry; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; @@ -21,13 +18,15 @@ import net.minecraft.world.level.block.VineBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; +import org.violetmoon.zeta.module.ZetaModule; +import org.violetmoon.zeta.registry.RenderLayerRegistry; -public class QuarkVineBlock extends VineBlock implements IQuarkBlock { +public class ZetaVineBlock extends VineBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkVineBlock(ZetaModule module, String name, boolean creative) { + public ZetaVineBlock(ZetaModule module, String name, boolean creative) { super(Block.Properties.of(Material.REPLACEABLE_PLANT).noCollission().randomTicks().strength(0.2F).sound(SoundType.GRASS)); this.module = module; @@ -65,7 +64,7 @@ public ZetaModule getModule() { } @Override - public QuarkVineBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaVineBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkWallSignBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaWallSignBlock.java similarity index 61% rename from src/main/java/org/violetmoon/quark/base/block/QuarkWallSignBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaWallSignBlock.java index f41de8534d..7ea928080a 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkWallSignBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaWallSignBlock.java @@ -1,29 +1,27 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; import java.util.function.BooleanSupplier; import javax.annotation.Nullable; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.world.level.block.WallSignBlock; import net.minecraft.world.level.block.state.properties.WoodType; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkWallSignBlock extends WallSignBlock implements IQuarkBlock { +public class ZetaWallSignBlock extends WallSignBlock implements IZetaBlock { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkWallSignBlock(String regname, ZetaModule module, WoodType type, Properties properties) { + public ZetaWallSignBlock(String regname, ZetaModule module, WoodType type, Properties properties) { super(properties, type); this.module = module; - Quark.ZETA.registry.registerBlock(this, regname, false); + module.zeta.registry.registerBlock(this, regname, false); } @Override - public QuarkWallSignBlock setCondition(BooleanSupplier enabledSupplier) { + public ZetaWallSignBlock setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/block/QuarkWoodenButtonBlock.java b/src/main/java/org/violetmoon/zeta/block/ZetaWoodenButtonBlock.java similarity index 72% rename from src/main/java/org/violetmoon/quark/base/block/QuarkWoodenButtonBlock.java rename to src/main/java/org/violetmoon/zeta/block/ZetaWoodenButtonBlock.java index c46cef9537..069c73fda5 100644 --- a/src/main/java/org/violetmoon/quark/base/block/QuarkWoodenButtonBlock.java +++ b/src/main/java/org/violetmoon/zeta/block/ZetaWoodenButtonBlock.java @@ -1,16 +1,15 @@ -package org.violetmoon.quark.base.block; +package org.violetmoon.zeta.block; + +import javax.annotation.Nonnull; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.CreativeModeTab; - -import javax.annotation.Nonnull; - import org.violetmoon.zeta.module.ZetaModule; -public class QuarkWoodenButtonBlock extends QuarkButtonBlock { +public class ZetaWoodenButtonBlock extends ZetaButtonBlock { - public QuarkWoodenButtonBlock(String regname, ZetaModule module, Properties properties) { + public ZetaWoodenButtonBlock(String regname, ZetaModule module, Properties properties) { super(regname, module, CreativeModeTab.TAB_REDSTONE, properties); } diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkArrowItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaArrowItem.java similarity index 78% rename from src/main/java/org/violetmoon/quark/base/item/QuarkArrowItem.java rename to src/main/java/org/violetmoon/zeta/item/ZetaArrowItem.java index 854318c16f..a809ee3c55 100644 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkArrowItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaArrowItem.java @@ -1,13 +1,9 @@ -package org.violetmoon.quark.base.item; +package org.violetmoon.zeta.item; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.item.IZetaItem; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.projectile.AbstractArrow; @@ -16,16 +12,17 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import org.violetmoon.zeta.module.ZetaModule; -public abstract class QuarkArrowItem extends ArrowItem implements IZetaItem { +public abstract class ZetaArrowItem extends ArrowItem implements IZetaItem { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkArrowItem(String name, ZetaModule module) { + public ZetaArrowItem(String name, ZetaModule module) { super(new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); - Quark.ZETA.registry.registerItem(this, name); + module.zeta.registry.registerItem(this, name); this.module = module; } @@ -36,7 +33,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkArrowItem setCondition(BooleanSupplier enabledSupplier) { + public ZetaArrowItem setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } @@ -51,7 +48,7 @@ public boolean doesConditionApply() { return enabledSupplier.getAsBoolean(); } - public static class Impl extends QuarkArrowItem { + public static class Impl extends ZetaArrowItem { private final ArrowCreator creator; diff --git a/src/main/java/org/violetmoon/zeta/item/ZetaBlockItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaBlockItem.java index a0bd7b0b7a..6d5a479c29 100644 --- a/src/main/java/org/violetmoon/zeta/item/ZetaBlockItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaBlockItem.java @@ -4,6 +4,7 @@ import net.minecraft.world.level.block.Block; import org.violetmoon.zeta.item.ext.IZetaItemExtensions; +//JANKY SHIT FOR MIXIN TARGETS public class ZetaBlockItem extends BlockItem implements IZetaItemExtensions { public ZetaBlockItem(Block toPlace, Properties props) { super(toPlace, props); diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkDoubleHighBlockItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaDoubleHighBlockItem.java similarity index 70% rename from src/main/java/org/violetmoon/quark/base/item/QuarkDoubleHighBlockItem.java rename to src/main/java/org/violetmoon/zeta/item/ZetaDoubleHighBlockItem.java index 6e082c46f2..a21677af80 100644 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkDoubleHighBlockItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaDoubleHighBlockItem.java @@ -1,25 +1,23 @@ -package org.violetmoon.quark.base.item; +package org.violetmoon.zeta.item; + +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.DoubleHighBlockItem; import net.minecraft.world.item.ItemStack; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.zeta.item.IZetaItem; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; - -public class QuarkDoubleHighBlockItem extends DoubleHighBlockItem implements IZetaItem { +public class ZetaDoubleHighBlockItem extends DoubleHighBlockItem implements IZetaItem { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkDoubleHighBlockItem(IQuarkBlock baseBlock, Properties props) { + public ZetaDoubleHighBlockItem(IZetaBlock baseBlock, Properties props) { super(baseBlock.getBlock(), props); this.module = baseBlock.getModule(); @@ -32,7 +30,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkDoubleHighBlockItem setCondition(BooleanSupplier enabledSupplier) { + public ZetaDoubleHighBlockItem setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/zeta/item/ZetaItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaItem.java index b6e32df264..089512467e 100644 --- a/src/main/java/org/violetmoon/zeta/item/ZetaItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaItem.java @@ -1,12 +1,49 @@ package org.violetmoon.zeta.item; +import java.util.function.BooleanSupplier; + +import javax.annotation.Nonnull; + +import net.minecraft.core.NonNullList; +import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; import org.violetmoon.zeta.item.ext.IZetaItemExtensions; +import org.violetmoon.zeta.module.ZetaModule; + +public class ZetaItem extends Item implements IZetaItem, IZetaItemExtensions { + private final ZetaModule module; + private BooleanSupplier enabledSupplier = () -> true; + + public ZetaItem(String regname, ZetaModule module, Properties properties) { + super(properties); + + this.module = module; + module.zeta.registry.registerItem(this, regname); + + if(module != null && module.category.isAddon()) + module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod); + } + + @Override + public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullList items) { + if(isEnabled() || group == CreativeModeTab.TAB_SEARCH) + super.fillItemCategory(group, items); + } -public class ZetaItem extends Item implements IZetaItemExtensions { - public ZetaItem(Properties props) { - super(props); + @Override + public ZetaItem setCondition(BooleanSupplier enabledSupplier) { + this.enabledSupplier = enabledSupplier; + return this; + } + + @Override + public ZetaModule getModule() { + return module; + } - //TODO maybe some stuff about constructor registration or whatever + @Override + public boolean doesConditionApply() { + return enabledSupplier.getAsBoolean(); } } diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkMobBucketItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java similarity index 69% rename from src/main/java/org/violetmoon/quark/base/item/QuarkMobBucketItem.java rename to src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java index a31dd1acc4..ae3f2850df 100644 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkMobBucketItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java @@ -1,4 +1,9 @@ -package org.violetmoon.quark.base.item; +package org.violetmoon.zeta.item; + +import java.util.function.BooleanSupplier; +import java.util.function.Supplier; + +import javax.annotation.Nonnull; import net.minecraft.core.NonNullList; import net.minecraft.sounds.SoundEvent; @@ -7,27 +12,19 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.MobBucketItem; import net.minecraft.world.level.material.Fluid; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.item.IZetaItem; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; -import java.util.function.Supplier; - -public class QuarkMobBucketItem extends MobBucketItem implements IZetaItem { +public class ZetaMobBucketItem extends MobBucketItem implements IZetaItem { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkMobBucketItem(Supplier> entity, Supplier fluid, Supplier sound, String name, ZetaModule module) { + public ZetaMobBucketItem(Supplier> entity, Supplier fluid, Supplier sound, String name, ZetaModule module) { super(entity, fluid, sound, (new Properties()).stacksTo(1).tab(CreativeModeTab.TAB_MISC)); - Quark.ZETA.registry.registerItem(this, name); this.module = module; + module.zeta.registry.registerItem(this, name); } @Override @@ -37,7 +34,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkMobBucketItem setCondition(BooleanSupplier enabledSupplier) { + public ZetaMobBucketItem setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkSignItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaSignItem.java similarity index 68% rename from src/main/java/org/violetmoon/quark/base/item/QuarkSignItem.java rename to src/main/java/org/violetmoon/zeta/item/ZetaSignItem.java index f48f22b40c..0648fa024f 100644 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkSignItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaSignItem.java @@ -1,31 +1,27 @@ -package org.violetmoon.quark.base.item; +package org.violetmoon.zeta.item; import java.util.function.BooleanSupplier; import javax.annotation.Nonnull; -import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.block.IQuarkBlock; -import org.violetmoon.zeta.item.IZetaItem; -import org.violetmoon.zeta.module.ZetaModule; - import net.minecraft.core.NonNullList; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.SignItem; import net.minecraft.world.level.block.Block; +import org.violetmoon.zeta.module.ZetaModule; -public class QuarkSignItem extends SignItem implements IZetaItem { +public class ZetaSignItem extends SignItem implements IZetaItem { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkSignItem(ZetaModule module, Block sign, Block wallSign) { + public ZetaSignItem(ZetaModule module, Block sign, Block wallSign) { super(new Item.Properties().stacksTo(16).tab(CreativeModeTab.TAB_DECORATIONS), sign, wallSign); - String resloc = IQuarkBlock.inherit(sign, "%s"); - Quark.ZETA.registry.registerItem(this, resloc); + String resloc = module.zeta.registryUtil.inherit(sign, "%s"); + module.zeta.registry.registerItem(this, resloc); this.module = module; } @@ -36,7 +32,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkSignItem setCondition(BooleanSupplier enabledSupplier) { + public ZetaSignItem setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/quark/base/item/QuarkSpawnEggItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaSpawnEggItem.java similarity index 68% rename from src/main/java/org/violetmoon/quark/base/item/QuarkSpawnEggItem.java rename to src/main/java/org/violetmoon/zeta/item/ZetaSpawnEggItem.java index 8f31fbff83..63d1947deb 100644 --- a/src/main/java/org/violetmoon/quark/base/item/QuarkSpawnEggItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaSpawnEggItem.java @@ -1,4 +1,9 @@ -package org.violetmoon.quark.base.item; +package org.violetmoon.zeta.item; + +import java.util.function.BooleanSupplier; +import java.util.function.Supplier; + +import javax.annotation.Nonnull; import net.minecraft.core.NonNullList; import net.minecraft.world.entity.EntityType; @@ -6,25 +11,17 @@ import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraftforge.common.ForgeSpawnEggItem; - -import javax.annotation.Nonnull; - -import org.violetmoon.quark.base.Quark; -import org.violetmoon.zeta.item.IZetaItem; import org.violetmoon.zeta.module.ZetaModule; -import java.util.function.BooleanSupplier; -import java.util.function.Supplier; - -public class QuarkSpawnEggItem extends ForgeSpawnEggItem implements IZetaItem { +public class ZetaSpawnEggItem extends ForgeSpawnEggItem implements IZetaItem { private final ZetaModule module; private BooleanSupplier enabledSupplier = () -> true; - public QuarkSpawnEggItem(Supplier> type, int primaryColor, int secondaryColor, String regname, ZetaModule module, Properties properties) { + public ZetaSpawnEggItem(Supplier> type, int primaryColor, int secondaryColor, String regname, ZetaModule module, Properties properties) { super(type, primaryColor, secondaryColor, properties); - Quark.ZETA.registry.registerItem(this, regname); + module.zeta.registry.registerItem(this, regname); this.module = module; } @@ -35,7 +32,7 @@ public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullLis } @Override - public QuarkSpawnEggItem setCondition(BooleanSupplier enabledSupplier) { + public ZetaSpawnEggItem setCondition(BooleanSupplier enabledSupplier) { this.enabledSupplier = enabledSupplier; return this; } diff --git a/src/main/java/org/violetmoon/zeta/registry/ZetaRegistry.java b/src/main/java/org/violetmoon/zeta/registry/ZetaRegistry.java index 9b6a4a0cfd..167f53d60e 100644 --- a/src/main/java/org/violetmoon/zeta/registry/ZetaRegistry.java +++ b/src/main/java/org/violetmoon/zeta/registry/ZetaRegistry.java @@ -21,8 +21,8 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import org.jetbrains.annotations.Nullable; -import org.violetmoon.quark.base.block.IQuarkBlock; import org.violetmoon.zeta.Zeta; +import org.violetmoon.zeta.block.IZetaBlock; import org.violetmoon.zeta.item.ZetaBlockItem; //Mash of arl's RegistryHelper and its ModData innerclass. @@ -109,7 +109,7 @@ public void registerBlock(Block block, String resloc) { registerBlock(block, resloc, true); } - public void setCreativeTab(IQuarkBlock block, CreativeModeTab tab) { + public void setCreativeTab(IZetaBlock block, CreativeModeTab tab) { setCreativeTab(block.getBlock(), tab, block::isEnabled); } diff --git a/src/main/java/org/violetmoon/zeta/util/RegistryUtil.java b/src/main/java/org/violetmoon/zeta/util/RegistryUtil.java index 122373f1f8..a9f8d96905 100644 --- a/src/main/java/org/violetmoon/zeta/util/RegistryUtil.java +++ b/src/main/java/org/violetmoon/zeta/util/RegistryUtil.java @@ -3,6 +3,7 @@ import java.util.Collection; import java.util.List; import java.util.Objects; +import java.util.function.Function; import net.minecraft.core.Holder; import net.minecraft.core.HolderSet; @@ -10,6 +11,9 @@ import net.minecraft.core.RegistryAccess; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; +import org.violetmoon.zeta.Zeta; +import org.violetmoon.zeta.block.IZetaBlock; public class RegistryUtil { @@ -23,4 +27,28 @@ public static List getTagValues(RegistryAccess access, TagKey tag) { return holderSet.stream().map(Holder::value).toList(); } + + //TODO: Can be made more 'static' when there's a nicer way to get a block's ID, instead of having to consult a particular Zeta + // (this is one reason i want to write the fancier block registry system - quat) + // This is just Duct taped as fuck to get quark-specific stuff out of IQuarkBlock so i can make it IZetaBlock + + protected final Zeta z; + + public RegistryUtil(Zeta z) { + this.z = z; + } + + public String inheritQuark(IZetaBlock parent, String format) { + return inherit(parent.getBlock(), format); + } + + public String inherit(Block parent, String format) { + ResourceLocation parentName = z.registry.getRegistryName(parent, Registry.BLOCK); + return String.format(String.format("%s:%s", z.modid, format), parentName.getPath()); + } + + public String inherit(Block parent, Function fun) { + ResourceLocation parentName = z.registry.getRegistryName(parent, Registry.BLOCK); + return String.format(String.format("%s:%s", z.modid, fun.apply(parentName.getPath()))); + } } diff --git a/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IQuarkBlockMixin.java b/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaBlockMixin_FAKE.java similarity index 68% rename from src/main/java/org/violetmoon/zetaimplforge/mixin/self/IQuarkBlockMixin.java rename to src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaBlockMixin_FAKE.java index ee427931eb..9cdf91833d 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IQuarkBlockMixin.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaBlockMixin_FAKE.java @@ -19,46 +19,71 @@ import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.violetmoon.quark.addons.oddities.block.MatrixEnchantingTableBlock; -import org.violetmoon.quark.base.block.*; +import org.violetmoon.quark.base.block.QuarkSlabBlock; +import org.violetmoon.quark.base.block.QuarkStairsBlock; +import org.violetmoon.quark.base.block.QuarkTrapdoorBlock; +import org.violetmoon.quark.base.block.QuarkWallBlock; import org.violetmoon.quark.content.automation.block.IronRodBlock; -import org.violetmoon.quark.content.building.block.*; +import org.violetmoon.quark.content.building.block.HedgeBlock; +import org.violetmoon.quark.content.building.block.QuarkVerticalSlabBlock; +import org.violetmoon.quark.content.building.block.VariantChestBlock; +import org.violetmoon.quark.content.building.block.VariantFurnaceBlock; +import org.violetmoon.quark.content.building.block.VariantLadderBlock; +import org.violetmoon.quark.content.building.block.VariantTrappedChestBlock; +import org.violetmoon.quark.content.building.block.VerticalSlabBlock; import org.violetmoon.quark.content.world.block.HugeGlowShroomBlock; +import org.violetmoon.zeta.block.ZetaBlock; +import org.violetmoon.zeta.block.ZetaBlockWrapper; +import org.violetmoon.zeta.block.ZetaBushBlock; +import org.violetmoon.zeta.block.ZetaButtonBlock; +import org.violetmoon.zeta.block.ZetaDoorBlock; +import org.violetmoon.zeta.block.ZetaFenceBlock; +import org.violetmoon.zeta.block.ZetaFenceGateBlock; +import org.violetmoon.zeta.block.ZetaInheritedPaneBlock; +import org.violetmoon.zeta.block.ZetaLeavesBlock; +import org.violetmoon.zeta.block.ZetaPaneBlock; +import org.violetmoon.zeta.block.ZetaPillarBlock; +import org.violetmoon.zeta.block.ZetaPressurePlateBlock; +import org.violetmoon.zeta.block.ZetaSaplingBlock; +import org.violetmoon.zeta.block.ZetaStandingSignBlock; +import org.violetmoon.zeta.block.ZetaVineBlock; +import org.violetmoon.zeta.block.ZetaWallSignBlock; import org.violetmoon.zeta.block.ext.IZetaBlockExtensions; -// Kid named forge interface mixins: +// Forge can't actually mixin to interfaces, so we fake it by just... mixing in to everyone inheriting the interface. @Mixin({ HedgeBlock.class, HugeGlowShroomBlock.class, IronRodBlock.class, MatrixEnchantingTableBlock.class, - QuarkBlock.class, - QuarkBlockWrapper.class, - QuarkBushBlock.class, - QuarkButtonBlock.class, - QuarkDoorBlock.class, - QuarkFenceBlock.class, - QuarkFenceGateBlock.class, - QuarkInheritedPaneBlock.class, - QuarkLeavesBlock.class, - QuarkPaneBlock.class, - QuarkPillarBlock.class, - QuarkPressurePlateBlock.class, - QuarkSaplingBlock.class, - QuarkSlabBlock.class, - QuarkStairsBlock.class, - QuarkStandingSignBlock.class, - QuarkTrapdoorBlock.class, QuarkVerticalSlabBlock.class, - QuarkVineBlock.class, - QuarkWallBlock.class, - QuarkWallSignBlock.class, VariantChestBlock.class, VariantFurnaceBlock.class, VariantLadderBlock.class, VariantTrappedChestBlock.class, VerticalSlabBlock.class, + ZetaBlock.class, + ZetaBlockWrapper.class, + ZetaBushBlock.class, + ZetaButtonBlock.class, + ZetaDoorBlock.class, + ZetaFenceBlock.class, + ZetaFenceGateBlock.class, + ZetaInheritedPaneBlock.class, + ZetaLeavesBlock.class, + ZetaPaneBlock.class, + ZetaPillarBlock.class, + ZetaPressurePlateBlock.class, + ZetaSaplingBlock.class, + QuarkSlabBlock.class, + QuarkStairsBlock.class, + ZetaStandingSignBlock.class, + QuarkTrapdoorBlock.class, + ZetaVineBlock.class, + QuarkWallBlock.class, + ZetaWallSignBlock.class, }) -public class IQuarkBlockMixin implements IZetaBlockExtensions, IForgeBlock { +public class IZetaBlockMixin_FAKE implements IZetaBlockExtensions, IForgeBlock { @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { diff --git a/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin.java b/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin_FAKE.java similarity index 95% rename from src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin.java rename to src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin_FAKE.java index 350f299842..68d1c29406 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mixin/self/IZetaItemMixin_FAKE.java @@ -27,12 +27,13 @@ import org.violetmoon.zeta.item.ZetaItem; import org.violetmoon.zeta.item.ext.IZetaItemExtensions; +// Forge can't actually mixin to interfaces, so we fake it by just... mixing in to everyone inheriting the interface. @Mixin({ ZetaArmorItem.class, ZetaBlockItem.class, ZetaItem.class, }) -public class IZetaItemMixin implements IForgeItem, IZetaItemExtensions { +public class IZetaItemMixin_FAKE implements IForgeItem, IZetaItemExtensions { @Override public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext context) { return onItemUseFirstZeta(stack, context); diff --git a/src/main/resources/zeta_forge.mixins.json b/src/main/resources/zeta_forge.mixins.json index 91afd6f10e..9349543058 100644 --- a/src/main/resources/zeta_forge.mixins.json +++ b/src/main/resources/zeta_forge.mixins.json @@ -4,12 +4,7 @@ "compatibilityLevel": "JAVA_17", "refmap": "quark.mixins.refmap.json", "package": "org.violetmoon.zetaimplforge.mixin", - "mixins": [ - "WeatheringCopperMixin", - "IngredientMixin", - "self.IQuarkBlockMixin", - "self.IZetaItemMixin" - ], + "mixins": ["IngredientMixin", "WeatheringCopperMixin", "self.IZetaBlockMixin_FAKE", "self.IZetaItemMixin_FAKE"], "client": [ "client.AccessorBlockColors", "client.AccessorItemColors",