-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhauled Magic and Umbran tree generation, added new Magic Leaf/Sap…
…ling textures
- Loading branch information
Showing
25 changed files
with
609 additions
and
36 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
2 changes: 1 addition & 1 deletion
2
src/generated/resources/data/biomesoplenty/worldgen/configured_feature/big_magic_tree.json
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
2 changes: 1 addition & 1 deletion
2
src/generated/resources/data/biomesoplenty/worldgen/configured_feature/tall_umbran_tree.json
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
2 changes: 1 addition & 1 deletion
2
src/generated/resources/data/biomesoplenty/worldgen/configured_feature/umbran_tree.json
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
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
37 changes: 37 additions & 0 deletions
37
src/main/java/biomesoplenty/common/block/MagicLeavesBlock.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,37 @@ | ||
/******************************************************************************* | ||
* Copyright 2022, the Glitchfiend Team. | ||
* All rights reserved. | ||
******************************************************************************/ | ||
package biomesoplenty.common.block; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.Direction; | ||
import net.minecraft.core.particles.ParticleTypes; | ||
import net.minecraft.util.ParticleUtils; | ||
import net.minecraft.util.RandomSource; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.LeavesBlock; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
public class MagicLeavesBlock extends LeavesBlock | ||
{ | ||
public MagicLeavesBlock(Properties p_273704_) | ||
{ | ||
super(p_273704_); | ||
} | ||
|
||
@Override | ||
public void animateTick(BlockState p_272714_, Level p_272837_, BlockPos p_273218_, RandomSource p_273360_) | ||
{ | ||
super.animateTick(p_272714_, p_272837_, p_273218_, p_273360_); | ||
if (p_273360_.nextInt(20) == 0) | ||
{ | ||
BlockPos blockpos = p_273218_.below(); | ||
BlockState blockstate = p_272837_.getBlockState(blockpos); | ||
if (!isFaceFull(blockstate.getCollisionShape(p_272837_, blockpos), Direction.UP)) | ||
{ | ||
ParticleUtils.spawnParticleBelow(p_272837_, p_273218_, p_273360_, ParticleTypes.END_ROD); | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.