Add support for pulley blocks (#781)
This commit is contained in:
parent
e300eb9209
commit
0b5404c711
1 changed files with 37 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
package com.blamejared.compat.betterwithmods;
|
||||
|
||||
import betterwithmods.common.registry.PulleyStructureManager;
|
||||
import com.blamejared.mtlib.utils.BaseAction;
|
||||
import crafttweaker.CraftTweakerAPI;
|
||||
import crafttweaker.annotations.ModOnly;
|
||||
import crafttweaker.annotations.ZenRegister;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
@ZenClass("mods.betterwithmods.PulleyManager")
|
||||
@ModOnly("betterwithmods")
|
||||
@ZenRegister
|
||||
public class PulleyManager {
|
||||
|
||||
@ZenMethod
|
||||
public static void addPulleyBlock(crafttweaker.api.block.IBlockState state) {
|
||||
CraftTweakerAPI.apply(new AddPulleyBlock(CraftTweakerMC.getBlockState(state)));
|
||||
}
|
||||
|
||||
public static class AddPulleyBlock extends BaseAction {
|
||||
|
||||
private IBlockState state;
|
||||
|
||||
AddPulleyBlock(IBlockState state) {
|
||||
super("Add Pulley Block");
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
PulleyStructureManager.registerPulleyBlock(state);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue