Fixed structure features and code style

This commit is contained in:
paulevsGitch 2021-07-10 16:07:44 +03:00
parent d431f2555c
commit 5a9365e2bb
153 changed files with 2304 additions and 2459 deletions

View file

@ -1,10 +1,5 @@
package ru.bclib.integration;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import net.fabricmc.fabric.api.tag.TagRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.core.Registry;
@ -25,6 +20,11 @@ import net.minecraft.world.level.levelgen.feature.Feature;
import ru.bclib.BCLib;
import ru.bclib.world.features.BCLFeature;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public abstract class ModIntegration {
private final String modID;
@ -45,7 +45,7 @@ public abstract class ModIntegration {
public Item getItem(String name) {
return Registry.ITEM.get(getID(name));
}
public BlockState getDefaultState(String name) {
return getBlock(name).defaultBlockState();
}
@ -178,7 +178,7 @@ public abstract class ModIntegration {
public Object newInstance(Class<?> cl, Object... args) {
if (cl != null) {
for (Constructor<?> constructor: cl.getConstructors()) {
for (Constructor<?> constructor : cl.getConstructors()) {
if (constructor.getParameterCount() == args.length) {
try {
return constructor.newInstance(args);