Version increment to 0.7.9 + Fixed not being able to place sugar cane
This commit is contained in:
@@ -12,7 +12,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||||
|
|
||||||
version = "0.7.8"
|
version = "0.7.9"
|
||||||
group = "refinedstorage"
|
group = "refinedstorage"
|
||||||
archivesBaseName = "refinedstorage"
|
archivesBaseName = "refinedstorage"
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import refinedstorage.proxy.CommonProxy;
|
|||||||
@Mod(modid = RefinedStorage.ID, version = RefinedStorage.VERSION)
|
@Mod(modid = RefinedStorage.ID, version = RefinedStorage.VERSION)
|
||||||
public final class RefinedStorage {
|
public final class RefinedStorage {
|
||||||
public static final String ID = "refinedstorage";
|
public static final String ID = "refinedstorage";
|
||||||
public static final String VERSION = "0.7.8";
|
public static final String VERSION = "0.7.9";
|
||||||
|
|
||||||
public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ID);
|
public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ID);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package refinedstorage.tile;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
@@ -32,35 +31,15 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
|
|||||||
|
|
||||||
public static final int BASE_SPEED = 20;
|
public static final int BASE_SPEED = 20;
|
||||||
|
|
||||||
private BasicItemHandler filter = new BasicItemHandler(1, this);
|
private BasicItemHandler filter = new BasicItemHandler(1, this) {
|
||||||
private BasicItemHandler upgrades = new BasicItemHandler(
|
|
||||||
4,
|
|
||||||
this,
|
|
||||||
new BasicItemValidator(RefinedStorageItems.UPGRADE, ItemUpgrade.TYPE_SPEED),
|
|
||||||
new BasicItemValidator(RefinedStorageItems.UPGRADE, ItemUpgrade.TYPE_CRAFTING)
|
|
||||||
);
|
|
||||||
|
|
||||||
private int compare = 0;
|
|
||||||
|
|
||||||
private CraftingTaskScheduler scheduler = new CraftingTaskScheduler();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getEnergyUsage() {
|
protected void onContentsChanged(int slot) {
|
||||||
return 1 + RefinedStorageUtils.getUpgradeEnergyUsage(upgrades);
|
super.onContentsChanged(slot);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
ItemStack stack = getStackInSlot(0);
|
||||||
public void updateMachine() {
|
|
||||||
if (ticks % RefinedStorageUtils.getSpeed(upgrades, BASE_SPEED, 4) == 0 && filter.getStackInSlot(0) != null) {
|
|
||||||
BlockPos front = pos.offset(getDirection());
|
|
||||||
IBlockState frontBlockState = worldObj.getBlockState(front);
|
|
||||||
|
|
||||||
if (!frontBlockState.getBlock().isAir(frontBlockState, worldObj, front)) {
|
if (stack != null) {
|
||||||
return;
|
Item item = stack.getItem();
|
||||||
}
|
|
||||||
|
|
||||||
Item item = filter.getStackInSlot(0).getItem();
|
|
||||||
Block block = null;
|
|
||||||
|
|
||||||
if (item instanceof ItemBlockSpecial) {
|
if (item instanceof ItemBlockSpecial) {
|
||||||
try {
|
try {
|
||||||
@@ -74,9 +53,37 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
|
|||||||
}
|
}
|
||||||
} else if (item instanceof ItemBlock) {
|
} else if (item instanceof ItemBlock) {
|
||||||
block = ((ItemBlock) item).getBlock();
|
block = ((ItemBlock) item).getBlock();
|
||||||
|
} else {
|
||||||
|
block = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
block = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private BasicItemHandler upgrades = new BasicItemHandler(
|
||||||
|
4,
|
||||||
|
this,
|
||||||
|
new BasicItemValidator(RefinedStorageItems.UPGRADE, ItemUpgrade.TYPE_SPEED),
|
||||||
|
new BasicItemValidator(RefinedStorageItems.UPGRADE, ItemUpgrade.TYPE_CRAFTING)
|
||||||
|
);
|
||||||
|
|
||||||
|
private int compare = 0;
|
||||||
|
private Block block;
|
||||||
|
|
||||||
|
private CraftingTaskScheduler scheduler = new CraftingTaskScheduler();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getEnergyUsage() {
|
||||||
|
return 1 + RefinedStorageUtils.getUpgradeEnergyUsage(upgrades);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block != null && block.canPlaceBlockAt(worldObj, front)) {
|
@Override
|
||||||
|
public void updateMachine() {
|
||||||
|
if (block != null && ticks % RefinedStorageUtils.getSpeed(upgrades, BASE_SPEED, 4) == 0) {
|
||||||
|
BlockPos front = pos.offset(getDirection());
|
||||||
|
|
||||||
|
if (worldObj.isAirBlock(front) && block.canPlaceBlockAt(worldObj, front)) {
|
||||||
ItemStack took = controller.take(filter.getStackInSlot(0), 1, compare);
|
ItemStack took = controller.take(filter.getStackInSlot(0), 1, compare);
|
||||||
|
|
||||||
if (took != null) {
|
if (took != null) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"modid": "refinedstorage",
|
"modid": "refinedstorage",
|
||||||
"name": "Refined Storage",
|
"name": "Refined Storage",
|
||||||
"description": "A Minecraft mod all about storage.",
|
"description": "A Minecraft mod all about storage.",
|
||||||
"version": "0.7.8",
|
"version": "0.7.9",
|
||||||
"mcversion": "1.9.4",
|
"mcversion": "1.9.4",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user