mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +01:00
Squashed commit of the following:
commit e398793b887986e730cf6b3c7a9c96861d186591 Author: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu Jul 25 11:00:21 2024 +0200 Remove duplicate line in buildscript commit e6a1ebd40332ba649fab968841d7b88cdec51553 Merge: acbe5102c283998711
Author: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu Jul 25 10:48:13 2024 +0200 Merge branch 'mc1.18/dev' into pr/6403 commit acbe5102cf4757f75adeb21ebff8b0649e74e2a5 Merge:4d2c35b11
1038b76d3
Author: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu Jul 18 10:27:51 2024 +0200 Merge branch 'mc1.18/dev' into pr/6403 commit4d2c35b11b
Author: attackeight <attackeight@gmail.com> Date: Tue Apr 23 15:39:37 2024 -0400 Re-Activate Dynamic Trees Compat
This commit is contained in:
parent
283998711d
commit
b90e11c120
@ -195,9 +195,12 @@ dependencies {
|
|||||||
runtimeOnly fg.deobf("org.squiddev:cc-tweaked-${cc_tweaked_minecraft_version}:${cc_tweaked_version}")
|
runtimeOnly fg.deobf("org.squiddev:cc-tweaked-${cc_tweaked_minecraft_version}:${cc_tweaked_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:ic2-classic-242942:4563059")
|
||||||
// implementation fg.deobf("curse.maven:druidcraft-340991:3101903")
|
// 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.arl:AutoRegLib:1.4-35.69")
|
||||||
// runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
// runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
||||||
// runtimeOnly fg.deobf("curse.maven:mantle-74924:4509007")
|
// runtimeOnly fg.deobf("curse.maven:mantle-74924:4509007")
|
||||||
|
@ -33,6 +33,10 @@ cc_tweaked_enable = true
|
|||||||
cc_tweaked_minecraft_version = 1.18.2
|
cc_tweaked_minecraft_version = 1.18.2
|
||||||
cc_tweaked_version = 1.100.10
|
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
|
# curseforge information
|
||||||
projectId = 328085
|
projectId = 328085
|
||||||
curse_type = beta
|
curse_type = beta
|
||||||
|
@ -4,31 +4,35 @@ import java.util.function.BiConsumer;
|
|||||||
|
|
||||||
import javax.annotation.Nullable;
|
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 com.simibubi.create.foundation.utility.AbstractBlockBreakQueue;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.Block;
|
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 {
|
public class DynamicTree extends AbstractBlockBreakQueue {
|
||||||
|
|
||||||
// private BlockPos startCutPos;
|
private BlockPos startCutPos;
|
||||||
|
|
||||||
public DynamicTree(BlockPos startCutPos) {
|
public DynamicTree(BlockPos startCutPos) {
|
||||||
// this.startCutPos = startCutPos;
|
this.startCutPos = startCutPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDynamicBranch(Block block) {
|
public static boolean isDynamicBranch(Block block) {
|
||||||
return false; // TreeHelper.isBranch(block) || block instanceof TrunkShellBlock;
|
return TreeHelper.isBranch(block) || block instanceof TrunkShellBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroyBlocks(Level world, ItemStack toDamage, @Nullable Player playerEntity, BiConsumer<BlockPos, ItemStack> drop) {
|
public void destroyBlocks(Level world, ItemStack toDamage, @Nullable Player playerEntity, BiConsumer<BlockPos, ItemStack> drop) {
|
||||||
/*
|
|
||||||
|
|
||||||
BranchBlock start = TreeHelper.getBranch(world.getBlockState(startCutPos));
|
BranchBlock start = TreeHelper.getBranch(world.getBlockState(startCutPos));
|
||||||
if (start == null) //if start is null, it was not a branch
|
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
|
// Play and render block break sound and particles
|
||||||
world.levelEvent(null, 2001, startCutPos, Block.getId(world.getBlockState(startCutPos)));
|
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);
|
BranchDestructionData data = start.destroyBranchFromNode(world, startCutPos, Direction.DOWN, false, playerEntity);
|
||||||
|
|
||||||
// Feed all the tree drops to drop bi-consumer
|
// Feed all the tree drops to drop bi-consumer
|
||||||
data.leavesDrops.forEach(stackPos -> drop.accept(stackPos.pos.offset(startCutPos), stackPos.stack));
|
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();
|
Block block = state.getBlock();
|
||||||
if (block instanceof TrunkShellBlock){
|
if (block instanceof TrunkShellBlock){
|
||||||
@ -64,7 +67,6 @@ public class DynamicTree extends AbstractBlockBreakQueue {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user