Port to 1.9.4

This commit is contained in:
Raoul Van den Berge
2016-05-23 21:36:32 +02:00
parent 136dc254e5
commit 0fab032820
39 changed files with 137 additions and 137 deletions

View File

@@ -7,20 +7,20 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
version = "0.6.11" version = "0.7"
group = "refinedstorage" group = "refinedstorage"
archivesBaseName = "refinedstorage" archivesBaseName = "refinedstorage"
minecraft { minecraft {
version = "1.9-12.16.1.1907" version = "1.9.4-12.17.0.1910-1.9.4"
runDir = "run" runDir = "run"
useDepAts = true useDepAts = true
mappings = "snapshot_20160312" mappings = "snapshot_20160518"
} }
repositories { repositories {
@@ -30,7 +30,7 @@ repositories {
} }
dependencies { dependencies {
deobfCompile "mezz.jei:jei_1.9:3.3.+" deobfCompile "mezz.jei:jei_1.9.4:3.4.+"
} }
processResources { processResources {

View File

@@ -23,10 +23,11 @@ public class TileEnergyHandler extends TileEntity implements IEnergyReceiver, IE
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt); super.writeToNBT(nbt);
storage.writeToNBT(nbt); storage.writeToNBT(nbt);
return nbt;
} }
/* IEnergyConnection */ /* IEnergyConnection */

View File

@@ -29,7 +29,7 @@ public abstract class BlockBase extends Block {
private String name; private String name;
public BlockBase(String name) { public BlockBase(String name) {
super(Material.rock); super(Material.ROCK);
this.name = name; this.name = name;

View File

@@ -50,8 +50,8 @@ public abstract class BlockMachine extends BlockBase {
} }
@Override @Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) { public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block) {
super.onNeighborBlockChange(world, pos, state, neighborBlock); super.neighborChanged(state, world, pos, block);
if (!world.isRemote) { if (!world.isRemote) {
((TileMachine) world.getTileEntity(pos)).searchController(world); ((TileMachine) world.getTileEntity(pos)).searchController(world);

View File

@@ -53,7 +53,7 @@ public abstract class ContainerBase extends Container {
} }
@Override @Override
public ItemStack func_184996_a(int id, int clickedButton, ClickType clickType, EntityPlayer player) { public ItemStack slotClick(int id, int clickedButton, ClickType clickType, EntityPlayer player) {
Slot slot = id >= 0 ? getSlot(id) : null; Slot slot = id >= 0 ? getSlot(id) : null;
if (slot instanceof SlotSpecimen) { if (slot instanceof SlotSpecimen) {
@@ -111,7 +111,7 @@ public abstract class ContainerBase extends Container {
return null; return null;
} }
return super.func_184996_a(id, clickedButton, clickType, player); return super.slotClick(id, clickedButton, clickType, player);
} }
@Override @Override

View File

@@ -91,8 +91,8 @@ public class ContainerGrid extends ContainerBase {
public void detectAndSendChanges() { public void detectAndSendChanges() {
for (int i = 0; i < inventorySlots.size(); ++i) { for (int i = 0; i < inventorySlots.size(); ++i) {
if (inventorySlots.get(i) instanceof SlotGridCrafting || inventorySlots.get(i) == craftingResultSlot) { if (inventorySlots.get(i) instanceof SlotGridCrafting || inventorySlots.get(i) == craftingResultSlot) {
for (int j = 0; j < crafters.size(); ++j) { for (int j = 0; j < listeners.size(); ++j) {
crafters.get(j).sendSlotContents(this, i, inventorySlots.get(i).getStack()); listeners.get(j).sendSlotContents(this, i, inventorySlots.get(i).getStack());
} }
} else { } else {
ItemStack current = inventorySlots.get(i).getStack(); ItemStack current = inventorySlots.get(i).getStack();
@@ -103,8 +103,8 @@ public class ContainerGrid extends ContainerBase {
inventoryItemStacks.set(i, cached); inventoryItemStacks.set(i, cached);
for (int j = 0; j < crafters.size(); ++j) { for (int j = 0; j < listeners.size(); ++j) {
crafters.get(j).sendSlotContents(this, i, cached); listeners.get(j).sendSlotContents(this, i, cached);
} }
} }
} }
@@ -121,7 +121,7 @@ public class ContainerGrid extends ContainerBase {
} }
@Override @Override
public ItemStack func_184996_a(int id, int clickedButton, ClickType clickType, EntityPlayer player) { public ItemStack slotClick(int id, int clickedButton, ClickType clickType, EntityPlayer player) {
Slot slot = id >= 0 ? getSlot(id) : null; Slot slot = id >= 0 ? getSlot(id) : null;
if (player.worldObj.isRemote && slot instanceof SlotGridCraftingResult && grid.getType() == EnumGridType.CRAFTING && slot.getHasStack()) { if (player.worldObj.isRemote && slot instanceof SlotGridCraftingResult && grid.getType() == EnumGridType.CRAFTING && slot.getHasStack()) {
@@ -132,7 +132,7 @@ public class ContainerGrid extends ContainerBase {
} }
} }
return super.func_184996_a(id, clickedButton, clickType, player); return super.slotClick(id, clickedButton, clickType, player);
} }
@Override @Override

View File

@@ -3,10 +3,10 @@ package refinedstorage.gui;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import refinedstorage.RefinedStorage; import refinedstorage.RefinedStorage;
import refinedstorage.gui.sidebutton.SideButton; import refinedstorage.gui.sidebutton.SideButton;
@@ -227,7 +227,7 @@ public abstract class GuiBase extends GuiContainer {
} }
public String t(String name, Object... format) { public String t(String name, Object... format) {
return I18n.translateToLocalFormatted(name, format); return I18n.format(name, format);
} }
public abstract void init(int x, int y); public abstract void init(int x, int y);

View File

@@ -352,7 +352,7 @@ public class GuiGrid extends GuiBase {
} }
if (playClickSound) { if (playClickSound) {
mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.ui_button_click, 1.0F)); mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));
} }
} }

View File

@@ -66,7 +66,7 @@ public class GuiProcessingPatternEncoder extends GuiBase {
if (isHoveringOverCreatePattern(mouseX - guiLeft, mouseY - guiTop)) { if (isHoveringOverCreatePattern(mouseX - guiLeft, mouseY - guiTop)) {
RefinedStorage.NETWORK.sendToServer(new MessageGridPatternCreate(ppEncoder.getPos().getX(), ppEncoder.getPos().getY(), ppEncoder.getPos().getZ())); RefinedStorage.NETWORK.sendToServer(new MessageGridPatternCreate(ppEncoder.getPos().getX(), ppEncoder.getPos().getY(), ppEncoder.getPos().getZ()));
mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.ui_button_click, 1.0F)); mc.getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));
} }
} }
} }

View File

@@ -22,7 +22,7 @@ public class SideButtonDetectorMode extends SideButton {
@Override @Override
public void draw(GuiBase gui, int x, int y) { public void draw(GuiBase gui, int x, int y) {
gui.drawItem(x, y, new ItemStack(Items.redstone, 1)); gui.drawItem(x, y, new ItemStack(Items.REDSTONE, 1));
} }
@Override @Override

View File

@@ -1,9 +1,9 @@
package refinedstorage.item; package refinedstorage.item;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World; import net.minecraft.world.World;
import refinedstorage.RefinedStorageBlocks; import refinedstorage.RefinedStorageBlocks;
import refinedstorage.block.EnumStorageType; import refinedstorage.block.EnumStorageType;
@@ -25,9 +25,9 @@ public class ItemBlockStorage extends ItemBlockBase {
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(TileStorage.NBT_STORAGE); NBTTagCompound tag = stack.getTagCompound().getCompoundTag(TileStorage.NBT_STORAGE);
if (type == EnumStorageType.TYPE_CREATIVE) { if (type == EnumStorageType.TYPE_CREATIVE) {
list.add(String.format(I18n.translateToLocal("misc.refinedstorage:storage.stored"), NBTStorage.getStored(tag))); list.add(String.format(I18n.format("misc.refinedstorage:storage.stored"), NBTStorage.getStored(tag)));
} else { } else {
list.add(String.format(I18n.translateToLocal("misc.refinedstorage:storage.stored_capacity"), NBTStorage.getStored(tag), type.getCapacity())); list.add(String.format(I18n.format("misc.refinedstorage:storage.stored_capacity"), NBTStorage.getStored(tag), type.getCapacity()));
} }
} }
} }

View File

@@ -1,5 +1,6 @@
package refinedstorage.item; package refinedstorage.item;
import net.minecraft.client.resources.I18n;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.InventoryHelper; import net.minecraft.inventory.InventoryHelper;
@@ -8,7 +9,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World; import net.minecraft.world.World;
import refinedstorage.RefinedStorageItems; import refinedstorage.RefinedStorageItems;
import refinedstorage.block.EnumStorageType; import refinedstorage.block.EnumStorageType;
@@ -43,9 +43,9 @@ public class ItemStorageDisk extends ItemBase {
int capacity = EnumStorageType.getById(disk.getItemDamage()).getCapacity(); int capacity = EnumStorageType.getById(disk.getItemDamage()).getCapacity();
if (capacity == -1) { if (capacity == -1) {
list.add(String.format(I18n.translateToLocal("misc.refinedstorage:storage.stored"), NBTStorage.getStored(disk.getTagCompound()))); list.add(String.format(I18n.format("misc.refinedstorage:storage.stored"), NBTStorage.getStored(disk.getTagCompound())));
} else { } else {
list.add(String.format(I18n.translateToLocal("misc.refinedstorage:storage.stored_capacity"), NBTStorage.getStored(disk.getTagCompound()), capacity)); list.add(String.format(I18n.format("misc.refinedstorage:storage.stored_capacity"), NBTStorage.getStored(disk.getTagCompound()), capacity));
} }
} }

View File

@@ -2,6 +2,7 @@ package refinedstorage.item;
import cofh.api.energy.ItemEnergyContainer; import cofh.api.energy.ItemEnergyContainer;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@@ -13,7 +14,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World; import net.minecraft.world.World;
import refinedstorage.RefinedStorage; import refinedstorage.RefinedStorage;
import refinedstorage.RefinedStorageBlocks; import refinedstorage.RefinedStorageBlocks;
@@ -94,13 +94,13 @@ public class ItemWirelessGrid extends ItemEnergyContainer {
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) { public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
if (stack.getItemDamage() != TYPE_CREATIVE) { if (stack.getItemDamage() != TYPE_CREATIVE) {
list.add(I18n.translateToLocalFormatted("misc.refinedstorage:energy_stored", getEnergyStored(stack), getMaxEnergyStored(stack))); list.add(I18n.format("misc.refinedstorage:energy_stored", getEnergyStored(stack), getMaxEnergyStored(stack)));
} }
if (hasValidNBT(stack)) { if (hasValidNBT(stack)) {
list.add(I18n.translateToLocalFormatted("misc.refinedstorage:wireless_grid.tooltip.0", getX(stack))); list.add(I18n.format("misc.refinedstorage:wireless_grid.tooltip.0", getX(stack)));
list.add(I18n.translateToLocalFormatted("misc.refinedstorage:wireless_grid.tooltip.1", getY(stack))); list.add(I18n.format("misc.refinedstorage:wireless_grid.tooltip.1", getY(stack)));
list.add(I18n.translateToLocalFormatted("misc.refinedstorage:wireless_grid.tooltip.2", getZ(stack))); list.add(I18n.format("misc.refinedstorage:wireless_grid.tooltip.2", getZ(stack)));
} }
} }
@@ -140,10 +140,10 @@ public class ItemWirelessGrid extends ItemEnergyContainer {
if (((TileController) tile).onOpenWirelessGrid(player, hand)) { if (((TileController) tile).onOpenWirelessGrid(player, hand)) {
return new ActionResult(EnumActionResult.SUCCESS, stack); return new ActionResult(EnumActionResult.SUCCESS, stack);
} else { } else {
player.addChatComponentMessage(new TextComponentString(I18n.translateToLocal("misc.refinedstorage:wireless_grid.out_of_range"))); player.addChatComponentMessage(new TextComponentString(I18n.format("misc.refinedstorage:wireless_grid.out_of_range")));
} }
} else { } else {
player.addChatComponentMessage(new TextComponentString(I18n.translateToLocal("misc.refinedstorage:wireless_grid.not_found"))); player.addChatComponentMessage(new TextComponentString(I18n.format("misc.refinedstorage:wireless_grid.not_found")));
} }
} }

View File

@@ -7,9 +7,9 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.recipe.IRecipeCategory; import mezz.jei.api.recipe.IRecipeCategory;
import mezz.jei.api.recipe.IRecipeWrapper; import mezz.jei.api.recipe.IRecipeWrapper;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
public class SoldererRecipeCategory implements IRecipeCategory { public class SoldererRecipeCategory implements IRecipeCategory {
public static final String ID = "refinedstorage.solderer"; public static final String ID = "refinedstorage.solderer";
@@ -27,7 +27,7 @@ public class SoldererRecipeCategory implements IRecipeCategory {
@Override @Override
public String getTitle() { public String getTitle() {
return I18n.translateToLocal("gui.refinedstorage:solderer"); return I18n.format("gui.refinedstorage:solderer");
} }
@Override @Override

View File

@@ -10,7 +10,7 @@ public abstract class MessageHandlerPlayerToServer<T extends IMessage> implement
public IMessage onMessage(final T message, MessageContext context) { public IMessage onMessage(final T message, MessageContext context) {
final EntityPlayerMP player = context.getServerHandler().playerEntity; final EntityPlayerMP player = context.getServerHandler().playerEntity;
player.getServerForPlayer().addScheduledTask(new Runnable() { player.getServerWorld().addScheduledTask(new Runnable() {
@Override @Override
public void run() { public void run() {
handle(message, player); handle(message, player);

View File

@@ -121,14 +121,14 @@ public class CommonProxy {
SoldererRegistry.addRecipe(new SoldererRecipeProcessor(ItemProcessor.TYPE_ADVANCED)); SoldererRegistry.addRecipe(new SoldererRecipeProcessor(ItemProcessor.TYPE_ADVANCED));
// Silicon // Silicon
GameRegistry.addSmelting(Items.quartz, new ItemStack(RefinedStorageItems.SILICON), 0.5f); GameRegistry.addSmelting(Items.QUARTZ, new ItemStack(RefinedStorageItems.SILICON), 0.5f);
// Quartz Enriched Iron // Quartz Enriched Iron
GameRegistry.addRecipe(new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON, 4), GameRegistry.addRecipe(new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON, 4),
"II", "II",
"IQ", "IQ",
'I', new ItemStack(Items.iron_ingot), 'I', new ItemStack(Items.IRON_INGOT),
'Q', new ItemStack(Items.quartz) 'Q', new ItemStack(Items.QUARTZ)
); );
// Machine Casing // Machine Casing
@@ -142,13 +142,13 @@ public class CommonProxy {
// Construction Core // Construction Core
GameRegistry.addShapelessRecipe(new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION), GameRegistry.addShapelessRecipe(new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC), new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC),
new ItemStack(Items.glowstone_dust) new ItemStack(Items.GLOWSTONE_DUST)
); );
// Destruction Core // Destruction Core
GameRegistry.addShapelessRecipe(new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION), GameRegistry.addShapelessRecipe(new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC), new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC),
new ItemStack(Items.quartz) new ItemStack(Items.QUARTZ)
); );
// Relay // Relay
@@ -163,9 +163,9 @@ public class CommonProxy {
"EDE", "EDE",
"SRS", "SRS",
"ESE", "ESE",
'D', new ItemStack(Items.diamond), 'D', new ItemStack(Items.DIAMOND),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'S', new ItemStack(RefinedStorageItems.SILICON) 'S', new ItemStack(RefinedStorageItems.SILICON)
); );
@@ -175,7 +175,7 @@ public class CommonProxy {
"E E", "E E",
"ESE", "ESE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'S', new ItemStack(Blocks.sticky_piston) 'S', new ItemStack(Blocks.STICKY_PISTON)
); );
// Disk Drive // Disk Drive
@@ -187,8 +187,8 @@ public class CommonProxy {
"GRG", "GRG",
"EEE", "EEE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'R', new ItemStack(Items.redstone) 'R', new ItemStack(Items.REDSTONE)
); );
// Wireless Transmitter // Wireless Transmitter
@@ -198,7 +198,7 @@ public class CommonProxy {
"EAE", "EAE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'A', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED), 'A', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
'P', new ItemStack(Items.ender_pearl), 'P', new ItemStack(Items.ENDER_PEARL),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING) 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING)
); );
@@ -225,7 +225,7 @@ public class CommonProxy {
"EPE", "EPE",
"EAE", "EAE",
"EEE", "EEE",
'P', new ItemStack(Items.ender_pearl), 'P', new ItemStack(Items.ENDER_PEARL),
'A', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED), 'A', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON) 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON)
); );
@@ -250,8 +250,8 @@ public class CommonProxy {
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
'P', new ItemStack(RefinedStorageItems.PATTERN), 'P', new ItemStack(RefinedStorageItems.PATTERN),
'C', new ItemStack(Blocks.crafting_table), 'C', new ItemStack(Blocks.CRAFTING_TABLE),
'F', new ItemStack(Blocks.furnace) 'F', new ItemStack(Blocks.FURNACE)
); );
// External Storage // External Storage
@@ -260,7 +260,7 @@ public class CommonProxy {
"HMH", "HMH",
"EPE", "EPE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'H', new ItemStack(Blocks.chest), 'H', new ItemStack(Blocks.CHEST),
'C', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION), 'C', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
'D', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION), 'D', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
@@ -288,7 +288,7 @@ public class CommonProxy {
"EIE", "EIE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'D', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION), 'D', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
'I', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED) 'I', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
); );
@@ -300,7 +300,7 @@ public class CommonProxy {
"EIE", "EIE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'C', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION), 'C', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
'I', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED) 'I', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
); );
@@ -311,8 +311,8 @@ public class CommonProxy {
"RMR", "RMR",
"EPE", "EPE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'C', new ItemStack(Items.comparator), 'C', new ItemStack(Items.COMPARATOR),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED) 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
); );
@@ -322,17 +322,17 @@ public class CommonProxy {
"EPE", "EPE",
"SRS", "SRS",
"ESE", "ESE",
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'P', new ItemStack(RefinedStorageItems.SILICON), 'P', new ItemStack(RefinedStorageItems.SILICON),
'S', new ItemStack(Blocks.glass) 'S', new ItemStack(Blocks.GLASS)
); );
GameRegistry.addRecipe(new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K), GameRegistry.addRecipe(new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K),
"EPE", "EPE",
"SRS", "SRS",
"ESE", "ESE",
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC), 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC),
'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_1K) 'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_1K)
@@ -342,7 +342,7 @@ public class CommonProxy {
"EPE", "EPE",
"SRS", "SRS",
"ESE", "ESE",
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED), 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED),
'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K) 'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K)
@@ -352,7 +352,7 @@ public class CommonProxy {
"EPE", "EPE",
"SRS", "SRS",
"ESE", "ESE",
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED), 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_16K) 'S', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, ItemStoragePart.TYPE_16K)
@@ -363,8 +363,8 @@ public class CommonProxy {
"GRG", "GRG",
"R R", "R R",
"EEE", "EEE",
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON) 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON)
); );
@@ -376,8 +376,8 @@ public class CommonProxy {
"GRG", "GRG",
"RPR", "RPR",
"EEE", "EEE",
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'P', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, type), 'P', new ItemStack(RefinedStorageItems.STORAGE_PART, 1, type),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON) 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON)
); );
@@ -393,8 +393,8 @@ public class CommonProxy {
"GRG", "GRG",
"RGR", "RGR",
"EEE", "EEE",
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'R', new ItemStack(Items.redstone), 'R', new ItemStack(Items.REDSTONE),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON) 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON)
); );
@@ -403,7 +403,7 @@ public class CommonProxy {
"EGE", "EGE",
"EPE", "EPE",
"EGE", "EGE",
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED), 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED),
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON) 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON)
); );
@@ -425,7 +425,7 @@ public class CommonProxy {
"EPE", "EPE",
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON), 'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING), 'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
'G', new ItemStack(Blocks.glass), 'G', new ItemStack(Blocks.GLASS),
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED) 'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
); );

View File

@@ -5,7 +5,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager; import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
@@ -58,10 +57,10 @@ public abstract class TileBase extends TileEntity implements ITickable {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_DIRECTION, direction.ordinal()); nbt.setInteger(NBT_DIRECTION, direction.ordinal());
return super.writeToNBT(nbt);
} }
public void writeToDescriptionPacketNBT(NBTTagCompound tag) { public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
@@ -73,7 +72,7 @@ public abstract class TileBase extends TileEntity implements ITickable {
} }
@Override @Override
public Packet getDescriptionPacket() { public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound nbt = new NBTTagCompound(); NBTTagCompound nbt = new NBTTagCompound();
writeToDescriptionPacketNBT(nbt); writeToDescriptionPacketNBT(nbt);

View File

@@ -57,7 +57,7 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
scheduler.resetSchedule(); scheduler.resetSchedule();
worldObj.setBlockState(front, block.getStateFromMeta(took.getItemDamage()), 1 | 2); worldObj.setBlockState(front, block.getStateFromMeta(took.getItemDamage()), 1 | 2);
// From ItemBlock.onItemUse // From ItemBlock.onItemUse
SoundType blockSound = block.getStepSound(); SoundType blockSound = block.getSoundType();
worldObj.playSound(null, front, blockSound.getPlaceSound(), SoundCategory.BLOCKS, (blockSound.getVolume() + 1.0F) / 2.0F, blockSound.getPitch() * 0.8F); worldObj.playSound(null, front, blockSound.getPlaceSound(), SoundCategory.BLOCKS, (blockSound.getVolume() + 1.0F) / 2.0F, blockSound.getPitch() * 0.8F);
} else if (RefinedStorageUtils.hasUpgrade(upgrades, ItemUpgrade.TYPE_CRAFTING)) { } else if (RefinedStorageUtils.hasUpgrade(upgrades, ItemUpgrade.TYPE_CRAFTING)) {
ItemStack craft = filter.getStackInSlot(0); ItemStack craft = filter.getStackInSlot(0);
@@ -97,15 +97,15 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
RefinedStorageUtils.saveItems(filter, 0, nbt); RefinedStorageUtils.saveItems(filter, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
scheduler.writeToNBT(nbt); scheduler.writeToNBT(nbt);
return nbt;
} }
@Override @Override

View File

@@ -526,9 +526,7 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
energy.writeToNBT(nbt); energy.writeToNBT(nbt);
nbt.setInteger(RedstoneMode.NBT, redstoneMode.id); nbt.setInteger(RedstoneMode.NBT, redstoneMode.id);
@@ -542,6 +540,8 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
} }
nbt.setTag(NBT_CRAFTING_TASKS, list); nbt.setTag(NBT_CRAFTING_TASKS, list);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -59,7 +59,7 @@ public class TileDestructor extends TileMachine implements ICompareConfig, IMode
if (ModeFilter.respectsMode(filters, this, compare, new ItemStack(frontBlock, 1, frontBlock.getMetaFromState(frontBlockState)))) { if (ModeFilter.respectsMode(filters, this, compare, new ItemStack(frontBlock, 1, frontBlock.getMetaFromState(frontBlockState)))) {
List<ItemStack> drops = frontBlock.getDrops(worldObj, front, frontBlockState, 0); List<ItemStack> drops = frontBlock.getDrops(worldObj, front, frontBlockState, 0);
worldObj.playAuxSFXAtEntity(null, 2001, front, Block.getStateId(frontBlockState)); worldObj.playEvent(null, 2001, front, Block.getStateId(frontBlockState));
worldObj.setBlockToAir(front); worldObj.setBlockToAir(front);
for (ItemStack drop : drops) { for (ItemStack drop : drops) {
@@ -116,14 +116,14 @@ public class TileDestructor extends TileMachine implements ICompareConfig, IMode
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
RefinedStorageUtils.saveItems(filters, 0, nbt); RefinedStorageUtils.saveItems(filters, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -155,14 +155,14 @@ public class TileDetector extends TileMachine implements ICompareConfig {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
nbt.setInteger(NBT_AMOUNT, amount); nbt.setInteger(NBT_AMOUNT, amount);
RefinedStorageUtils.saveItems(filter, 0, nbt); RefinedStorageUtils.saveItems(filter, 0, nbt);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -105,15 +105,15 @@ public class TileDiskDrive extends TileMachine implements IStorageProvider, ISto
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(disks, 0, nbt); RefinedStorageUtils.saveItems(disks, 0, nbt);
RefinedStorageUtils.saveItems(filters, 1, nbt); RefinedStorageUtils.saveItems(filters, 1, nbt);
nbt.setInteger(NBT_PRIORITY, priority); nbt.setInteger(NBT_PRIORITY, priority);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -95,15 +95,15 @@ public class TileExporter extends TileMachine implements ICompareConfig {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
RefinedStorageUtils.saveItems(filters, 0, nbt); RefinedStorageUtils.saveItems(filters, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
scheduler.writeToNBT(nbt); scheduler.writeToNBT(nbt);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -222,14 +222,14 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(filters, 0, nbt); RefinedStorageUtils.saveItems(filters, 0, nbt);
nbt.setInteger(NBT_PRIORITY, priority); nbt.setInteger(NBT_PRIORITY, priority);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -104,14 +104,14 @@ public class TileImporter extends TileMachine implements ICompareConfig, IModeCo
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
RefinedStorageUtils.saveItems(filters, 0, nbt); RefinedStorageUtils.saveItems(filters, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -120,13 +120,13 @@ public class TileInterface extends TileMachine implements ICompareConfig {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(items, 0, nbt); RefinedStorageUtils.saveItems(items, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
return super.writeToNBT(nbt);
} }

View File

@@ -150,10 +150,10 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger(RedstoneMode.NBT, redstoneMode.id); nbt.setInteger(RedstoneMode.NBT, redstoneMode.id);
return super.writeToNBT(nbt);
} }
public void writeToDescriptionPacketNBT(NBTTagCompound tag) { public void writeToDescriptionPacketNBT(NBTTagCompound tag) {

View File

@@ -87,15 +87,15 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(filters, 0, nbt); RefinedStorageUtils.saveItems(filters, 0, nbt);
nbt.setInteger(NBT_PRIORITY, priority); nbt.setInteger(NBT_PRIORITY, priority);
nbt.setTag(NBT_STORAGE, storageTag); nbt.setTag(NBT_STORAGE, storageTag);
nbt.setInteger(NBT_COMPARE, compare); nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode); nbt.setInteger(NBT_MODE, mode);
return super.writeToNBT(nbt);
} }
public EnumStorageType getType() { public EnumStorageType getType() {

View File

@@ -35,10 +35,10 @@ public class TileWirelessTransmitter extends TileMachine {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(upgrades, 0, nbt); RefinedStorageUtils.saveItems(upgrades, 0, nbt);
return super.writeToNBT(nbt);
} }
public int getRange() { public int getRange() {

View File

@@ -63,11 +63,11 @@ public class TileCrafter extends TileMachine {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(patterns, 0, nbt); RefinedStorageUtils.saveItems(patterns, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
return super.writeToNBT(nbt);
} }
public int getSpeed() { public int getSpeed() {

View File

@@ -18,11 +18,11 @@ public class TileProcessingPatternEncoder extends TileBase {
private BasicItemHandler configuration = new BasicItemHandler(9 * 2, this); private BasicItemHandler configuration = new BasicItemHandler(9 * 2, this);
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(patterns, 0, nbt); RefinedStorageUtils.saveItems(patterns, 0, nbt);
RefinedStorageUtils.saveItems(configuration, 1, nbt); RefinedStorageUtils.saveItems(configuration, 1, nbt);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -119,7 +119,7 @@ public class TileGrid extends TileMachine implements IGrid {
public void onCrafted(ContainerGrid container) { public void onCrafted(ContainerGrid container) {
if (!worldObj.isRemote) { if (!worldObj.isRemote) {
ItemStack[] remainder = CraftingManager.getInstance().func_180303_b(matrix, worldObj); ItemStack[] remainder = CraftingManager.getInstance().getRemainingItems(matrix, worldObj);
for (int i = 0; i < matrix.getSizeInventory(); ++i) { for (int i = 0; i < matrix.getSizeInventory(); ++i) {
if (remainder[i] != null) { if (remainder[i] != null) {
@@ -313,15 +313,15 @@ public class TileGrid extends TileMachine implements IGrid {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItemsLegacy(matrix, 0, nbt); RefinedStorageUtils.saveItemsLegacy(matrix, 0, nbt);
RefinedStorageUtils.saveItems(patterns, 1, nbt); RefinedStorageUtils.saveItems(patterns, 1, nbt);
nbt.setInteger(NBT_SORTING_DIRECTION, sortingDirection); nbt.setInteger(NBT_SORTING_DIRECTION, sortingDirection);
nbt.setInteger(NBT_SORTING_TYPE, sortingType); nbt.setInteger(NBT_SORTING_TYPE, sortingType);
nbt.setInteger(NBT_SEARCH_BOX_MODE, searchBoxMode); nbt.setInteger(NBT_SEARCH_BOX_MODE, searchBoxMode);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -15,7 +15,7 @@ public class SoldererRecipeCraftingGrid implements ISoldererRecipe {
} else if (row == 1) { } else if (row == 1) {
return new ItemStack(RefinedStorageBlocks.GRID, 1, EnumGridType.NORMAL.getId()); return new ItemStack(RefinedStorageBlocks.GRID, 1, EnumGridType.NORMAL.getId());
} else if (row == 2) { } else if (row == 2) {
return new ItemStack(Blocks.crafting_table); return new ItemStack(Blocks.CRAFTING_TABLE);
} }
return null; return null;

View File

@@ -14,7 +14,7 @@ public class SoldererRecipeDiskDrive implements ISoldererRecipe {
} else if (row == 1) { } else if (row == 1) {
return new ItemStack(RefinedStorageBlocks.MACHINE_CASING); return new ItemStack(RefinedStorageBlocks.MACHINE_CASING);
} else if (row == 2) { } else if (row == 2) {
return new ItemStack(Blocks.chest); return new ItemStack(Blocks.CHEST);
} }
return null; return null;

View File

@@ -17,11 +17,11 @@ public class SoldererRecipePrintedProcessor implements ISoldererRecipe {
if (row == 1) { if (row == 1) {
switch (type) { switch (type) {
case ItemProcessor.TYPE_PRINTED_BASIC: case ItemProcessor.TYPE_PRINTED_BASIC:
return new ItemStack(Items.iron_ingot); return new ItemStack(Items.IRON_INGOT);
case ItemProcessor.TYPE_PRINTED_IMPROVED: case ItemProcessor.TYPE_PRINTED_IMPROVED:
return new ItemStack(Items.gold_ingot); return new ItemStack(Items.GOLD_INGOT);
case ItemProcessor.TYPE_PRINTED_ADVANCED: case ItemProcessor.TYPE_PRINTED_ADVANCED:
return new ItemStack(Items.diamond); return new ItemStack(Items.DIAMOND);
case ItemProcessor.TYPE_PRINTED_SILICON: case ItemProcessor.TYPE_PRINTED_SILICON:
return new ItemStack(RefinedStorageItems.SILICON); return new ItemStack(RefinedStorageItems.SILICON);
} }

View File

@@ -24,7 +24,7 @@ public class SoldererRecipeProcessor implements ISoldererRecipe {
return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_PRINTED_ADVANCED); return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_PRINTED_ADVANCED);
} }
} else if (row == 1) { } else if (row == 1) {
return new ItemStack(Items.redstone); return new ItemStack(Items.REDSTONE);
} else if (row == 2) { } else if (row == 2) {
return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_PRINTED_SILICON); return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_PRINTED_SILICON);
} }

View File

@@ -29,11 +29,11 @@ public class SoldererRecipeUpgrade implements ISoldererRecipe {
private ItemStack getBottomAndTopItem() { private ItemStack getBottomAndTopItem() {
switch (type) { switch (type) {
case ItemUpgrade.TYPE_RANGE: case ItemUpgrade.TYPE_RANGE:
return new ItemStack(Items.ender_pearl); return new ItemStack(Items.ENDER_PEARL);
case ItemUpgrade.TYPE_SPEED: case ItemUpgrade.TYPE_SPEED:
return new ItemStack(Blocks.redstone_block); return new ItemStack(Blocks.REDSTONE_BLOCK);
case ItemUpgrade.TYPE_CRAFTING: case ItemUpgrade.TYPE_CRAFTING:
return new ItemStack(Blocks.crafting_table); return new ItemStack(Blocks.CRAFTING_TABLE);
} }
return null; return null;

View File

@@ -113,14 +113,14 @@ public class TileSolderer extends TileMachine {
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
RefinedStorageUtils.saveItems(items, 0, nbt); RefinedStorageUtils.saveItems(items, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt); RefinedStorageUtils.saveItems(upgrades, 1, nbt);
nbt.setBoolean(NBT_WORKING, working); nbt.setBoolean(NBT_WORKING, working);
nbt.setInteger(NBT_PROGRESS, progress); nbt.setInteger(NBT_PROGRESS, progress);
return super.writeToNBT(nbt);
} }
@Override @Override

View File

@@ -3,8 +3,8 @@
"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.6.11", "version": "0.7",
"mcversion": "1.9", "mcversion": "1.9.4",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",
"authorList": ["raoulvdberge", "gustoniaeagle"], "authorList": ["raoulvdberge", "gustoniaeagle"],