Implement Harvest Ritual
Currently only a handler for standard crops (wheat, carrots, etc) is implemented.
This commit is contained in:
parent
39015f05a6
commit
5744d19ca9
6 changed files with 309 additions and 2 deletions
|
@ -9,16 +9,18 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
|
||||
@Getter
|
||||
@EqualsAndHashCode
|
||||
@EqualsAndHashCode(exclude = { "state" })
|
||||
public class BlockStack
|
||||
{
|
||||
private final Block block;
|
||||
private final int meta;
|
||||
private final IBlockState state;
|
||||
|
||||
public BlockStack(Block block, int meta)
|
||||
{
|
||||
this.block = block;
|
||||
this.meta = meta;
|
||||
this.state = block.getStateFromMeta(meta);
|
||||
}
|
||||
|
||||
public BlockStack(Block block)
|
||||
|
@ -35,6 +37,6 @@ public class BlockStack
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return GameData.getBlockRegistry().getNameForObject(block) + ":" + meta;
|
||||
return GameData.getBlockRegistry().getNameForObject(getBlock()) + ":" + getMeta();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue