-
Notifications
You must be signed in to change notification settings - Fork 11
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
43039f4
commit 7d4535c
Showing
21 changed files
with
207 additions
and
50 deletions.
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
35 changes: 35 additions & 0 deletions
35
src/main/java/net/zepalesque/redux/blockset/flower/ReduxFlowerSets.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,35 @@ | ||
package net.zepalesque.redux.blockset.flower; | ||
|
||
import com.aetherteam.aether.block.AetherBlocks; | ||
import com.aetherteam.aether.item.AetherCreativeTabs; | ||
import net.minecraft.data.recipes.RecipeCategory; | ||
import net.minecraft.world.effect.MobEffects; | ||
import net.minecraft.world.item.Items; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraft.world.level.block.state.BlockBehaviour.Properties; | ||
import net.minecraft.world.phys.shapes.VoxelShape; | ||
import net.zepalesque.redux.Redux; | ||
import net.zepalesque.redux.block.natural.bush.CustomBoundsFlowerBlock; | ||
import net.zepalesque.redux.blockset.flower.type.AetherFlowerSet; | ||
import net.zepalesque.redux.blockset.flower.type.BaseFlowerSet; | ||
import net.zepalesque.redux.blockset.stone.ReduxStoneSets; | ||
import net.zepalesque.zenith.api.blockset.AbstractFlowerSet; | ||
import net.zepalesque.zenith.api.blockset.AbstractStoneSet; | ||
import net.zepalesque.zenith.block.util.CommonPlantBounds; | ||
|
||
public class ReduxFlowerSets { | ||
|
||
public static final BaseFlowerSet<CustomBoundsFlowerBlock> AURUM = register(new AetherFlowerSet<>("aurum", "natural/", | ||
() -> new CustomBoundsFlowerBlock(CommonPlantBounds.FLOWER, | ||
() -> MobEffects.LUCK, 60, Properties.ofFullCopy(Blocks.DANDELION)), 1, /*TODO*/ 0xFFED96)) | ||
.creativeTab(AetherCreativeTabs.AETHER_NATURAL_BLOCKS, AetherBlocks.WHITE_FLOWER) | ||
.craftsIntoShapeless(1, () -> Items.YELLOW_DYE, 1, RecipeCategory.MISC); | ||
|
||
public static <T extends AbstractFlowerSet> T register(T set) { | ||
Redux.FLOWER_SETS.add(set); | ||
return set; | ||
} | ||
|
||
public static void init() {} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/net/zepalesque/redux/blockset/flower/type/AetherFlowerSet.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,28 @@ | ||
package net.zepalesque.redux.blockset.flower.type; | ||
|
||
import net.minecraft.world.level.block.Block; | ||
import net.zepalesque.redux.block.ReduxBlocks; | ||
import net.zepalesque.redux.data.prov.ReduxBlockStateProvider; | ||
import net.zepalesque.redux.data.prov.ReduxItemModelProvider; | ||
import net.zepalesque.zenith.util.lambda.Consumers; | ||
import org.apache.logging.log4j.util.TriConsumer; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class AetherFlowerSet<B extends Block> extends TintedFlowerSet<B> { | ||
public AetherFlowerSet(String id, String textureFolder, Supplier<B> constructor, int tintdex, int itemTint) { | ||
super(id, textureFolder, constructor, tintdex, itemTint); | ||
} | ||
|
||
@Override | ||
public void blockData(ReduxBlockStateProvider data) { | ||
data.crossTintedOverlay(this.flower().get(), this.textureFolder); | ||
Consumers.C3<Block, Block, String> pot = this.usePottedPrefix ? data::tintedPotOverlayAlt : data::tintedPotOverlay; | ||
pot.accept(this.pot().get(), this.flower().get(), this.textureFolder); | ||
} | ||
|
||
@Override | ||
public void itemData(ReduxItemModelProvider data) { | ||
data.itemBlockFlatTintOverlay(this.flower().get(), this.textureFolder); | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
src/main/java/net/zepalesque/redux/blockset/flower/type/TintedFlowerSet.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,26 @@ | ||
package net.zepalesque.redux.blockset.flower.type; | ||
|
||
import net.minecraft.world.level.block.Block; | ||
import net.zepalesque.redux.blockset.util.TintableSet; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public abstract class TintedFlowerSet<B extends Block> extends BaseFlowerSet<B> implements TintableSet { | ||
private final int tintdex, itemTint; | ||
|
||
public TintedFlowerSet(String id, String textureFolder, Supplier<B> constructor, int tintdex, int itemTint) { | ||
super(id, textureFolder, constructor); | ||
this.tintdex = tintdex; | ||
this.itemTint = itemTint; | ||
} | ||
|
||
@Override | ||
public int getTintIndex() { | ||
return this.tintdex; | ||
} | ||
|
||
@Override | ||
public int getDefaultItemTint() { | ||
return this.itemTint; | ||
} | ||
} |
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
4 changes: 3 additions & 1 deletion
4
src/main/java/net/zepalesque/redux/blockset/util/MutableLoreGeneration.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package net.zepalesque.redux.blockset.util; | ||
|
||
public interface MutableLoreGeneration<T extends MutableLoreGeneration<?>> extends ReduxGeneration { | ||
import net.zepalesque.redux.blockset.flower.type.BaseFlowerSet; | ||
|
||
public interface MutableLoreGeneration<T extends MutableLoreGeneration<T>> extends ReduxGeneration { | ||
T withLore(String lore); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/net/zepalesque/redux/blockset/util/TintableSet.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,8 @@ | ||
package net.zepalesque.redux.blockset.util; | ||
|
||
public interface TintableSet { | ||
|
||
int getTintIndex(); | ||
|
||
int getDefaultItemTint(); | ||
} |
Oops, something went wrong.