improved leaves cutting

This commit is contained in:
Jottyfan 2023-02-05 21:22:08 +01:00
parent 207d201785
commit 2843712fca
10 changed files with 33 additions and 53 deletions

View File

@ -29,6 +29,18 @@ dependencies {
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// 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 {

View File

@ -9,9 +9,12 @@
loader_version=0.14.11
# Mod Properties
mod_version = 1.19.3.2
mod_version = 1.19.3.3
maven_group = de.jottyfan.minecraft
archives_base_name = quickiefabric
# Dependencies
fabric_version=0.69.1+1.19.3
# for ExtendedLeavesBlock
terraform_wood_api_version=5.0.0-beta.1

View File

@ -20,5 +20,6 @@ public class QuickieFabric implements ModInitializer {
RegistryManager.registerFeatures();
RegistryManager.registerContainer();
RegistryManager.registerLootings();
RegistryManager.registerTags();
}
}

View File

@ -1,27 +0,0 @@
package de.jottyfan.minecraft.quickiefabric.help;
/**
*
* @author jotty
*
*/
public class ClassHelper {
/**
* check if c is instance of name
*
* @param c the class
* @param name the name
* @return true or false
*/
public static final Boolean isInstanceOf(Class<?> c, String name) {
Class<?>[] a = c.getInterfaces();
for (Class<?> cl : a) {
String simpleName = cl.getSimpleName();
if (simpleName.equals(name)) {
return true;
}
}
return false;
}
}

View File

@ -42,6 +42,8 @@ import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
@ -290,4 +292,7 @@ public class RegistryManager {
|| id.equals(new Identifier("blocks/tall_grass"));
}
public final static void registerTags() {
TagKey<Item> BLOCKSTACKER = TagKey.of(RegistryKeys.ITEM, new Identifier(QUICKIEFABRIC, "blockstacker"));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"quickiefabric:blockstackereast",
"quickiefabric:blockstackersouth",
"quickiefabric:blockstackerwest",
"quickiefabric:blockstackernorth",
"quickiefabric:blockstackerup",
"quickiefabric:blockstackerdown"
]
}

View File

@ -1,25 +0,0 @@
package de.jottyfan.minecraft.quickiefabric.help;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.HashMap;
import org.junit.Test;
/**
*
* @author jotty
*
*/
public class TestClassHelper {
@Test
public void testIsInstanceOf() {
assertTrue(ClassHelper.isInstanceOf(new HashMap<String, Integer>().getClass(), "Cloneable"));
assertTrue(ClassHelper.isInstanceOf(new HashMap<String, Integer>().getClass(), "Map"));
assertTrue(ClassHelper.isInstanceOf(new HashMap<String, Integer>().getClass(), "Serializable"));
assertTrue(ClassHelper.isInstanceOf(HashMap.class, "Cloneable"));
assertTrue(ClassHelper.isInstanceOf(HashMap.class, "Map"));
assertTrue(ClassHelper.isInstanceOf(HashMap.class, "Serializable"));
}
}