mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -6,58 +6,49 @@ import net.minecraft.item.*;
|
||||
import net.minecraft.world.World;
|
||||
import powercrystals.minefactoryreloaded.api.*;
|
||||
|
||||
public class HarvestableOreBerry implements IFactoryHarvestable
|
||||
{
|
||||
public class HarvestableOreBerry implements IFactoryHarvestable {
|
||||
private Block _sourceBlock;
|
||||
private Item _berryItem;
|
||||
private int _metaOffset;
|
||||
|
||||
public HarvestableOreBerry(Block sourceBlock, Item berryItem, int metaOffset)
|
||||
{
|
||||
public HarvestableOreBerry(Block sourceBlock, Item berryItem, int metaOffset) {
|
||||
_sourceBlock = sourceBlock;
|
||||
_berryItem = berryItem;
|
||||
_metaOffset = metaOffset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getPlant ()
|
||||
{
|
||||
public Block getPlant() {
|
||||
return _sourceBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestType getHarvestType ()
|
||||
{
|
||||
public HarvestType getHarvestType() {
|
||||
return HarvestType.Column;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean breakBlock ()
|
||||
{
|
||||
public boolean breakBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeHarvested (World world, Map<String, Boolean> harvesterSettings, int x, int y, int z)
|
||||
{
|
||||
public boolean canBeHarvested(World world, Map<String, Boolean> harvesterSettings, int x, int y, int z) {
|
||||
return world.getBlockMetadata(x, y, z) >= 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops (World world, Random rand, Map<String, Boolean> harvesterSettings, int x, int y, int z)
|
||||
{
|
||||
ItemStack[] returnItems = { new ItemStack(_berryItem, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset) };
|
||||
public List<ItemStack> getDrops(
|
||||
World world, Random rand, Map<String, Boolean> harvesterSettings, int x, int y, int z) {
|
||||
ItemStack[] returnItems = {new ItemStack(_berryItem, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset)};
|
||||
return Arrays.asList(returnItems);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preHarvest (World world, int x, int y, int z)
|
||||
{
|
||||
}
|
||||
public void preHarvest(World world, int x, int y, int z) {}
|
||||
|
||||
@Override
|
||||
public void postHarvest (World world, int x, int y, int z)
|
||||
{
|
||||
public void postHarvest(World world, int x, int y, int z) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) - 4, 2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user