Fixed: Рост саженцев
- Удален WARN при добалении воздуха в креатив
This commit is contained in:
@@ -9,6 +9,7 @@ import com.reider745.api.hooks.JarEditor;
|
||||
import com.reider745.event.DispenseBehaviorOverrides;
|
||||
import com.reider745.hooks.*;
|
||||
import com.reider745.hooks.bugfix.DimensionsFix;
|
||||
import com.reider745.hooks.bugfix.SaplingFix;
|
||||
import com.reider745.network.CraftingTransactionPacket;
|
||||
import com.reider745.network.InnerCorePacket;
|
||||
|
||||
@@ -55,6 +56,7 @@ public class Main {
|
||||
|
||||
// bug fix
|
||||
loader.registerHooksInitializationForClass(DimensionsFix.class);
|
||||
loader.registerHooksInitializationForClass(SaplingFix.class);
|
||||
|
||||
loader.init(Arrays.stream(args).anyMatch("--debug-hooks"::equals));
|
||||
loader.run("cn.nukkit.Nukkit", args);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.reider745.hooks.bugfix;
|
||||
|
||||
import cn.nukkit.block.BlockSapling;
|
||||
import com.reider745.api.hooks.HookClass;
|
||||
import com.reider745.api.hooks.annotation.Hooks;
|
||||
import com.reider745.api.hooks.annotation.Inject;
|
||||
|
||||
@Hooks(className = "cn.nukkit.block.BlockSapling")
|
||||
public class SaplingFix implements HookClass {
|
||||
@Inject
|
||||
public static boolean isAged(BlockSapling self) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -72,8 +72,9 @@ public class ItemMethod {
|
||||
CustomManager manager = getCustomManager(id);
|
||||
if (manager != null)
|
||||
return manager.get(PropertiesNames.CREATIVE_CATEGORY, 1);
|
||||
Logger.warning("not get CreativeCategory " + id);
|
||||
return 0;
|
||||
if(id != 0)//Какова вообще фига?
|
||||
Logger.warning("not get CreativeCategory " + id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int getMaxStackForId(int id, int data) {
|
||||
|
||||
Reference in New Issue
Block a user