mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 03:35:07 +00:00
Add ability for chisels to define their own chisel modes
This commit is contained in:
1 parent
aeebccf83e
commit
bef19466cf
7 files changed
+91
-17
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package com.cricketcraft.chisel.api.carving;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Implement this on chisel items which require more control over chisel modes
|
||||
* (including adding new modes).
|
||||
*/
|
||||
public interface IAdvancedChisel {
|
||||
|
||||
/**
|
||||
* Gets the next mode the button in the GUI should switch to given the
|
||||
* current mode.
|
||||
*
|
||||
* @param stack
|
||||
* The {@link ItemStack} representing the chisel
|
||||
* @param current
|
||||
* The {@link IChiselMode} that is currently active
|
||||
* @return The next {@link IChiselMode} in the loop
|
||||
*/
|
||||
public IChiselMode getNextMode(ItemStack stack, IChiselMode current);
|
||||
|
||||
/**
|
||||
* Gets an {@link IChiselMode} instance from a String name
|
||||
*
|
||||
* @param chisel
|
||||
* The {@link ItemStack} representing the chisel
|
||||
* @param name
|
||||
* The name of the {@link IChiselMode mode}
|
||||
* @return An {@link IChiselMode} that has the name {@code name}
|
||||
*/
|
||||
public IChiselMode getMode(ItemStack chisel, String name);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cricketcraft.chisel.api.carving;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IChiselMode {
|
||||
|
||||
void chiselAll(EntityPlayer player, World world, int x, int y, int z, ForgeDirection side, ICarvingVariation variation);
|
||||
|
||||
/**
|
||||
* Implemented implicitly by enums. If your IChiselMode is not an enum
|
||||
* constant, this needs to be implemented explicitly.
|
||||
*
|
||||
* @return The name of the mode.
|
||||
*/
|
||||
String name();
|
||||
}
|
||||
Reference in new issue
Block a user