-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for pulley blocks (#781)
- Loading branch information
1 parent
e300eb9
commit 0b5404c
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/main/java/com/blamejared/compat/betterwithmods/PulleyManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |