removed dependency to terrestria which caused a crash on missing the mod
This commit is contained in:
12
build.gradle
12
build.gradle
@ -32,18 +32,6 @@ dependencies {
|
|||||||
|
|
||||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||||
// You may need to force-disable transitiveness on them.
|
// You may need to force-disable transitiveness on them.
|
||||||
|
|
||||||
// for special leaves blocks like ExtendedLeavesBlock
|
|
||||||
modImplementation "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraform_wood_api_version}"
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
name = 'TerraformersMC'
|
|
||||||
url = 'https://maven.terraformersmc.com/'
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url = 'https://maven.minecraftforge.net/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
@ -9,12 +9,9 @@
|
|||||||
loader_version=0.15.1
|
loader_version=0.15.1
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.20.4.7
|
mod_version = 1.20.4.8
|
||||||
maven_group = de.jottyfan.minecraft
|
maven_group = de.jottyfan.minecraft
|
||||||
archives_base_name = quickiefabric
|
archives_base_name = quickiefabric
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.91.2+1.20.4
|
fabric_version=0.91.2+1.20.4
|
||||||
|
|
||||||
# for ExtendedLeavesBlock
|
|
||||||
terraform_wood_api_version=9.0.0-alpha.3
|
|
||||||
|
@ -3,7 +3,6 @@ package de.jottyfan.minecraft.quickiefabric.tools;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.terraformersmc.terraform.leaves.block.ExtendedLeavesBlock;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
@ -43,7 +42,15 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
|||||||
*/
|
*/
|
||||||
private boolean isLeavesBlock(BlockState blockIn) {
|
private boolean isLeavesBlock(BlockState blockIn) {
|
||||||
boolean vanillaLeaves = blockIn.getBlock() instanceof LeavesBlock;
|
boolean vanillaLeaves = blockIn.getBlock() instanceof LeavesBlock;
|
||||||
boolean terrestriaLeaves = blockIn.getBlock() instanceof ExtendedLeavesBlock;
|
boolean terrestriaLeaves = false;
|
||||||
|
try {
|
||||||
|
Class<?> extendedLeavesBlock = Class.forName("com.terraformersmc.terraform.leaves.block.ExtendedLeavesBlock");
|
||||||
|
terrestriaLeaves = extendedLeavesBlock.isInstance(blockIn.getBlock());
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
// no terrestria mod available, so ignore this
|
||||||
|
// using this approach instead of the instanceof functionality, we don't need to refer to terrestria
|
||||||
|
// and omit a crash on installations that do not have or want terrestria available
|
||||||
|
}
|
||||||
boolean blockTagLeaves = blockIn.isIn(BlockTags.LEAVES);
|
boolean blockTagLeaves = blockIn.isIn(BlockTags.LEAVES);
|
||||||
return vanillaLeaves || terrestriaLeaves || blockTagLeaves;
|
return vanillaLeaves || terrestriaLeaves || blockTagLeaves;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"placement": [
|
"placement": [
|
||||||
{
|
{
|
||||||
"type": "minecraft:count",
|
"type": "minecraft:count",
|
||||||
"count": 25
|
"count": 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "minecraft:in_square"
|
"type": "minecraft:in_square"
|
||||||
|
Reference in New Issue
Block a user