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

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

View File

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

View File

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

View File

@@ -53,7 +53,7 @@ public abstract class ContainerBase extends Container {
}
@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;
if (slot instanceof SlotSpecimen) {
@@ -111,7 +111,7 @@ public abstract class ContainerBase extends Container {
return null;
}
return super.func_184996_a(id, clickedButton, clickType, player);
return super.slotClick(id, clickedButton, clickType, player);
}
@Override

View File

@@ -91,8 +91,8 @@ public class ContainerGrid extends ContainerBase {
public void detectAndSendChanges() {
for (int i = 0; i < inventorySlots.size(); ++i) {
if (inventorySlots.get(i) instanceof SlotGridCrafting || inventorySlots.get(i) == craftingResultSlot) {
for (int j = 0; j < crafters.size(); ++j) {
crafters.get(j).sendSlotContents(this, i, inventorySlots.get(i).getStack());
for (int j = 0; j < listeners.size(); ++j) {
listeners.get(j).sendSlotContents(this, i, inventorySlots.get(i).getStack());
}
} else {
ItemStack current = inventorySlots.get(i).getStack();
@@ -103,8 +103,8 @@ public class ContainerGrid extends ContainerBase {
inventoryItemStacks.set(i, cached);
for (int j = 0; j < crafters.size(); ++j) {
crafters.get(j).sendSlotContents(this, i, cached);
for (int j = 0; j < listeners.size(); ++j) {
listeners.get(j).sendSlotContents(this, i, cached);
}
}
}
@@ -121,7 +121,7 @@ public class ContainerGrid extends ContainerBase {
}
@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;
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

View File

@@ -3,10 +3,10 @@ package refinedstorage.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import org.lwjgl.opengl.GL11;
import refinedstorage.RefinedStorage;
import refinedstorage.gui.sidebutton.SideButton;
@@ -227,7 +227,7 @@ public abstract class GuiBase extends GuiContainer {
}
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);

View File

@@ -352,7 +352,7 @@ public class GuiGrid extends GuiBase {
}
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)) {
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
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

View File

@@ -1,9 +1,9 @@
package refinedstorage.item;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import refinedstorage.RefinedStorageBlocks;
import refinedstorage.block.EnumStorageType;
@@ -25,9 +25,9 @@ public class ItemBlockStorage extends ItemBlockBase {
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(TileStorage.NBT_STORAGE);
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 {
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;
import net.minecraft.client.resources.I18n;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.InventoryHelper;
@@ -8,7 +9,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import refinedstorage.RefinedStorageItems;
import refinedstorage.block.EnumStorageType;
@@ -43,9 +43,9 @@ public class ItemStorageDisk extends ItemBase {
int capacity = EnumStorageType.getById(disk.getItemDamage()).getCapacity();
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 {
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 net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -13,7 +14,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import refinedstorage.RefinedStorage;
import refinedstorage.RefinedStorageBlocks;
@@ -94,13 +94,13 @@ public class ItemWirelessGrid extends ItemEnergyContainer {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
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)) {
list.add(I18n.translateToLocalFormatted("misc.refinedstorage:wireless_grid.tooltip.0", getX(stack)));
list.add(I18n.translateToLocalFormatted("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.0", getX(stack)));
list.add(I18n.format("misc.refinedstorage:wireless_grid.tooltip.1", getY(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)) {
return new ActionResult(EnumActionResult.SUCCESS, stack);
} 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 {
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.IRecipeWrapper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
public class SoldererRecipeCategory implements IRecipeCategory {
public static final String ID = "refinedstorage.solderer";
@@ -27,7 +27,7 @@ public class SoldererRecipeCategory implements IRecipeCategory {
@Override
public String getTitle() {
return I18n.translateToLocal("gui.refinedstorage:solderer");
return I18n.format("gui.refinedstorage:solderer");
}
@Override

View File

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

View File

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

View File

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

View File

@@ -57,7 +57,7 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
scheduler.resetSchedule();
worldObj.setBlockState(front, block.getStateFromMeta(took.getItemDamage()), 1 | 2);
// 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);
} else if (RefinedStorageUtils.hasUpgrade(upgrades, ItemUpgrade.TYPE_CRAFTING)) {
ItemStack craft = filter.getStackInSlot(0);
@@ -97,15 +97,15 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
nbt.setInteger(NBT_COMPARE, compare);
RefinedStorageUtils.saveItems(filter, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt);
scheduler.writeToNBT(nbt);
return nbt;
}
@Override

View File

@@ -526,9 +526,7 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
energy.writeToNBT(nbt);
nbt.setInteger(RedstoneMode.NBT, redstoneMode.id);
@@ -542,6 +540,8 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
}
nbt.setTag(NBT_CRAFTING_TASKS, list);
return super.writeToNBT(nbt);
}
@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)))) {
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);
for (ItemStack drop : drops) {
@@ -116,14 +116,14 @@ public class TileDestructor extends TileMachine implements ICompareConfig, IMode
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
nbt.setInteger(NBT_COMPARE, compare);
nbt.setInteger(NBT_MODE, mode);
RefinedStorageUtils.saveItems(filters, 0, nbt);
RefinedStorageUtils.saveItems(upgrades, 1, nbt);
return super.writeToNBT(nbt);
}
@Override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -119,7 +119,7 @@ public class TileGrid extends TileMachine implements IGrid {
public void onCrafted(ContainerGrid container) {
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) {
if (remainder[i] != null) {
@@ -313,15 +313,15 @@ public class TileGrid extends TileMachine implements IGrid {
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
RefinedStorageUtils.saveItemsLegacy(matrix, 0, nbt);
RefinedStorageUtils.saveItems(patterns, 1, nbt);
nbt.setInteger(NBT_SORTING_DIRECTION, sortingDirection);
nbt.setInteger(NBT_SORTING_TYPE, sortingType);
nbt.setInteger(NBT_SEARCH_BOX_MODE, searchBoxMode);
return super.writeToNBT(nbt);
}
@Override

View File

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

View File

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

View File

@@ -17,11 +17,11 @@ public class SoldererRecipePrintedProcessor implements ISoldererRecipe {
if (row == 1) {
switch (type) {
case ItemProcessor.TYPE_PRINTED_BASIC:
return new ItemStack(Items.iron_ingot);
return new ItemStack(Items.IRON_INGOT);
case ItemProcessor.TYPE_PRINTED_IMPROVED:
return new ItemStack(Items.gold_ingot);
return new ItemStack(Items.GOLD_INGOT);
case ItemProcessor.TYPE_PRINTED_ADVANCED:
return new ItemStack(Items.diamond);
return new ItemStack(Items.DIAMOND);
case ItemProcessor.TYPE_PRINTED_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);
}
} else if (row == 1) {
return new ItemStack(Items.redstone);
return new ItemStack(Items.REDSTONE);
} else if (row == 2) {
return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_PRINTED_SILICON);
}

View File

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

View File

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

View File

@@ -3,8 +3,8 @@
"modid": "refinedstorage",
"name": "Refined Storage",
"description": "A Minecraft mod all about storage.",
"version": "0.6.11",
"mcversion": "1.9",
"version": "0.7",
"mcversion": "1.9.4",
"url": "",
"updateUrl": "",
"authorList": ["raoulvdberge", "gustoniaeagle"],