Skip to content

Commit

Permalink
last changes for tonight, 1370 left
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Nov 17, 2023
1 parent 315293d commit ccf43a0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
26 changes: 13 additions & 13 deletions src/main/java/org/violetmoon/quark/base/util/CorundumColor.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package org.violetmoon.quark.base.util;

import net.minecraft.world.level.material.MaterialColor;
import net.minecraft.world.level.material.MapColor;

public enum CorundumColor {
RED("red", 0xff0000, MaterialColor.COLOR_RED),
ORANGE("orange", 0xff8000, MaterialColor.COLOR_ORANGE),
YELLOW("yellow", 0xffff00, MaterialColor.COLOR_YELLOW),
GREEN("green", 0x00ff00, MaterialColor.COLOR_GREEN),
BLUE("blue", 0x00ffff, MaterialColor.COLOR_LIGHT_BLUE),
INDIGO("indigo", 0x0000ff, MaterialColor.COLOR_BLUE),
VIOLET("violet", 0xff00ff, MaterialColor.COLOR_MAGENTA),
WHITE("white", 0xffffff, MaterialColor.SNOW),
BLACK("black", 0x000000, MaterialColor.COLOR_BLACK);
RED("red", 0xff0000, MapColor.COLOR_RED),
ORANGE("orange", 0xff8000, MapColor.COLOR_ORANGE),
YELLOW("yellow", 0xffff00, MapColor.COLOR_YELLOW),
GREEN("green", 0x00ff00, MapColor.COLOR_GREEN),
BLUE("blue", 0x00ffff, MapColor.COLOR_LIGHT_BLUE),
INDIGO("indigo", 0x0000ff, MapColor.COLOR_BLUE),
VIOLET("violet", 0xff00ff, MapColor.COLOR_MAGENTA),
WHITE("white", 0xffffff, MapColor.SNOW),
BLACK("black", 0x000000, MapColor.COLOR_BLACK);

public final String name;
public final int beaconColor;
public final MaterialColor materialColor;
public final MapColor mapColor;

CorundumColor(String name, int beaconColor, MaterialColor materialColor) {
CorundumColor(String name, int beaconColor, MapColor mapColor) {
this.name = name;
this.beaconColor = beaconColor;
this.materialColor = materialColor;
this.mapColor = mapColor;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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.MapColor;
import org.joml.Vector3f;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.content.world.module.CorundumModule;
Expand All @@ -33,9 +34,10 @@ public class CorundumBlock extends ZetaGlassBlock {

public CorundumClusterBlock cluster;

public CorundumBlock(String regname, int color, ZetaModule module, MaterialColor materialColor, boolean waxed) {
public CorundumBlock(String regname, int color, ZetaModule module, MapColor mapColor, boolean waxed) {
super(regname, module, CreativeModeTab.TAB_DECORATIONS, true,
Block.Properties.of(Material.GLASS, materialColor)
Block.Properties.of(Material.GLASS)
.mapColor(mapColor)
.strength(0.3F, 0F)
.sound(SoundType.AMETHYST)
.lightLevel(b -> 11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.MaterialColor;
import net.minecraft.world.level.material.MapColor;
import org.apache.commons.lang3.tuple.Pair;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.config.Config;
Expand Down Expand Up @@ -76,7 +76,7 @@ public class CorundumModule extends AbstractUndergroundStyleModule<CorundumStyle
@LoadEvent
public final void register(ZRegister event) {
for (CorundumColor color : CorundumColor.values())
add(color.name, color.beaconColor, color.materialColor);
add(color.name, color.beaconColor, color.mapColor);
}

@LoadEvent
Expand All @@ -100,11 +100,11 @@ public void addAdditionalHints(ZGatherHints consumer) {
consumer.accept(block.asItem(), comp);
}

private void add(String name, int color, MaterialColor material) {
CorundumBlock crystal = new CorundumBlock(name + "_corundum", color, this, material, false);
private void add(String name, int color, MapColor mapColor) {
CorundumBlock crystal = new CorundumBlock(name + "_corundum", color, this, mapColor, false);
crystals.add(crystal);

CorundumBlock waxed = new CorundumBlock("waxed_" + name + "_corundum", color, this, material, true);
CorundumBlock waxed = new CorundumBlock("waxed_" + name + "_corundum", color, this, mapColor, true);
ToolInteractionHandler.registerWaxedBlock(this, crystal, waxed);

new ZetaInheritedPaneBlock(crystal);
Expand Down

0 comments on commit ccf43a0

Please sign in to comment.