B texs
@@ -30,8 +30,4 @@ public class BlockCraftingMonitor extends BlockNode {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean hasConnectivityState() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,13 +70,4 @@ public class BlockGrid extends BlockNode {
|
||||
public Item createItem() {
|
||||
return new ItemBlockBase(this, true);
|
||||
}
|
||||
|
||||
public boolean hasConnectivityState() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPlacementType getPlacementType() {
|
||||
return EnumPlacementType.ANY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ public enum EnumStorageType implements IStringSerializable {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return TYPE_1K;
|
||||
return TYPE_CREATIVE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package refinedstorage.item;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.InventoryHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -64,6 +65,15 @@ public class ItemBlockStorage extends ItemBlockBase {
|
||||
return stack.getTagCompound() != null && stack.getTagCompound().hasKey(TileStorage.NBT_STORAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
|
||||
super.onUpdate(stack, world, entity, slot, selected);
|
||||
|
||||
if (!stack.hasTagCompound()) {
|
||||
initNBT(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack stack, World world, EntityPlayer player) {
|
||||
super.onCreated(stack, world, player);
|
||||
|
||||
@@ -2,6 +2,7 @@ package refinedstorage.item;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.InventoryHelper;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -39,14 +40,25 @@ public class ItemStorageDisk extends ItemBase {
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
list.add(i == TYPE_DEBUG ? createDebugDisk() : NBTStorage.createStackWithNBT(new ItemStack(item, 1, i)));
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
list.add(NBTStorage.createStackWithNBT(new ItemStack(item, 1, i)));
|
||||
}
|
||||
}
|
||||
|
||||
private ItemStack createDebugDisk() {
|
||||
ItemStack debugDisk = new ItemStack(RefinedStorageItems.STORAGE_DISK, 1, ItemStorageDisk.TYPE_DEBUG);
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
|
||||
super.onUpdate(stack, world, entity, slot, selected);
|
||||
|
||||
if (!stack.hasTagCompound()) {
|
||||
if (stack.getItemDamage() == 5) {
|
||||
applyDebugDiskData(stack);
|
||||
} else {
|
||||
NBTStorage.createStackWithNBT(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void applyDebugDiskData(ItemStack stack) {
|
||||
if (debugDiskTag == null) {
|
||||
debugDiskTag = NBTStorage.createNBT();
|
||||
|
||||
@@ -76,9 +88,7 @@ public class ItemStorageDisk extends ItemBase {
|
||||
storage.writeToNBT();
|
||||
}
|
||||
|
||||
debugDisk.setTagCompound(debugDiskTag.copy());
|
||||
|
||||
return debugDisk;
|
||||
stack.setTagCompound(debugDiskTag.copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -107,6 +107,10 @@ public class ClientProxy extends CommonProxy {
|
||||
.build()
|
||||
);
|
||||
|
||||
ModelLoader.setCustomStateMapper(RefinedStorageBlocks.GRID, (new StateMap.Builder())
|
||||
.ignore(RefinedStorageBlocks.GRID.TYPE)
|
||||
.build());
|
||||
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CABLE), 0, new ModelResourceLocation("refinedstorage:cable", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.GRID), EnumGridType.NORMAL.getId(), new ModelResourceLocation("refinedstorage:grid", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.GRID), EnumGridType.CRAFTING.getId(), new ModelResourceLocation("refinedstorage:grid", "inventory"));
|
||||
|
||||
@@ -86,10 +86,11 @@ public class CommonProxy {
|
||||
registerBlock(RefinedStorageBlocks.PROCESSING_PATTERN_ENCODER);
|
||||
registerBlock(RefinedStorageBlocks.DISK_DRIVE);
|
||||
registerBlock(RefinedStorageBlocks.STORAGE);
|
||||
registerBlock(RefinedStorageBlocks.EXTERNAL_STORAGE);
|
||||
registerBlock(RefinedStorageBlocks.SOLDERER);
|
||||
registerBlock(RefinedStorageBlocks.CABLE);
|
||||
registerBlock(RefinedStorageBlocks.IMPORTER);
|
||||
registerBlock(RefinedStorageBlocks.EXPORTER);
|
||||
registerBlock(RefinedStorageBlocks.EXTERNAL_STORAGE);
|
||||
registerBlock(RefinedStorageBlocks.CONSTRUCTOR);
|
||||
registerBlock(RefinedStorageBlocks.DESTRUCTOR);
|
||||
registerBlock(RefinedStorageBlocks.DETECTOR);
|
||||
@@ -98,7 +99,6 @@ public class CommonProxy {
|
||||
registerBlock(RefinedStorageBlocks.WIRELESS_TRANSMITTER);
|
||||
registerBlock(RefinedStorageBlocks.MACHINE_CASING);
|
||||
registerBlock(RefinedStorageBlocks.QUARTZ_ENRICHED_IRON);
|
||||
registerBlock(RefinedStorageBlocks.CABLE);
|
||||
|
||||
registerItem(RefinedStorageItems.QUARTZ_ENRICHED_IRON);
|
||||
registerItem(RefinedStorageItems.STORAGE_DISK);
|
||||
|
||||
@@ -252,15 +252,17 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
ItemStack disk = disks.getStackInSlot(i);
|
||||
|
||||
if (disk != null) {
|
||||
int capacity = EnumStorageType.getById(disk.getItemDamage()).getCapacity();
|
||||
|
||||
if (capacity == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
stored += NBTStorage.getStoredFromNBT(disk.getTagCompound());
|
||||
storedMax += EnumStorageType.getById(disk.getItemDamage()).getCapacity();
|
||||
}
|
||||
}
|
||||
|
||||
if (storedMax == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (int) Math.floor((stored / storedMax) * 7f);
|
||||
}
|
||||
|
||||
|
||||
@@ -335,6 +335,7 @@ public class TileGrid extends TileNode implements IGrid {
|
||||
public void writeContainerData(ByteBuf buf) {
|
||||
super.writeContainerData(buf);
|
||||
|
||||
buf.writeBoolean(isConnected());
|
||||
buf.writeInt(sortingDirection);
|
||||
buf.writeInt(sortingType);
|
||||
buf.writeInt(searchBoxMode);
|
||||
@@ -344,6 +345,7 @@ public class TileGrid extends TileNode implements IGrid {
|
||||
public void readContainerData(ByteBuf buf) {
|
||||
super.readContainerData(buf);
|
||||
|
||||
connected = buf.readBoolean();
|
||||
sortingDirection = buf.readInt();
|
||||
sortingType = buf.readInt();
|
||||
searchBoxMode = buf.readInt();
|
||||
|
||||
@@ -4,31 +4,17 @@
|
||||
"model": "orientable",
|
||||
"textures": {
|
||||
"side": "refinedstorage:blocks/side",
|
||||
"top": "refinedstorage:blocks/side"
|
||||
"top": "refinedstorage:blocks/side",
|
||||
"front": "refinedstorage:blocks/crafting_monitor"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/crafting_monitor_disconnected"
|
||||
},
|
||||
"transform": "forge:default-block",
|
||||
"y": 0
|
||||
}
|
||||
],
|
||||
"connected": {
|
||||
"true": {
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/crafting_monitor_connected"
|
||||
}
|
||||
},
|
||||
"false": {
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/crafting_monitor_disconnected"
|
||||
}
|
||||
}
|
||||
},
|
||||
"direction": {
|
||||
"north": {
|
||||
"y": 0
|
||||
|
||||
@@ -4,39 +4,17 @@
|
||||
"model": "orientable",
|
||||
"textures": {
|
||||
"side": "refinedstorage:blocks/side",
|
||||
"top": "refinedstorage:blocks/side"
|
||||
"top": "refinedstorage:blocks/side",
|
||||
"front": "refinedstorage:blocks/grid"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/grid_disconnected"
|
||||
},
|
||||
"transform": "forge:default-block",
|
||||
"y": 0
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"normal": {
|
||||
},
|
||||
"crafting": {
|
||||
},
|
||||
"pattern": {
|
||||
}
|
||||
},
|
||||
"connected": {
|
||||
"true": {
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/grid_connected"
|
||||
}
|
||||
},
|
||||
"false": {
|
||||
"textures": {
|
||||
"front": "refinedstorage:blocks/grid_disconnected"
|
||||
}
|
||||
}
|
||||
},
|
||||
"direction": {
|
||||
"north": {
|
||||
"y": 0
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"particle": "refinedstorage:blocks/processing_pattern_encoder",
|
||||
"down": "refinedstorage:blocks/side",
|
||||
"up": "refinedstorage:blocks/processing_pattern_encoder",
|
||||
"north": "refinedstorage:blocks/side",
|
||||
"east": "refinedstorage:blocks/side",
|
||||
"south": "refinedstorage:blocks/side",
|
||||
"west": "refinedstorage:blocks/side"
|
||||
"north": "refinedstorage:blocks/processing_pattern_encoder_side",
|
||||
"east": "refinedstorage:blocks/processing_pattern_encoder_side",
|
||||
"south": "refinedstorage:blocks/processing_pattern_encoder_side",
|
||||
"west": "refinedstorage:blocks/processing_pattern_encoder_side"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
|
||||
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 481 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 482 B |
BIN
src/main/resources/assets/refinedstorage/textures/blocks/crafting_monitor.png
Executable file
|
After Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 580 B |
|
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 479 B |
|
After Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 687 B |
|
Before Width: | Height: | Size: 614 B |
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 467 B |
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 334 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 409 B |