Skip to content

Commit

Permalink
its joever.....
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Dec 4, 2023
1 parent 9561ae5 commit 335852a
Show file tree
Hide file tree
Showing 47 changed files with 261 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class CrateBlock extends ZetaBlock implements EntityBlock {
public CrateBlock(ZetaModule module) {
super("crate", module, Properties.copy(Blocks.BARREL));
registerDefaultState(stateDefinition.any().setValue(PROPERTY_OPEN, false));
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.BARREL, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public BackpackItem(ZetaModule module) {
if(module.category.isAddon())
module.zeta.requiredModTooltipHandler.map(this, module.category.requiredMod);

CreativeTabManager.addToCreativeTab(CreativeModeTabs.TOOLS_AND_UTILITIES, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.SADDLE, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class BackpackModule extends ZetaModule {
@LoadEvent
public final void register(ZRegister event) {
backpack = new BackpackItem(this);
ravager_hide = new ZetaItem("ravager_hide", this, new Item.Properties().rarity(Rarity.RARE)).setCondition(() -> enableRavagerHide).setCreativeTab(CreativeModeTabs.INGREDIENTS);
ravager_hide = new ZetaItem("ravager_hide", this, new Item.Properties().rarity(Rarity.RARE)).setCondition(() -> enableRavagerHide).setCreativeTab(CreativeModeTabs.INGREDIENTS, Items.RABBIT_HIDE, false);

menyType = IForgeMenuType.create(BackpackMenu::fromNetwork);
Quark.ZETA.registry.register(menyType, "backpack", Registries.MENU);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ public static WoodSet addWoodSet(ZRegister event, ZetaModule module, String name

CreativeTabManager.endDaisyChain();

((IZetaBlock) set.log).setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, Blocks.WARPED_STEM, false);

set.sign = new ZetaStandingSignBlock(name + "_sign", module, type, OldMaterials.wood().mapColor(color).noCollission().strength(1.0F).sound(SoundType.WOOD));
set.wallSign = new ZetaWallSignBlock(name + "_wall_sign", module, type, OldMaterials.wood().mapColor(color).noCollission().strength(1.0F).sound(SoundType.WOOD).lootFrom(() -> set.sign));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.entity.BlockEntity;
Expand Down Expand Up @@ -52,7 +53,7 @@ public class FeedingTroughBlock extends ZetaBlock implements EntityBlock {
public FeedingTroughBlock(String regname, ZetaModule module, Properties properties) {
super(regname, module, properties);
registerDefaultState(defaultBlockState().setValue(FULL, false));
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.COMPOSTER, true);
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public RedstoneRandomizerBlock(String regname, ZetaModule module, String creativ
.setValue(POWERED, RandomizerPowerState.OFF));

module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT);
setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS);
setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS, Blocks.COMPARATOR, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public GrateBlock(ZetaModule module) {

registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false).setValue(LAVALOGGED, false));
module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.CHAIN, false);
}

private static VoxelShape createNewBox(double stepHeight) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public LeafCarpetBlock(String name, Block base, ZetaModule module) {
baseState = base.defaultBlockState();

module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED);
setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS);
setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, base, false);
}

public BlockState getBaseState() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public RopeBlock(String regname, ZetaModule module, Properties properties) {

registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false));
module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS);
setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.CHAIN, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.gameevent.GameEvent;
Expand All @@ -30,7 +31,7 @@ public class QuarkItemFrameItem extends ZetaItem {
public QuarkItemFrameItem(String name, ZetaModule module, TriFunction<? extends HangingEntity, Level, BlockPos, Direction> entityProvider) {
super(name, module, new Item.Properties());
this.entityProvider = entityProvider;
CreativeTabManager.addToCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.FUNCTIONAL_BLOCKS, this, Items.GLOW_ITEM_FRAME, false);
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public final void register(ZRegister event) {
.sound(SoundType.GLASS)
.lightLevel(b -> 15))
.setCondition(() -> enableBlazeLantern)
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.NETHERRACK, true);

new ZetaBlock("bonded_leather", this, Block.Properties.of()
.mapColor(MapColor.COLOR_ORANGE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.violetmoon.quark.content.building.module;

import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import java.util.HashMap;
import java.util.Map;

import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.zeta.block.IZetaBlock;
Expand All @@ -16,6 +13,12 @@
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;

import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;

@ZetaLoadModule(category = "building")
public class FramedGlassModule extends ZetaModule {

Expand All @@ -28,9 +31,16 @@ public final void register(ZRegister event) {
new ZetaInheritedPaneBlock((IZetaBlock) new ZetaGlassBlock("framed_glass", this, false, props).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.GLASS, false))
.setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.GLASS_PANE, false);

Map<DyeColor, IZetaBlock> blocks = new HashMap<>();
CreativeTabManager.daisyChain();
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER)
blocks.put(dye, (IZetaBlock) new ZetaGlassBlock(dye.getName() + "_framed_glass", this, true, props).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS, false));
CreativeTabManager.endDaisyChain();

CreativeTabManager.daisyChain();
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER)
new ZetaInheritedPaneBlock((IZetaBlock) new ZetaGlassBlock(dye.getName() + "_framed_glass", this, true, props).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS, true))
.setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS_PANE, true);
new ZetaInheritedPaneBlock(blocks.get(dye)).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS_PANE, false);
CreativeTabManager.endDaisyChain();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.violetmoon.zeta.event.load.ZRegister;
import org.violetmoon.zeta.module.ZetaLoadModule;
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;
import org.violetmoon.zeta.util.Hint;

/**
Expand Down Expand Up @@ -49,13 +50,15 @@ public final void register(ZRegister event) {
.build("glass_frame");
Quark.ZETA.registry.register(glassFrameEntity, "glass_frame", Registries.ENTITY_TYPE);

CreativeTabManager.daisyChain();
glassFrame = new QuarkItemFrameItem("glass_item_frame", this, GlassItemFrame::new);
glowingGlassFrame = new QuarkItemFrameItem("glowing_glass_item_frame", this,
(w, p, d) -> {
GlassItemFrame e = new GlassItemFrame(w, p, d);
e.getEntityData().set(GlassItemFrame.IS_SHINY, true);
return e;
});
CreativeTabManager.endDaisyChain();
}

@LoadEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.ComposterBlock;
Expand All @@ -26,7 +27,7 @@ public class MidoriModule extends ZetaModule {

@LoadEvent
public final void register(ZRegister event) {
moss_paste = new ZetaItem("moss_paste", this, new Item.Properties()).setCreativeTab(CreativeModeTabs.INGREDIENTS);
moss_paste = new ZetaItem("moss_paste", this, new Item.Properties()).setCreativeTab(CreativeModeTabs.INGREDIENTS, Items.CLAY_BALL, false);

Block.Properties props = Block.Properties.of()
.mapColor(MapColor.COLOR_LIGHT_GREEN)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.violetmoon.quark.content.building.module;

import net.minecraft.core.registries.Registries;
import java.util.ArrayList;
import java.util.List;

import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.handler.MiscUtil;
import org.violetmoon.quark.content.building.block.StoolBlock;
Expand All @@ -19,15 +21,17 @@

import net.minecraft.client.renderer.entity.EntityRenderers;
import net.minecraft.core.Direction;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
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.BlockItem;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;

@ZetaLoadModule(category = "building")
Expand All @@ -39,11 +43,18 @@ public class StoolsModule extends ZetaModule {

@LoadEvent
public final void register(ZRegister event) {
List<StoolBlock> stools = new ArrayList<>();

CreativeTabManager.daisyChain();
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER)
new StoolBlock(this, dye);
stools.add(new StoolBlock(this, dye));
CreativeTabManager.endDaisyChain();

CreativeTabManager.daisyChain();
for(StoolBlock s : stools)
s.setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.PINK_BED, false);
CreativeTabManager.endDaisyChain();

stoolEntity = EntityType.Builder.of(Stool::new, MobCategory.MISC)
.sized(6F / 16F, 0.5F)
.clientTrackingRange(3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.Level;
Expand All @@ -31,7 +32,7 @@ public class DiamondHeartItem extends ZetaItem {

public DiamondHeartItem(String regname, ZetaModule module, Properties properties) {
super(regname, module, properties);
CreativeTabManager.addToCreativeTab(CreativeModeTabs.TOOLS_AND_UTILITIES, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.ENDER_PEARL, true);
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ForgottenHatItem(ZetaModule module) {

Quark.ZETA.registry.registerItem(this, "forgotten_hat");
this.module = module;
CreativeTabManager.addToCreativeTab(CreativeModeTabs.TOOLS_AND_UTILITIES, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.SADDLE, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.violetmoon.quark.base.handler.QuarkSounds;
Expand All @@ -26,7 +27,7 @@ public class SoulBeadItem extends ZetaItem {

public SoulBeadItem(ZetaModule module) {
super("soul_bead", module, new Item.Properties());
CreativeTabManager.addToCreativeTab(CreativeModeTabs.TOOLS_AND_UTILITIES, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.ENDER_PEARL, true);
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public final void register(ZRegister event) {
CreativeTabManager.endDaisyChain();

crab_shell = new ZetaItem("crab_shell", this, new Item.Properties())
.setCondition(() -> enableBrewing).setCreativeTab(CreativeModeTabs.INGREDIENTS);
.setCondition(() -> enableBrewing).setCreativeTab(CreativeModeTabs.INGREDIENTS, Items.RABBIT_FOOT, false);

crab_bucket = new ZetaMobBucketItem(() -> crabType, () -> Fluids.WATER, () -> QuarkSounds.BUCKET_EMPTY_CRAB, "crab_bucket", this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BottledCloudItem extends ZetaItem {

public BottledCloudItem(ZetaModule module) {
super("bottled_cloud", module, new Item.Properties());
CreativeTabManager.addToCreativeTab(CreativeModeTabs.TOOLS_AND_UTILITIES, this);
CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.MILK_BUCKET, false);
}

@NotNull
Expand Down
Loading

0 comments on commit 335852a

Please sign in to comment.