-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1564442
commit 7efd9dd
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
common/src/main/java/pl/panszelescik/colorize/common/handler/CandleCakeBlockHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package pl.panszelescik.colorize.common.handler; | ||
|
||
import net.minecraft.sounds.SoundEvent; | ||
import net.minecraft.sounds.SoundEvents; | ||
import net.minecraft.world.level.block.Blocks; | ||
import pl.panszelescik.colorize.common.api.BaseBlockHandler; | ||
import pl.panszelescik.colorize.common.api.Colors; | ||
import pl.panszelescik.colorize.common.api.RightClicker2BlockMap; | ||
import pl.panszelescik.colorize.common.recipes.ColorizeRecipe; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class CandleCakeBlockHandler extends BaseBlockHandler { | ||
|
||
public CandleCakeBlockHandler() { | ||
super("candle", CANDLE_CAKES); | ||
} | ||
|
||
@Override | ||
protected SoundEvent getSound() { | ||
return SoundEvents.CANDLE_HIT; | ||
} | ||
|
||
@Override | ||
public Stream<ColorizeRecipe> getRecipes() { | ||
return Stream.empty(); // Don't duplicate recipes | ||
} | ||
|
||
private static final RightClicker2BlockMap CANDLE_CAKES = new RightClicker2BlockMap(17); | ||
|
||
static { | ||
CANDLE_CAKES.put(Colors.CLEAR, Blocks.CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.WHITE, Blocks.WHITE_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.ORANGE, Blocks.ORANGE_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.MAGENTA, Blocks.MAGENTA_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.LIGHT_BLUE, Blocks.LIGHT_BLUE_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.YELLOW, Blocks.YELLOW_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.LIME, Blocks.LIME_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.PINK, Blocks.PINK_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.GRAY, Blocks.GRAY_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.LIGHT_GRAY, Blocks.LIGHT_GRAY_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.CYAN, Blocks.CYAN_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.PURPLE, Blocks.PURPLE_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.BLUE, Blocks.BLUE_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.BROWN, Blocks.BROWN_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.GREEN, Blocks.GREEN_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.RED, Blocks.RED_CANDLE_CAKE); | ||
CANDLE_CAKES.put(Colors.BLACK, Blocks.BLACK_CANDLE_CAKE); | ||
} | ||
} |