Skip to content

Commit

Permalink
Add paper walls to creative. Fixes #4505
Browse files Browse the repository at this point in the history
  • Loading branch information
quat1024 committed Dec 19, 2023
1 parent 5c4455d commit b5c8f56
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
package org.violetmoon.quark.content.building.module;

import net.minecraft.world.item.CreativeModeTabs;
import org.violetmoon.quark.base.config.Config;
import org.violetmoon.quark.content.building.block.BambooMatBlock;
import org.violetmoon.quark.content.building.block.BambooMatCarpetBlock;
Expand All @@ -20,6 +21,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 java.util.function.BooleanSupplier;

Expand All @@ -37,12 +39,15 @@ public final void register(ZRegister event) {
BooleanSupplier paperBlockCond = () -> enablePaperBlocks;
BooleanSupplier bambooMatCond = () -> enableBambooMats;

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

new PaperWallBlock(parent, "paper_wall").setCondition(paperBlockCond);
new PaperWallBlock(parent, "paper_wall_big").setCondition(paperBlockCond);
new PaperWallBlock(parent, "paper_wall_sakura").setCondition(paperBlockCond);
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);
CreativeTabManager.endDaisyChain();

new PaperWallBlock(paperLantern, "paper_wall_sakura").setCondition(paperBlockCond).setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, paperLanternSakura.getBlock(), false);

new BambooMatBlock("bamboo_mat", this).setCondition(bambooMatCond);
new BambooMatCarpetBlock("bamboo_mat_carpet", this).setCondition(bambooMatCond);
Expand Down

0 comments on commit b5c8f56

Please sign in to comment.