Skip to content

Commit

Permalink
most block loot tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Partonetrain committed Jan 12, 2025
1 parent 07b0d70 commit b8cc10f
Show file tree
Hide file tree
Showing 29 changed files with 498 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ public WoodSet(String name, ZetaModule module, WoodType type) {
this.type = type;
}

public List<Block> allBlocks() {
return List.of(log, wood, planks, strippedLog, strippedWood, slab, stairs, fence, fenceGate, door, trapdoor, button, pressurePlate, sign, wallSign, ceilingHangingSign, wallHangingSign, bookshelf, ladder, post, strippedPost, verticalPlanks, hollowLog);
}

}

public static class Client {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.util.BlockPropertyUtil;
import org.violetmoon.quark.content.building.module.VerticalSlabsModule;
import org.violetmoon.zeta.block.IZetaBlock;
import org.violetmoon.zeta.block.ZetaSlabBlock;
import org.violetmoon.zeta.module.ZetaModule;
Expand Down Expand Up @@ -35,6 +36,7 @@ public QuarkVerticalSlabBlock(Block parent, ZetaModule module) {
setCondition(quarkSlab.parent::isEnabled);

CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.BUILDING_BLOCKS, this, parent, false);
VerticalSlabsModule.blocks.add(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public class CompressedBlocksModule extends ZetaModule {

public static Block stick_block;

public static List<Block> blocks = Lists.newArrayList();
private final List<Block> compostable = Lists.newArrayList();

@LoadEvent
Expand All @@ -108,24 +109,40 @@ public final void register(ZRegister event) {
.sound(SoundType.STONE))
.setCondition(() -> enableCharcoalBlock)
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.COAL_BLOCK, false);

pillar("sugar_cane", MapColor.COLOR_LIGHT_GREEN, true, () -> enableSugarCaneBlock, 200);
pillar("cactus", MapColor.COLOR_GREEN, true, () -> enableCactusBlock, 50);
pillar("chorus_fruit", MapColor.COLOR_PURPLE, false, () -> enableChorusFruitBlock, 10);
blocks.add(charcoal_block);

Block sugarCane = pillar("sugar_cane", MapColor.COLOR_LIGHT_GREEN, true, () -> enableSugarCaneBlock, 200);
blocks.add(sugarCane);
Block cactus = pillar("cactus", MapColor.COLOR_GREEN, true, () -> enableCactusBlock, 50);
blocks.add(cactus);
Block chorus = pillar("chorus_fruit", MapColor.COLOR_PURPLE, false, () -> enableChorusFruitBlock, 10);
blocks.add(chorus);
stick_block = pillar("stick", MapColor.WOOD, false, () -> enableStickBlock, 300);
blocks.add(stick_block);

golden_apple_crate = crate("golden_apple", MapColor.GOLD, false, () -> enableGoldenAppleCrate);
crate("apple", MapColor.COLOR_RED, true, () -> enableAppleCrate);
crate("potato", MapColor.COLOR_ORANGE, true, () -> enablePotatoCrate);
crate("carrot", MapColor.TERRACOTTA_ORANGE, true, () -> enableCarrotCrate);
crate("golden_carrot", MapColor.GOLD, false, () -> enableGoldenCarrotCrate);
crate("beetroot", MapColor.COLOR_RED, true, () -> enableBeetrootCrate);

sack("cocoa_beans", MapColor.COLOR_BROWN, true, () -> enableCocoaBeanSack);
sack("nether_wart", MapColor.COLOR_RED, true, () -> enableNetherWartSack);
sack("gunpowder", MapColor.COLOR_GRAY, false, () -> enableGunpowderSack);
sack("berry", MapColor.COLOR_RED, true, () -> enableBerrySack);
sack("glowberry", MapColor.COLOR_YELLOW, 14, true, () -> enableGlowBerrySack);
blocks.add(golden_apple_crate);
Block apple = crate("apple", MapColor.COLOR_RED, true, () -> enableAppleCrate);
blocks.add(apple);
Block potato = crate("potato", MapColor.COLOR_ORANGE, true, () -> enablePotatoCrate);
blocks.add(potato);
Block carrot = crate("carrot", MapColor.TERRACOTTA_ORANGE, true, () -> enableCarrotCrate);
blocks.add(carrot);
Block golden_carrot = crate("golden_carrot", MapColor.GOLD, false, () -> enableGoldenCarrotCrate);
blocks.add(golden_carrot);
Block beetroot = crate("beetroot", MapColor.COLOR_RED, true, () -> enableBeetrootCrate);
blocks.add(beetroot);

Block cocoa = sack("cocoa_beans", MapColor.COLOR_BROWN, true, () -> enableCocoaBeanSack);
blocks.add(cocoa);
Block wart = sack("nether_wart", MapColor.COLOR_RED, true, () -> enableNetherWartSack);
blocks.add(wart);
Block gunpowder = sack("gunpowder", MapColor.COLOR_GRAY, false, () -> enableGunpowderSack);
blocks.add(gunpowder);
Block berry = sack("berry", MapColor.COLOR_RED, true, () -> enableBerrySack);
blocks.add(berry);
Block glowberry = sack("glowberry", MapColor.COLOR_YELLOW, 14, true, () -> enableGlowBerrySack);
blocks.add(glowberry);

blaze_lantern = new ZetaBlock("blaze_lantern", this,
Block.Properties.of()
Expand All @@ -135,22 +152,25 @@ public final void register(ZRegister event) {
.lightLevel(b -> 15))
.setCondition(() -> enableBlazeLantern)
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.NETHERRACK, true);
blocks.add(blaze_lantern);

new ZetaBlock("bonded_leather", this, Block.Properties.of()
Block leather = new ZetaBlock("bonded_leather", this, Block.Properties.of()
.mapColor(MapColor.COLOR_ORANGE)
.ignitedByLava()
.strength(0.4F)
.sound(SoundType.WOOL))
.setCondition(() -> enableBondedLeather)
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
blocks.add(leather);

new ZetaBlock("bonded_rabbit_hide", this, Block.Properties.of()
Block hide = new ZetaBlock("bonded_rabbit_hide", this, Block.Properties.of()
.mapColor(MapColor.TERRACOTTA_WHITE)
.ignitedByLava()
.strength(0.4F)
.sound(SoundType.WOOL))
.setCondition(() -> enableBondedRabbitHide)
.setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
blocks.add(hide);
}

@LoadEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.violetmoon.quark.content.building.module;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.violetmoon.zeta.block.IZetaBlock;
Expand All @@ -22,6 +24,8 @@
@ZetaLoadModule(category = "building")
public class FramedGlassModule extends ZetaModule {

public static List<Block> glassBlocks = new ArrayList<>();

@LoadEvent
public final void register(ZRegister event) {
Block.Properties props = Block.Properties.of()
Expand All @@ -33,13 +37,18 @@ public final void register(ZRegister event) {

Map<DyeColor, IZetaBlock> blocks = new HashMap<>();
CreativeTabManager.daisyChain();
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER)
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));
glassBlocks.add((Block) blocks.get(dye));
}
CreativeTabManager.endDaisyChain();

CreativeTabManager.daisyChain();
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER)
new ZetaInheritedPaneBlock(blocks.get(dye)).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS_PANE, false);
for(DyeColor dye : MiscUtil.CREATIVE_COLOR_ORDER){
Block block = new ZetaInheritedPaneBlock(blocks.get(dye)).setCreativeTab(CreativeModeTabs.COLORED_BLOCKS, Blocks.PINK_STAINED_GLASS_PANE, false);
glassBlocks.add(block);
}

CreativeTabManager.endDaisyChain();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,39 @@
import org.violetmoon.zeta.module.ZetaLoadModule;
import org.violetmoon.zeta.module.ZetaModule;

import java.util.ArrayList;
import java.util.List;

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

public static TagKey<Block> hedgesTag;
public static List<HedgeBlock> hedges = new ArrayList<>();

@LoadEvent
public final void register(ZRegister event) {
for(Wood wood : VanillaWoods.OVERWORLD_WITH_TREE)
new HedgeBlock(wood.name() + "_hedge", this, wood.fence(), wood.leaf());
for(Wood wood : VanillaWoods.OVERWORLD_WITH_TREE){
HedgeBlock hedgeBlock = new HedgeBlock(wood.name() + "_hedge", this, wood.fence(), wood.leaf());
hedges.add(hedgeBlock);
}

new HedgeBlock("azalea_hedge", this, Blocks.OAK_FENCE, Blocks.AZALEA_LEAVES);
new HedgeBlock("flowering_azalea_hedge", this, Blocks.OAK_FENCE, Blocks.FLOWERING_AZALEA_LEAVES);

HedgeBlock azaleaHedge = new HedgeBlock("azalea_hedge", this, Blocks.OAK_FENCE, Blocks.AZALEA_LEAVES);
hedges.add(azaleaHedge);
HedgeBlock floweringAzaleaHedge = new HedgeBlock("flowering_azalea_hedge", this, Blocks.OAK_FENCE, Blocks.FLOWERING_AZALEA_LEAVES);
hedges.add(floweringAzaleaHedge);
}

@LoadEvent
public void postRegister(ZRegister.Post e) {
for(BlossomTreesModule.BlossomTree tree : BlossomTreesModule.blossomTrees)
new HedgeBlock(tree.name + "_hedge", this, BlossomTreesModule.woodSet.fence, tree.leaves).setCondition(tree.sapling::isEnabled);
for(BlossomTreesModule.BlossomTree tree : BlossomTreesModule.blossomTrees){
HedgeBlock blossomHedge = (HedgeBlock) new HedgeBlock(tree.name + "_hedge", this, BlossomTreesModule.woodSet.fence, tree.leaves).setCondition(tree.sapling::isEnabled);
hedges.add(blossomHedge);
}

new HedgeBlock("ancient_hedge", this, AncientWoodModule.woodSet.fence, AncientWoodModule.ancient_leaves)
HedgeBlock ancientHedge = (HedgeBlock) new HedgeBlock("ancient_hedge", this, AncientWoodModule.woodSet.fence, AncientWoodModule.ancient_leaves)
.setCondition(() -> Quark.ZETA.modules.isEnabled(AncientWoodModule.class));
hedges.add(ancientHedge);
}

@LoadEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.violetmoon.quark.content.building.module;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.minecraft.core.registries.Registries;
Expand Down Expand Up @@ -36,6 +38,7 @@
@ZetaLoadModule(category = "building")
public class HollowLogsModule extends ZetaModule {

public static List<Block> hollowLogs = new ArrayList<>();
private static final String TAG_TRYING_TO_CRAWL = "quark:trying_crawl";

public static ManualTrigger crawlTrigger;
Expand All @@ -57,7 +60,8 @@ public final void configChanged(ZConfigChanged event) {
@LoadEvent
public final void register(ZRegister event) {
for(Wood wood : VanillaWoods.ALL_WITH_LOGS) {
new HollowLogBlock(wood.log(), this, !wood.nether());
Block block = new HollowLogBlock(wood.log(), this, !wood.nether());
hollowLogs.add(block);
}

crawlTrigger = event.getAdvancementModifierRegistry().registerManualTrigger("hollow_log_crawl");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BooleanSupplier;

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

public static List<Block> blocks = new ArrayList<>();

private static final SoundType IRON_LADDER_SOUND_TYPE = new SoundType(1.0F, 1.0F,
SoundEvents.METAL_BREAK,
SoundEvents.LADDER_STEP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import net.minecraft.world.item.CreativeModeTabs;

import net.minecraft.world.level.block.Block;
import org.violetmoon.quark.content.building.block.BambooMatBlock;
import org.violetmoon.quark.content.building.block.BambooMatCarpetBlock;
import org.violetmoon.quark.content.building.block.PaperLanternBlock;
Expand All @@ -24,11 +25,15 @@
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BooleanSupplier;

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

public static List<Block> blocks = new ArrayList<>();

@Config(flag = "paper_decor")
public static boolean enablePaperBlocks = true;

Expand All @@ -41,17 +46,24 @@ public final void register(ZRegister event) {
BooleanSupplier bambooMatCond = () -> enableBambooMats;

IZetaBlock paperLantern = new PaperLanternBlock("paper_lantern", this).setCondition(paperBlockCond);
blocks.add(paperLantern.getBlock());
IZetaBlock paperLanternSakura = new PaperLanternBlock("paper_lantern_sakura", this).setCondition(paperBlockCond);
blocks.add(paperLanternSakura.getBlock());

CreativeTabManager.daisyChain();
new PaperWallBlock(paperLantern, "paper_wall").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLantern.getBlock(), false);
new PaperWallBlock(paperLantern, "paper_wall_big").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLantern.getBlock(), false);
Block paperWall = new PaperWallBlock(paperLantern, "paper_wall").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLantern.getBlock(), false);
blocks.add(paperWall);
Block paperWallBig = new PaperWallBlock(paperLantern, "paper_wall_big").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLantern.getBlock(), false);
blocks.add(paperWallBig);
CreativeTabManager.endDaisyChain();

new PaperWallBlock(paperLantern, "paper_wall_sakura").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLanternSakura.getBlock(), false);
Block paperWallSakura = new PaperWallBlock(paperLantern, "paper_wall_sakura").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLanternSakura.getBlock(), false);
blocks.add(paperWallSakura);

new BambooMatBlock("bamboo_mat", this).setCondition(bambooMatCond);
new BambooMatCarpetBlock("bamboo_mat_carpet", this).setCondition(bambooMatCond);
Block bambooMat = new BambooMatBlock("bamboo_mat", this).setCondition(bambooMatCond);
blocks.add(bambooMat);
Block bambooMatCarpet = new BambooMatCarpetBlock("bamboo_mat_carpet", this).setCondition(bambooMatCond);
blocks.add(bambooMatCarpet);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;

import java.util.ArrayList;
import java.util.List;

@ZetaLoadModule(category = "building")
public class MidoriModule extends ZetaModule {
public static List<Block> blocks = new ArrayList<>();

private static Item moss_paste;

Expand All @@ -37,7 +41,9 @@ public final void register(ZRegister event) {

CreativeTabManager.daisyChain();
Block midori = new ZetaBlock("midori_block", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.COAL_BLOCK, true);
new ZetaPillarBlock("midori_pillar", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
blocks.add(midori);
Block pillar = new ZetaPillarBlock("midori_pillar", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
blocks.add(pillar);
event.getVariantRegistry().addSlabAndStairs((IZetaBlock) midori, null);
CreativeTabManager.endDaisyChain();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.violetmoon.quark.content.building.module;

import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
Expand All @@ -14,17 +15,24 @@
import org.violetmoon.zeta.module.ZetaModule;
import org.violetmoon.zeta.registry.CreativeTabManager;

import java.util.ArrayList;
import java.util.List;

@ZetaLoadModule(category = "building")
public class MoreMudBlocksModule extends ZetaModule {
public static List<Block> blocks = new ArrayList<>();

@LoadEvent
public final void register(ZRegister event) {
BlockBehaviour.Properties props = Properties.ofFullCopy(Blocks.MUD_BRICKS);

CreativeTabManager.daisyChain();
new ZetaBlock("carved_mud_bricks", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.MUD_BRICK_STAIRS, false);
new ZetaPillarBlock("mud_pillar", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
new MudBrickLatticeBlock(this, props);
Block carved = new ZetaBlock("carved_mud_bricks", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, Blocks.MUD_BRICK_STAIRS, false);
blocks.add(carved);
Block pillar = new ZetaPillarBlock("mud_pillar", this, props).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS);
blocks.add(pillar);
Block lattice = new MudBrickLatticeBlock(this, props);
blocks.add(lattice);
CreativeTabManager.endDaisyChain();
}

Expand Down
Loading

0 comments on commit b8cc10f

Please sign in to comment.