Remove old stuff
This commit is contained in:
@@ -1,28 +0,0 @@
|
|||||||
package me.cortex.voxy.client.config;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
|
|
||||||
public class BlockConfig {
|
|
||||||
public Block block = Blocks.AIR;
|
|
||||||
public boolean ignoreBlock = false;
|
|
||||||
public final Face[] faces = new Face[6];
|
|
||||||
public float colourMultiplier = 1.0f;
|
|
||||||
|
|
||||||
public BlockConfig() {
|
|
||||||
for (int i = 0; i < this.faces.length; i++) {
|
|
||||||
this.faces[i] = new Face();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Face {
|
|
||||||
public BooleanChoice occludes = BooleanChoice.DEFAULT;
|
|
||||||
public BooleanChoice canBeOccluded = BooleanChoice.DEFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum BooleanChoice {
|
|
||||||
DEFAULT,
|
|
||||||
TRUE,
|
|
||||||
FALSE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package me.cortex.voxy.client.config.screens;
|
|
||||||
|
|
||||||
import me.cortex.voxy.client.config.BlockConfig;
|
|
||||||
import me.shedaniel.clothconfig2.api.AbstractConfigEntry;
|
|
||||||
import me.shedaniel.clothconfig2.api.AbstractConfigListEntry;
|
|
||||||
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
|
|
||||||
public class BlockConfigScreen {
|
|
||||||
private static final ConfigEntryBuilder ENTRY_BUILDER = ConfigEntryBuilder.create();
|
|
||||||
public static AbstractConfigListEntry<BlockConfig> makeScreen(BlockConfig config) {
|
|
||||||
var entry = ENTRY_BUILDER.startSubCategory(config.block.getName());
|
|
||||||
entry.add(UtilityScreens.makeBlockSelectionScreen(Text.literal("a"), Blocks.AIR, null));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package me.cortex.voxy.client.config.screens;
|
|
||||||
|
|
||||||
import me.shedaniel.clothconfig2.api.AbstractConfigListEntry;
|
|
||||||
|
|
||||||
public class StorageConfigScreen {
|
|
||||||
public static AbstractConfigListEntry makeScreen() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package me.cortex.voxy.client.config.screens;
|
|
||||||
|
|
||||||
import me.cortex.voxy.client.config.BlockConfig;
|
|
||||||
import me.shedaniel.clothconfig2.api.AbstractConfigEntry;
|
|
||||||
import me.shedaniel.clothconfig2.api.AbstractConfigListEntry;
|
|
||||||
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
|
|
||||||
import me.shedaniel.clothconfig2.impl.builders.DropdownMenuBuilder;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.registry.Registries;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public class UtilityScreens {
|
|
||||||
private static final ConfigEntryBuilder ENTRY_BUILDER = ConfigEntryBuilder.create();
|
|
||||||
public static AbstractConfigListEntry<Block> makeBlockSelectionScreen(Text name, Block selectedBlock, Consumer<Block> onSave) {
|
|
||||||
return makeBlockSelectionScreen(name, Blocks.AIR, selectedBlock, onSave);
|
|
||||||
}
|
|
||||||
public static AbstractConfigListEntry<Block> makeBlockSelectionScreen(Text name, Block defaultBlock, Block selectedBlock, Consumer<Block> onSave) {
|
|
||||||
return ENTRY_BUILDER.startDropdownMenu(name,
|
|
||||||
DropdownMenuBuilder.TopCellElementBuilder.ofBlockObject(selectedBlock),
|
|
||||||
DropdownMenuBuilder.CellCreatorBuilder.ofBlockObject())
|
|
||||||
.setDefaultValue(defaultBlock)
|
|
||||||
.setSelections(Registries.BLOCK.stream().toList())
|
|
||||||
.setSaveConsumer(onSave)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user