mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Re-Activate Dynamic Trees Compat
This commit is contained in:
parent
d66170c8fe
commit
4d2c35b11b
@ -194,9 +194,14 @@ dependencies {
|
||||
runtimeOnly fg.deobf("org.squiddev:cc-tweaked-${cc_tweaked_minecraft_version}:${cc_tweaked_version}")
|
||||
}
|
||||
|
||||
compileOnly fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-${dynamic_trees_minecraft_version}:${dynamic_trees_version}")
|
||||
|
||||
if (dynamic_trees_enable.toBoolean()) {
|
||||
compileOnly fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-${dynamic_trees_minecraft_version}:${dynamic_trees_version}")
|
||||
}
|
||||
|
||||
// implementation fg.deobf("curse.maven:ic2-classic-242942:4563059")
|
||||
// implementation fg.deobf("curse.maven:druidcraft-340991:3101903")
|
||||
// implementation fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-1.16.5:0.10.0-Beta25")
|
||||
// runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
|
||||
// runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
||||
// runtimeOnly fg.deobf("slimeknights.mantle:Mantle:1.16.5-1.6.115")
|
||||
|
@ -33,6 +33,10 @@ cc_tweaked_enable = true
|
||||
cc_tweaked_minecraft_version = 1.18.2
|
||||
cc_tweaked_version = 1.100.10
|
||||
|
||||
dynamic_trees_enable = true
|
||||
dynamic_trees_minecraft_version = 1.18.2
|
||||
dynamic_trees_version = 1.0.4
|
||||
|
||||
# curseforge information
|
||||
projectId = 328085
|
||||
curse_type = beta
|
||||
|
@ -4,31 +4,35 @@ import java.util.function.BiConsumer;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.ferreusveritas.dynamictrees.api.TreeHelper;
|
||||
import com.ferreusveritas.dynamictrees.block.branch.BranchBlock;
|
||||
import com.ferreusveritas.dynamictrees.block.branch.TrunkShellBlock;
|
||||
import com.ferreusveritas.dynamictrees.util.BranchDestructionData;
|
||||
import com.simibubi.create.foundation.utility.AbstractBlockBreakQueue;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
// Commented until dynamic trees are updated
|
||||
public class DynamicTree extends AbstractBlockBreakQueue {
|
||||
|
||||
// private BlockPos startCutPos;
|
||||
private BlockPos startCutPos;
|
||||
|
||||
public DynamicTree(BlockPos startCutPos) {
|
||||
// this.startCutPos = startCutPos;
|
||||
this.startCutPos = startCutPos;
|
||||
}
|
||||
|
||||
public static boolean isDynamicBranch(Block block) {
|
||||
return false; // TreeHelper.isBranch(block) || block instanceof TrunkShellBlock;
|
||||
return TreeHelper.isBranch(block) || block instanceof TrunkShellBlock;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void destroyBlocks(Level world, ItemStack toDamage, @Nullable Player playerEntity, BiConsumer<BlockPos, ItemStack> drop) {
|
||||
/*
|
||||
|
||||
BranchBlock start = TreeHelper.getBranch(world.getBlockState(startCutPos));
|
||||
if (start == null) //if start is null, it was not a branch
|
||||
@ -39,19 +43,18 @@ public class DynamicTree extends AbstractBlockBreakQueue {
|
||||
|
||||
// Play and render block break sound and particles
|
||||
world.levelEvent(null, 2001, startCutPos, Block.getId(world.getBlockState(startCutPos)));
|
||||
// Actually breaks the tree
|
||||
|
||||
// Actually breaks the tree
|
||||
BranchDestructionData data = start.destroyBranchFromNode(world, startCutPos, Direction.DOWN, false, playerEntity);
|
||||
|
||||
// Feed all the tree drops to drop bi-consumer
|
||||
data.leavesDrops.forEach(stackPos -> drop.accept(stackPos.pos.offset(startCutPos), stackPos.stack));
|
||||
start.getLogDrops(world, startCutPos, data.species, data.woodVolume).forEach(stack -> drop.accept(startCutPos, stack));
|
||||
start.getFamily().getCommonSpecies().getBranchesDrops(world, data.woodVolume).forEach(stack -> drop.accept(startCutPos, stack));
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
private BranchBlock setBranchToShellMuse(World world, BlockState state) {
|
||||
|
||||
private BranchBlock setBranchToShellMuse(Level world, BlockState state) {
|
||||
|
||||
Block block = state.getBlock();
|
||||
if (block instanceof TrunkShellBlock){
|
||||
@ -64,7 +67,6 @@ public class DynamicTree extends AbstractBlockBreakQueue {
|
||||
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user