Re-add the Crafter Manager
This commit is contained in:
@@ -9,6 +9,7 @@ import com.raoulvdberge.refinedstorage.render.color.PatternItemColor;
|
|||||||
import com.raoulvdberge.refinedstorage.render.model.*;
|
import com.raoulvdberge.refinedstorage.render.model.*;
|
||||||
import com.raoulvdberge.refinedstorage.render.tesr.StorageMonitorTileRenderer;
|
import com.raoulvdberge.refinedstorage.render.tesr.StorageMonitorTileRenderer;
|
||||||
import com.raoulvdberge.refinedstorage.screen.*;
|
import com.raoulvdberge.refinedstorage.screen.*;
|
||||||
|
import com.raoulvdberge.refinedstorage.screen.factory.CrafterManagerScreenFactory;
|
||||||
import com.raoulvdberge.refinedstorage.screen.factory.GridScreenFactory;
|
import com.raoulvdberge.refinedstorage.screen.factory.GridScreenFactory;
|
||||||
import com.raoulvdberge.refinedstorage.tile.StorageMonitorTile;
|
import com.raoulvdberge.refinedstorage.tile.StorageMonitorTile;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -108,6 +109,8 @@ public class ClientSetup {
|
|||||||
new ResourceLocation(RS.ID, "block/crafter/cutouts/front_connected")
|
new ResourceLocation(RS.ID, "block/crafter/cutouts/front_connected")
|
||||||
));
|
));
|
||||||
|
|
||||||
|
bakedModelOverrideRegistry.add(new ResourceLocation(RS.ID, "crafter_manager"), (base, registry) -> new FullbrightBakedModel(base, new ResourceLocation(RS.ID, "block/crafter_manager/cutouts/front_connected")));
|
||||||
|
|
||||||
bakedModelOverrideRegistry.add(new ResourceLocation(RS.ID, "pattern"), (base, registry) -> new PatternBakedModel(base));
|
bakedModelOverrideRegistry.add(new ResourceLocation(RS.ID, "pattern"), (base, registry) -> new PatternBakedModel(base));
|
||||||
|
|
||||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/disks/disk"));
|
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/disks/disk"));
|
||||||
@@ -182,6 +185,7 @@ public class ClientSetup {
|
|||||||
ScreenManager.registerFactory(RSContainers.DESTRUCTOR, DestructorScreen::new);
|
ScreenManager.registerFactory(RSContainers.DESTRUCTOR, DestructorScreen::new);
|
||||||
ScreenManager.registerFactory(RSContainers.DISK_MANIPULATOR, DiskManipulatorScreen::new);
|
ScreenManager.registerFactory(RSContainers.DISK_MANIPULATOR, DiskManipulatorScreen::new);
|
||||||
ScreenManager.registerFactory(RSContainers.CRAFTER, CrafterScreen::new);
|
ScreenManager.registerFactory(RSContainers.CRAFTER, CrafterScreen::new);
|
||||||
|
ScreenManager.registerFactory(RSContainers.CRAFTER_MANAGER, new CrafterManagerScreenFactory());
|
||||||
|
|
||||||
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_GRID);
|
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_GRID);
|
||||||
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_FLUID_GRID);
|
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_FLUID_GRID);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.raoulvdberge.refinedstorage.capability.NetworkNodeProxyCapability;
|
|||||||
import com.raoulvdberge.refinedstorage.config.ClientConfig;
|
import com.raoulvdberge.refinedstorage.config.ClientConfig;
|
||||||
import com.raoulvdberge.refinedstorage.config.ServerConfig;
|
import com.raoulvdberge.refinedstorage.config.ServerConfig;
|
||||||
import com.raoulvdberge.refinedstorage.container.*;
|
import com.raoulvdberge.refinedstorage.container.*;
|
||||||
|
import com.raoulvdberge.refinedstorage.container.factory.CrafterManagerContainerFactory;
|
||||||
import com.raoulvdberge.refinedstorage.container.factory.GridContainerFactory;
|
import com.raoulvdberge.refinedstorage.container.factory.GridContainerFactory;
|
||||||
import com.raoulvdberge.refinedstorage.container.factory.PositionalTileContainerFactory;
|
import com.raoulvdberge.refinedstorage.container.factory.PositionalTileContainerFactory;
|
||||||
import com.raoulvdberge.refinedstorage.item.*;
|
import com.raoulvdberge.refinedstorage.item.*;
|
||||||
@@ -137,6 +138,7 @@ public final class RS {
|
|||||||
API.instance().getNetworkNodeRegistry().add(DestructorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DestructorNetworkNode(world, pos)));
|
API.instance().getNetworkNodeRegistry().add(DestructorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DestructorNetworkNode(world, pos)));
|
||||||
API.instance().getNetworkNodeRegistry().add(DiskManipulatorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DiskManipulatorNetworkNode(world, pos)));
|
API.instance().getNetworkNodeRegistry().add(DiskManipulatorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DiskManipulatorNetworkNode(world, pos)));
|
||||||
API.instance().getNetworkNodeRegistry().add(CrafterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterNetworkNode(world, pos)));
|
API.instance().getNetworkNodeRegistry().add(CrafterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterNetworkNode(world, pos)));
|
||||||
|
API.instance().getNetworkNodeRegistry().add(CrafterManagerNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterManagerNetworkNode(world, pos)));
|
||||||
|
|
||||||
API.instance().getGridManager().add(GridBlockGridFactory.ID, new GridBlockGridFactory());
|
API.instance().getGridManager().add(GridBlockGridFactory.ID, new GridBlockGridFactory());
|
||||||
API.instance().getGridManager().add(WirelessGridGridFactory.ID, new WirelessGridGridFactory());
|
API.instance().getGridManager().add(WirelessGridGridFactory.ID, new WirelessGridGridFactory());
|
||||||
@@ -208,6 +210,7 @@ public final class RS {
|
|||||||
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.NORMAL));
|
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.NORMAL));
|
||||||
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.CREATIVE));
|
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.CREATIVE));
|
||||||
e.getRegistry().register(new CrafterBlock());
|
e.getRegistry().register(new CrafterBlock());
|
||||||
|
e.getRegistry().register(new CrafterManagerBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@@ -249,6 +252,7 @@ public final class RS {
|
|||||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DestructorTile::new, RSBlocks.DESTRUCTOR).build(null).setRegistryName(RS.ID, "destructor")));
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DestructorTile::new, RSBlocks.DESTRUCTOR).build(null).setRegistryName(RS.ID, "destructor")));
|
||||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskManipulatorTile::new, RSBlocks.DISK_MANIPULATOR).build(null).setRegistryName(RS.ID, "disk_manipulator")));
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskManipulatorTile::new, RSBlocks.DISK_MANIPULATOR).build(null).setRegistryName(RS.ID, "disk_manipulator")));
|
||||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterTile::new, RSBlocks.CRAFTER).build(null).setRegistryName(RS.ID, "crafter")));
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterTile::new, RSBlocks.CRAFTER).build(null).setRegistryName(RS.ID, "crafter")));
|
||||||
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterManagerTile::new, RSBlocks.CRAFTER_MANAGER).build(null).setRegistryName(RS.ID, "crafter_manager")));
|
||||||
|
|
||||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.CREATIVE), RSBlocks.CREATIVE_PORTABLE_GRID).build(null).setRegistryName(RS.ID, "creative_portable_grid")));
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.CREATIVE), RSBlocks.CREATIVE_PORTABLE_GRID).build(null).setRegistryName(RS.ID, "creative_portable_grid")));
|
||||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.NORMAL), RSBlocks.PORTABLE_GRID).build(null).setRegistryName(RS.ID, "portable_grid")));
|
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.NORMAL), RSBlocks.PORTABLE_GRID).build(null).setRegistryName(RS.ID, "portable_grid")));
|
||||||
@@ -285,6 +289,7 @@ public final class RS {
|
|||||||
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<DestructorContainer, DestructorTile>((windowId, inv, tile) -> new DestructorContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "destructor"));
|
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<DestructorContainer, DestructorTile>((windowId, inv, tile) -> new DestructorContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "destructor"));
|
||||||
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<DiskManipulatorContainer, DiskManipulatorTile>((windowId, inv, tile) -> new DiskManipulatorContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "disk_manipulator"));
|
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<DiskManipulatorContainer, DiskManipulatorTile>((windowId, inv, tile) -> new DiskManipulatorContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "disk_manipulator"));
|
||||||
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<CrafterContainer, CrafterTile>((windowId, inv, tile) -> new CrafterContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "crafter"));
|
e.getRegistry().register(IForgeContainerType.create(new PositionalTileContainerFactory<CrafterContainer, CrafterTile>((windowId, inv, tile) -> new CrafterContainer(tile, inv.player, windowId))).setRegistryName(RS.ID, "crafter"));
|
||||||
|
e.getRegistry().register(IForgeContainerType.create(new CrafterManagerContainerFactory()).setRegistryName(RS.ID, "crafter_manager"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@@ -370,6 +375,7 @@ public final class RS {
|
|||||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DESTRUCTOR));
|
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DESTRUCTOR));
|
||||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DISK_MANIPULATOR));
|
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DISK_MANIPULATOR));
|
||||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTER));
|
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTER));
|
||||||
|
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTER_MANAGER));
|
||||||
|
|
||||||
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.NORMAL));
|
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.NORMAL));
|
||||||
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.CREATIVE));
|
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.CREATIVE));
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ public final class RSBlocks {
|
|||||||
public static final PortableGridBlock CREATIVE_PORTABLE_GRID = null;
|
public static final PortableGridBlock CREATIVE_PORTABLE_GRID = null;
|
||||||
@ObjectHolder(RS.ID + ":crafter")
|
@ObjectHolder(RS.ID + ":crafter")
|
||||||
public static final CrafterBlock CRAFTER = null;
|
public static final CrafterBlock CRAFTER = null;
|
||||||
|
@ObjectHolder(RS.ID + ":crafter_manager")
|
||||||
|
public static final CrafterManagerBlock CRAFTER_MANAGER = null;
|
||||||
|
|
||||||
public static final BlockCraftingMonitor CRAFTING_MONITOR = null;
|
public static final BlockCraftingMonitor CRAFTING_MONITOR = null;
|
||||||
public static final BlockCrafterManager CRAFTER_MANAGER = null;
|
|
||||||
}
|
}
|
||||||
@@ -47,9 +47,9 @@ public final class RSContainers {
|
|||||||
public static final ContainerType<DiskManipulatorContainer> DISK_MANIPULATOR = null;
|
public static final ContainerType<DiskManipulatorContainer> DISK_MANIPULATOR = null;
|
||||||
@ObjectHolder(RS.ID + ":crafter")
|
@ObjectHolder(RS.ID + ":crafter")
|
||||||
public static final ContainerType<CrafterContainer> CRAFTER = null;
|
public static final ContainerType<CrafterContainer> CRAFTER = null;
|
||||||
|
@ObjectHolder(RS.ID + ":crafter_manager")
|
||||||
|
public static final ContainerType<CrafterManagerContainer> CRAFTER_MANAGER = null;
|
||||||
|
|
||||||
//@ObjectHolder(RS.ID + ":crafter_manager")
|
|
||||||
public static final ContainerType<CrafterContainer> CRAFTER_MANAGER = null;
|
|
||||||
//@ObjectHolder(RS.ID + ":crafting_monitor")
|
//@ObjectHolder(RS.ID + ":crafting_monitor")
|
||||||
public static final ContainerType<CraftingMonitorContainer> CRAFTING_MONITOR = null;
|
public static final ContainerType<CraftingMonitorContainer> CRAFTING_MONITOR = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.raoulvdberge.refinedstorage;
|
|||||||
public class RSOldConfig {
|
public class RSOldConfig {
|
||||||
//region Energy
|
//region Energy
|
||||||
public int craftingMonitorUsage;
|
public int craftingMonitorUsage;
|
||||||
public int crafterManagerUsage;
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region Wireless Crafting Monitor
|
//region Wireless Crafting Monitor
|
||||||
@@ -27,7 +26,6 @@ public class RSOldConfig {
|
|||||||
/*private void loadConfig() {
|
/*private void loadConfig() {
|
||||||
//region Energy
|
//region Energy
|
||||||
craftingMonitorUsage = config.getInt("craftingMonitor", ENERGY, 2, 0, Integer.MAX_VALUE, "The energy used by Crafting Monitors");
|
craftingMonitorUsage = config.getInt("craftingMonitor", ENERGY, 2, 0, Integer.MAX_VALUE, "The energy used by Crafting Monitors");
|
||||||
crafterManagerUsage = config.getInt("crafterManager", ENERGY, 4, 0, Integer.MAX_VALUE, "The energy used by Crafter Managers");
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region Wireless Crafting Monitor
|
//region Wireless Crafting Monitor
|
||||||
|
|||||||
@@ -80,9 +80,9 @@ public class RSTiles {
|
|||||||
public static final TileEntityType<PortableGridTile> CREATIVE_PORTABLE_GRID = null;
|
public static final TileEntityType<PortableGridTile> CREATIVE_PORTABLE_GRID = null;
|
||||||
@ObjectHolder(RS.ID + ":crafter")
|
@ObjectHolder(RS.ID + ":crafter")
|
||||||
public static final TileEntityType<CrafterTile> CRAFTER = null;
|
public static final TileEntityType<CrafterTile> CRAFTER = null;
|
||||||
|
@ObjectHolder(RS.ID + ":crafter_manager")
|
||||||
|
public static final TileEntityType<CrafterManagerTile> CRAFTER_MANAGER = null;
|
||||||
|
|
||||||
//@ObjectHolder(RS.ID + ":crafter_manager")
|
|
||||||
public static final TileEntityType<CrafterTile> CRAFTER_MANAGER = null;
|
|
||||||
//@ObjectHolder(RS.ID + ":crafting_monitor")
|
//@ObjectHolder(RS.ID + ":crafting_monitor")
|
||||||
public static final TileEntityType<TileCraftingMonitor> CRAFTING_MONITOR = null;
|
public static final TileEntityType<TileCraftingMonitor> CRAFTING_MONITOR = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ package com.raoulvdberge.refinedstorage.apiimpl.network.node;
|
|||||||
import com.raoulvdberge.refinedstorage.RS;
|
import com.raoulvdberge.refinedstorage.RS;
|
||||||
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
||||||
import com.raoulvdberge.refinedstorage.block.NetworkNodeBlock;
|
import com.raoulvdberge.refinedstorage.block.NetworkNodeBlock;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileCrafterManager;
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class NetworkNodeCrafterManager extends NetworkNode {
|
public class CrafterManagerNetworkNode extends NetworkNode {
|
||||||
public static final ResourceLocation ID = new ResourceLocation(RS.ID, "crafter_manager");
|
public static final ResourceLocation ID = new ResourceLocation(RS.ID, "crafter_manager");
|
||||||
|
|
||||||
private static final String NBT_SIZE = "Size";
|
private static final String NBT_SIZE = "Size";
|
||||||
@@ -19,13 +18,13 @@ public class NetworkNodeCrafterManager extends NetworkNode {
|
|||||||
private int size = IGrid.SIZE_STRETCH;
|
private int size = IGrid.SIZE_STRETCH;
|
||||||
private int searchBoxMode = IGrid.SEARCH_BOX_MODE_NORMAL;
|
private int searchBoxMode = IGrid.SEARCH_BOX_MODE_NORMAL;
|
||||||
|
|
||||||
public NetworkNodeCrafterManager(World world, BlockPos pos) {
|
public CrafterManagerNetworkNode(World world, BlockPos pos) {
|
||||||
super(world, pos);
|
super(world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getEnergyUsage() {
|
public int getEnergyUsage() {
|
||||||
return RS.INSTANCE.config.crafterManagerUsage;
|
return RS.SERVER_CONFIG.getCrafterManager().getUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -33,14 +32,8 @@ public class NetworkNodeCrafterManager extends NetworkNode {
|
|||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendTo(ServerPlayerEntity player) {
|
|
||||||
if (network != null) {
|
|
||||||
// TODO RS.INSTANCE.network.sendTo(new MessageCrafterManagerSlotSizes(network.getCraftingManager().getNamedContainers()), player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return world.isRemote ? TileCrafterManager.SIZE.getValue() : size;
|
return world.isRemote ? CrafterManagerTile.SIZE.getValue() : size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(int size) {
|
public void setSize(int size) {
|
||||||
@@ -71,7 +64,7 @@ public class NetworkNodeCrafterManager extends NetworkNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getSearchBoxMode() {
|
public int getSearchBoxMode() {
|
||||||
return world.isRemote ? TileCrafterManager.SEARCH_BOX_MODE.getValue() : searchBoxMode;
|
return world.isRemote ? CrafterManagerTile.SEARCH_BOX_MODE.getValue() : searchBoxMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSearchBoxMode(int searchBoxMode) {
|
public void setSearchBoxMode(int searchBoxMode) {
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.raoulvdberge.refinedstorage.block;
|
|
||||||
|
|
||||||
public class BlockCrafterManager extends NetworkNodeBlock {
|
|
||||||
public BlockCrafterManager(Properties props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
@Override
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public void registerModels(IModelRegistration modelRegistration) {
|
|
||||||
modelRegistration.setModel(this, 0, new ModelResourceLocation(info.getId(), "connected=false,direction=north"));
|
|
||||||
|
|
||||||
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(base, RS.ID + ":blocks/crafter_manager/cutouts/front_connected"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderLayer getRenderLayer() {
|
|
||||||
return BlockRenderLayer.CUTOUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nullable
|
|
||||||
public BlockDirection getDirection() {
|
|
||||||
return BlockDirection.HORIZONTAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, EnumHand hand, Direction side, float hitX, float hitY, float hitZ) {
|
|
||||||
if (!world.isRemote && openNetworkGui(RSGui.CRAFTER_MANAGER, player, world, pos, side, Permission.MODIFY, Permission.AUTOCRAFTING)) {
|
|
||||||
((TileCrafterManager) world.getTileEntity(pos)).getNode().sendTo((ServerPlayerEntity) player);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasConnectedState() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.raoulvdberge.refinedstorage.block;
|
package com.raoulvdberge.refinedstorage.block;
|
||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.RS;
|
import com.raoulvdberge.refinedstorage.RS;
|
||||||
|
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
|
||||||
import com.raoulvdberge.refinedstorage.container.CrafterContainer;
|
import com.raoulvdberge.refinedstorage.container.CrafterContainer;
|
||||||
import com.raoulvdberge.refinedstorage.container.factory.PositionalTileContainerProvider;
|
import com.raoulvdberge.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||||
import com.raoulvdberge.refinedstorage.tile.CrafterTile;
|
import com.raoulvdberge.refinedstorage.tile.CrafterTile;
|
||||||
@@ -63,7 +64,7 @@ public class CrafterBlock extends NetworkNodeBlock {
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
return NetworkUtils.attemptModify(world, pos, hit.getFace(), player, () -> NetworkHooks.openGui(
|
return NetworkUtils.attempt(world, pos, hit.getFace(), player, () -> NetworkHooks.openGui(
|
||||||
(ServerPlayerEntity) player,
|
(ServerPlayerEntity) player,
|
||||||
new PositionalTileContainerProvider<CrafterTile>(
|
new PositionalTileContainerProvider<CrafterTile>(
|
||||||
((CrafterTile) world.getTileEntity(pos)).getNode().getName(),
|
((CrafterTile) world.getTileEntity(pos)).getNode().getName(),
|
||||||
@@ -71,7 +72,7 @@ public class CrafterBlock extends NetworkNodeBlock {
|
|||||||
pos
|
pos
|
||||||
),
|
),
|
||||||
pos
|
pos
|
||||||
));
|
), Permission.MODIFY, Permission.AUTOCRAFTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.raoulvdberge.refinedstorage.block;
|
||||||
|
|
||||||
|
import com.raoulvdberge.refinedstorage.RS;
|
||||||
|
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
|
||||||
|
import com.raoulvdberge.refinedstorage.container.factory.CrafterManagerContainerProvider;
|
||||||
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
|
import com.raoulvdberge.refinedstorage.util.BlockUtils;
|
||||||
|
import com.raoulvdberge.refinedstorage.util.NetworkUtils;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.network.NetworkHooks;
|
||||||
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CrafterManagerBlock extends NetworkNodeBlock {
|
||||||
|
public CrafterManagerBlock() {
|
||||||
|
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||||
|
|
||||||
|
this.setRegistryName(RS.ID, "crafter_manager");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderLayer getRenderLayer() {
|
||||||
|
return BlockRenderLayer.CUTOUT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockDirection getDirection() {
|
||||||
|
return BlockDirection.HORIZONTAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
|
return new CrafterManagerTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
|
if (!world.isRemote) {
|
||||||
|
return NetworkUtils.attempt(world, pos, hit.getFace(), player, () -> NetworkHooks.openGui(
|
||||||
|
(ServerPlayerEntity) player,
|
||||||
|
new CrafterManagerContainerProvider((CrafterManagerTile) world.getTileEntity(pos)),
|
||||||
|
buf -> {
|
||||||
|
buf.writeBlockPos(pos);
|
||||||
|
|
||||||
|
Map<String, List<IItemHandlerModifiable>> containerData = ((CrafterManagerTile) world.getTileEntity(pos)).getNode().getNetwork().getCraftingManager().getNamedContainers();
|
||||||
|
|
||||||
|
buf.writeInt(containerData.size());
|
||||||
|
|
||||||
|
for (Map.Entry<String, List<IItemHandlerModifiable>> entry : containerData.entrySet()) {
|
||||||
|
buf.writeString(entry.getKey());
|
||||||
|
|
||||||
|
int slots = 0;
|
||||||
|
for (IItemHandlerModifiable handler : entry.getValue()) {
|
||||||
|
slots += handler.getSlots();
|
||||||
|
}
|
||||||
|
buf.writeInt(slots);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
), Permission.MODIFY, Permission.AUTOCRAFTING);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasConnectedState() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,9 +7,11 @@ public class ClientConfig {
|
|||||||
private ForgeConfigSpec spec;
|
private ForgeConfigSpec spec;
|
||||||
|
|
||||||
private Grid grid;
|
private Grid grid;
|
||||||
|
private CrafterManager crafterManager;
|
||||||
|
|
||||||
public ClientConfig() {
|
public ClientConfig() {
|
||||||
grid = new Grid();
|
grid = new Grid();
|
||||||
|
crafterManager = new CrafterManager();
|
||||||
|
|
||||||
spec = builder.build();
|
spec = builder.build();
|
||||||
}
|
}
|
||||||
@@ -22,6 +24,10 @@ public class ClientConfig {
|
|||||||
return grid;
|
return grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CrafterManager getCrafterManager() {
|
||||||
|
return crafterManager;
|
||||||
|
}
|
||||||
|
|
||||||
public class Grid {
|
public class Grid {
|
||||||
private final ForgeConfigSpec.IntValue maxRowsStretch;
|
private final ForgeConfigSpec.IntValue maxRowsStretch;
|
||||||
private final ForgeConfigSpec.BooleanValue detailedTooltip;
|
private final ForgeConfigSpec.BooleanValue detailedTooltip;
|
||||||
@@ -49,4 +55,20 @@ public class ClientConfig {
|
|||||||
return largeFont.get();
|
return largeFont.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CrafterManager {
|
||||||
|
private final ForgeConfigSpec.IntValue maxRowsStretch;
|
||||||
|
|
||||||
|
public CrafterManager() {
|
||||||
|
builder.push("crafterManager");
|
||||||
|
|
||||||
|
maxRowsStretch = builder.comment("The maximum amount of rows that the Crafter Manager can show when stretched").defineInRange("maxRowsStretch", Integer.MAX_VALUE, 3, Integer.MAX_VALUE);
|
||||||
|
|
||||||
|
builder.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxRowsStretch() {
|
||||||
|
return maxRowsStretch.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class ServerConfig {
|
|||||||
private DiskManipulator diskManipulator;
|
private DiskManipulator diskManipulator;
|
||||||
private PortableGrid portableGrid;
|
private PortableGrid portableGrid;
|
||||||
private Crafter crafter;
|
private Crafter crafter;
|
||||||
|
private CrafterManager crafterManager;
|
||||||
|
|
||||||
public ServerConfig() {
|
public ServerConfig() {
|
||||||
upgrades = new Upgrades();
|
upgrades = new Upgrades();
|
||||||
@@ -60,10 +61,15 @@ public class ServerConfig {
|
|||||||
diskManipulator = new DiskManipulator();
|
diskManipulator = new DiskManipulator();
|
||||||
portableGrid = new PortableGrid();
|
portableGrid = new PortableGrid();
|
||||||
crafter = new Crafter();
|
crafter = new Crafter();
|
||||||
|
crafterManager = new CrafterManager();
|
||||||
|
|
||||||
spec = builder.build();
|
spec = builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ForgeConfigSpec getSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
public Upgrades getUpgrades() {
|
public Upgrades getUpgrades() {
|
||||||
return upgrades;
|
return upgrades;
|
||||||
}
|
}
|
||||||
@@ -168,8 +174,8 @@ public class ServerConfig {
|
|||||||
return crafter;
|
return crafter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForgeConfigSpec getSpec() {
|
public CrafterManager getCrafterManager() {
|
||||||
return spec;
|
return crafterManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Controller {
|
public class Controller {
|
||||||
@@ -815,4 +821,20 @@ public class ServerConfig {
|
|||||||
return patternUsage.get();
|
return patternUsage.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CrafterManager {
|
||||||
|
private final ForgeConfigSpec.IntValue usage;
|
||||||
|
|
||||||
|
public CrafterManager() {
|
||||||
|
builder.push("crafterManager");
|
||||||
|
|
||||||
|
usage = builder.comment("The energy used by the Crafter Manager").defineInRange("usage", 8, 0, Integer.MAX_VALUE);
|
||||||
|
|
||||||
|
builder.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUsage() {
|
||||||
|
return usage.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,136 +2,83 @@ package com.raoulvdberge.refinedstorage.container;
|
|||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.RSContainers;
|
import com.raoulvdberge.refinedstorage.RSContainers;
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.autocrafting.CraftingPattern;
|
import com.raoulvdberge.refinedstorage.apiimpl.autocrafting.CraftingPattern;
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCrafterManager;
|
import com.raoulvdberge.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode;
|
||||||
import com.raoulvdberge.refinedstorage.container.slot.CrafterManagerSlot;
|
import com.raoulvdberge.refinedstorage.container.slot.CrafterManagerSlot;
|
||||||
import com.raoulvdberge.refinedstorage.inventory.item.BaseItemHandler;
|
import com.raoulvdberge.refinedstorage.inventory.item.BaseItemHandler;
|
||||||
import com.raoulvdberge.refinedstorage.inventory.item.validator.PatternItemValidator;
|
import com.raoulvdberge.refinedstorage.inventory.item.validator.PatternItemValidator;
|
||||||
|
import com.raoulvdberge.refinedstorage.item.PatternItem;
|
||||||
import com.raoulvdberge.refinedstorage.screen.IScreenInfoProvider;
|
import com.raoulvdberge.refinedstorage.screen.IScreenInfoProvider;
|
||||||
import com.raoulvdberge.refinedstorage.screen.grid.filtering.GridFilterParser;
|
import com.raoulvdberge.refinedstorage.screen.grid.filtering.GridFilterParser;
|
||||||
import com.raoulvdberge.refinedstorage.screen.grid.stack.IGridStack;
|
import com.raoulvdberge.refinedstorage.screen.grid.stack.IGridStack;
|
||||||
import com.raoulvdberge.refinedstorage.screen.grid.stack.ItemGridStack;
|
import com.raoulvdberge.refinedstorage.screen.grid.stack.ItemGridStack;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileCrafterManager;
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
|
||||||
import net.minecraft.inventory.container.Container;
|
|
||||||
import net.minecraft.inventory.container.IContainerListener;
|
|
||||||
import net.minecraft.inventory.container.Slot;
|
import net.minecraft.inventory.container.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.*;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
public class CrafterManagerContainer extends BaseContainer {
|
public class CrafterManagerContainer extends BaseContainer {
|
||||||
public class CrafterManagerListener implements IContainerListener {
|
private IScreenInfoProvider screenInfoProvider;
|
||||||
private ServerPlayerEntity base;
|
private CrafterManagerNetworkNode crafterManager;
|
||||||
private boolean receivedContainerData;
|
|
||||||
|
|
||||||
public CrafterManagerListener(ServerPlayerEntity base) {
|
|
||||||
this.base = base;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServerPlayerEntity getPlayer() {
|
|
||||||
return base;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendAllContents(Container container, NonNullList<ItemStack> items) {
|
|
||||||
if (receivedContainerData) {
|
|
||||||
base.sendAllContents(container, items);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendSlotContents(Container container, int slotInd, ItemStack stack) {
|
|
||||||
if (receivedContainerData) {
|
|
||||||
base.sendSlotContents(container, slotInd, stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setReceivedContainerData() {
|
|
||||||
receivedContainerData = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendWindowProperty(Container container, int varToUpdate, int newValue) {
|
|
||||||
base.sendWindowProperty(container, varToUpdate, newValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IScreenInfoProvider display;
|
|
||||||
private NetworkNodeCrafterManager crafterManager;
|
|
||||||
private Map<String, Integer> containerData;
|
private Map<String, Integer> containerData;
|
||||||
private Map<String, IItemHandlerModifiable> dummyInventories = new HashMap<>();
|
private Map<String, IItemHandlerModifiable> dummyInventories = new HashMap<>();
|
||||||
private Map<String, Integer> headings = new HashMap<>();
|
private Map<String, Integer> headings = new HashMap<>();
|
||||||
private int rows;
|
private int rows;
|
||||||
|
|
||||||
@Override
|
public CrafterManagerContainer(CrafterManagerTile crafterManager, PlayerEntity player, int windowId) {
|
||||||
public void addListener(IContainerListener listener) {
|
|
||||||
if (listener instanceof ServerPlayerEntity) {
|
|
||||||
listener = new CrafterManagerListener((ServerPlayerEntity) listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
super.addListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO add AT for listeners
|
|
||||||
public List<IContainerListener> getListeners() {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CrafterManagerContainer(TileCrafterManager crafterManager, PlayerEntity player, IScreenInfoProvider display, int windowId) {
|
|
||||||
super(RSContainers.CRAFTER_MANAGER, crafterManager, player, windowId);
|
super(RSContainers.CRAFTER_MANAGER, crafterManager, player, windowId);
|
||||||
|
|
||||||
this.display = display;
|
|
||||||
this.crafterManager = crafterManager.getNode();
|
this.crafterManager = crafterManager.getNode();
|
||||||
|
}
|
||||||
|
|
||||||
if (!player.world.isRemote) {
|
public void setScreenInfoProvider(IScreenInfoProvider infoProvider) {
|
||||||
addPlayerInventory(8, display.getYPlayerInventory());
|
this.screenInfoProvider = infoProvider;
|
||||||
|
}
|
||||||
|
|
||||||
if (crafterManager.getNode().getNetwork() != null) {
|
public void initSlotsServer() {
|
||||||
for (Map.Entry<String, List<IItemHandlerModifiable>> entry : crafterManager.getNode().getNetwork().getCraftingManager().getNamedContainers().entrySet()) {
|
addPlayerInventory(8, screenInfoProvider.getYPlayerInventory());
|
||||||
|
|
||||||
|
if (crafterManager.getNetwork() != null) {
|
||||||
|
for (Map.Entry<String, List<IItemHandlerModifiable>> entry : crafterManager.getNetwork().getCraftingManager().getNamedContainers().entrySet()) {
|
||||||
for (IItemHandlerModifiable handler : entry.getValue()) {
|
for (IItemHandlerModifiable handler : entry.getValue()) {
|
||||||
for (int i = 0; i < handler.getSlots(); ++i) {
|
for (int i = 0; i < handler.getSlots(); ++i) {
|
||||||
addSlot(new CrafterManagerSlot(handler, i, 0, 0, true, display, this.crafterManager));
|
addSlot(new CrafterManagerSlot(handler, i, 0, 0, true, screenInfoProvider, this.crafterManager));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initSlots(@Nullable Map<String, Integer> newContainerData) {
|
public void initSlots(@Nullable Map<String, Integer> data) {
|
||||||
if (newContainerData == null) { // We resized
|
if (data != null) {
|
||||||
if (containerData == null) { // No container data received yet, do nothing..
|
this.containerData = data;
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
containerData = newContainerData; // Received container data
|
|
||||||
|
|
||||||
dummyInventories.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.inventorySlots.clear();
|
this.inventorySlots.clear();
|
||||||
// TODO at for inventoryItemStacks this.inventoryItemStacks.clear();
|
this.inventoryItemStacks.clear();
|
||||||
this.headings.clear();
|
this.headings.clear();
|
||||||
|
|
||||||
rows = 0;
|
this.rows = 0;
|
||||||
|
|
||||||
addPlayerInventory(8, display.getYPlayerInventory());
|
addPlayerInventory(8, screenInfoProvider.getYPlayerInventory());
|
||||||
|
|
||||||
int y = 19 + 18 - display.getCurrentOffset() * 18;
|
int y = 19 + 18 - screenInfoProvider.getCurrentOffset() * 18;
|
||||||
int x = 8;
|
int x = 8;
|
||||||
|
|
||||||
List<Predicate<IGridStack>> filters = GridFilterParser.getFilters(null, display.getSearchFieldText(), Collections.emptyList());
|
List<Predicate<IGridStack>> filters = GridFilterParser.getFilters(null, screenInfoProvider.getSearchFieldText(), Collections.emptyList());
|
||||||
|
|
||||||
for (Map.Entry<String, Integer> category : containerData.entrySet()) {
|
for (Map.Entry<String, Integer> category : containerData.entrySet()) {
|
||||||
IItemHandlerModifiable dummy;
|
IItemHandlerModifiable dummy;
|
||||||
|
|
||||||
if (newContainerData == null) { // We're only resizing, get the previous inventory...
|
if (data == null) { // We're only resizing, get the previous inventory...
|
||||||
dummy = dummyInventories.get(category.getKey());
|
dummy = dummyInventories.get(category.getKey());
|
||||||
} else {
|
} else {
|
||||||
dummyInventories.put(category.getKey(), dummy = new BaseItemHandler(category.getValue()) {
|
dummyInventories.put(category.getKey(), dummy = new BaseItemHandler(category.getValue()) {
|
||||||
@@ -160,14 +107,13 @@ public class CrafterManagerContainer extends BaseContainer {
|
|||||||
for (int slot = 0; slot < category.getValue(); ++slot) {
|
for (int slot = 0; slot < category.getValue(); ++slot) {
|
||||||
boolean visible = true;
|
boolean visible = true;
|
||||||
|
|
||||||
if (!display.getSearchFieldText().trim().isEmpty()) {
|
if (!screenInfoProvider.getSearchFieldText().trim().isEmpty()) {
|
||||||
ItemStack stack = dummy.getStackInSlot(slot);
|
ItemStack stack = dummy.getStackInSlot(slot);
|
||||||
|
|
||||||
if (stack.isEmpty()) {
|
if (stack.isEmpty()) {
|
||||||
visible = false;
|
visible = false;
|
||||||
} else {
|
} else {
|
||||||
// TODO CraftingPattern pattern = ItemPattern.getPatternFromCache(crafterManager.getWorld(), stack);
|
CraftingPattern pattern = PatternItem.fromCache(crafterManager.getWorld(), stack);
|
||||||
CraftingPattern pattern = null;
|
|
||||||
|
|
||||||
visible = false;
|
visible = false;
|
||||||
|
|
||||||
@@ -184,7 +130,7 @@ public class CrafterManagerContainer extends BaseContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addSlot(new CrafterManagerSlot(dummy, slot, x, y, visible, display, crafterManager));
|
addSlot(new CrafterManagerSlot(dummy, slot, x, y, visible, screenInfoProvider, crafterManager));
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
foundItemsInCategory = true;
|
foundItemsInCategory = true;
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.raoulvdberge.refinedstorage.container.factory;
|
||||||
|
|
||||||
|
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
||||||
|
import com.raoulvdberge.refinedstorage.screen.EmptyScreenInfoProvider;
|
||||||
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraftforge.fml.network.IContainerFactory;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CrafterManagerContainerFactory implements IContainerFactory<CrafterManagerContainer> {
|
||||||
|
@Override
|
||||||
|
public CrafterManagerContainer create(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||||
|
Map<String, Integer> data = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
BlockPos pos = buf.readBlockPos();
|
||||||
|
|
||||||
|
int size = buf.readInt();
|
||||||
|
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
|
data.put(buf.readString(), buf.readInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
CrafterManagerContainer container = new CrafterManagerContainer((CrafterManagerTile) inv.player.world.getTileEntity(pos), inv.player, windowId);
|
||||||
|
|
||||||
|
container.setScreenInfoProvider(new EmptyScreenInfoProvider());
|
||||||
|
container.initSlots(data);
|
||||||
|
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.raoulvdberge.refinedstorage.container.factory;
|
||||||
|
|
||||||
|
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
||||||
|
import com.raoulvdberge.refinedstorage.screen.EmptyScreenInfoProvider;
|
||||||
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.inventory.container.Container;
|
||||||
|
import net.minecraft.inventory.container.INamedContainerProvider;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
public class CrafterManagerContainerProvider implements INamedContainerProvider {
|
||||||
|
private final CrafterManagerTile tile;
|
||||||
|
|
||||||
|
public CrafterManagerContainerProvider(CrafterManagerTile tile) {
|
||||||
|
this.tile = tile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITextComponent getDisplayName() {
|
||||||
|
return new TranslationTextComponent("gui.refinedstorage.crafter_manager");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) {
|
||||||
|
CrafterManagerContainer container = new CrafterManagerContainer(tile, playerEntity, windowId);
|
||||||
|
|
||||||
|
container.setScreenInfoProvider(new EmptyScreenInfoProvider());
|
||||||
|
container.initSlotsServer();
|
||||||
|
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.raoulvdberge.refinedstorage.container.slot;
|
package com.raoulvdberge.refinedstorage.container.slot;
|
||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCrafterManager;
|
import com.raoulvdberge.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode;
|
||||||
import com.raoulvdberge.refinedstorage.screen.IScreenInfoProvider;
|
import com.raoulvdberge.refinedstorage.screen.IScreenInfoProvider;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
public class CrafterManagerSlot extends BaseSlot {
|
public class CrafterManagerSlot extends BaseSlot {
|
||||||
private boolean visible;
|
private boolean visible;
|
||||||
private NetworkNodeCrafterManager crafterManager;
|
private CrafterManagerNetworkNode crafterManager;
|
||||||
private IScreenInfoProvider display;
|
private IScreenInfoProvider display;
|
||||||
|
|
||||||
public CrafterManagerSlot(IItemHandler itemHandler, int inventoryIndex, int x, int y, boolean visible, IScreenInfoProvider display, NetworkNodeCrafterManager crafterManager) {
|
public CrafterManagerSlot(IItemHandler itemHandler, int inventoryIndex, int x, int y, boolean visible, IScreenInfoProvider display, CrafterManagerNetworkNode crafterManager) {
|
||||||
super(itemHandler, inventoryIndex, x, y);
|
super(itemHandler, inventoryIndex, x, y);
|
||||||
|
|
||||||
this.visible = visible;
|
this.visible = visible;
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.raoulvdberge.refinedstorage.network;
|
|
||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
|
||||||
import net.minecraft.inventory.IContainerListener;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
|
||||||
|
|
||||||
public class MessageCrafterManagerRequestSlotData extends MessageHandlerPlayerToServer<MessageCrafterManagerRequestSlotData> implements IMessage {
|
|
||||||
@Override
|
|
||||||
public void fromBytes(ByteBuf buf) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toBytes(ByteBuf buf) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void handle(MessageCrafterManagerRequestSlotData message, ServerPlayerEntity player) {
|
|
||||||
if (player.openContainer instanceof ContainerCrafterManager) {
|
|
||||||
for (IContainerListener listener : ((ContainerCrafterManager) player.openContainer).getListeners()) {
|
|
||||||
if (listener instanceof ContainerCrafterManager.CrafterManagerListener) {
|
|
||||||
ContainerCrafterManager.CrafterManagerListener cmListener = (ContainerCrafterManager.CrafterManagerListener) listener;
|
|
||||||
|
|
||||||
if (cmListener.getPlayer() == player) {
|
|
||||||
cmListener.setReceivedContainerData();
|
|
||||||
cmListener.sendAllContents(player.openContainer, player.openContainer.getInventory());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
package com.raoulvdberge.refinedstorage.network;
|
|
||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.RS;
|
|
||||||
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
|
||||||
import com.raoulvdberge.refinedstorage.gui.GuiBase;
|
|
||||||
import com.raoulvdberge.refinedstorage.gui.GuiCrafterManager;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import net.minecraftforge.fml.common.network.ByteBufUtils;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class MessageCrafterManagerSlotSizes implements IMessage, IMessageHandler<MessageCrafterManagerSlotSizes, IMessage> {
|
|
||||||
private Map<String, List<IItemHandlerModifiable>> containerData;
|
|
||||||
private Map<String, Integer> containerDataClient = new LinkedHashMap<>();
|
|
||||||
|
|
||||||
public MessageCrafterManagerSlotSizes(Map<String, List<IItemHandlerModifiable>> containerData) {
|
|
||||||
this.containerData = containerData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MessageCrafterManagerSlotSizes() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void fromBytes(ByteBuf buf) {
|
|
||||||
int size = buf.readInt();
|
|
||||||
|
|
||||||
for (int i = 0; i < size; ++i) {
|
|
||||||
containerDataClient.put(ByteBufUtils.readUTF8String(buf), buf.readInt());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toBytes(ByteBuf buf) {
|
|
||||||
buf.writeInt(containerData.size());
|
|
||||||
|
|
||||||
for (Map.Entry<String, List<IItemHandlerModifiable>> entry : containerData.entrySet()) {
|
|
||||||
ByteBufUtils.writeUTF8String(buf, entry.getKey());
|
|
||||||
|
|
||||||
int slots = 0;
|
|
||||||
for (IItemHandlerModifiable handler : entry.getValue()) {
|
|
||||||
slots += handler.getSlots();
|
|
||||||
}
|
|
||||||
buf.writeInt(slots);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IMessage onMessage(MessageCrafterManagerSlotSizes message, MessageContext ctx) {
|
|
||||||
GuiBase.executeLater(GuiCrafterManager.class, crafterManager -> {
|
|
||||||
((ContainerCrafterManager) crafterManager.inventorySlots).initSlots(message.containerDataClient);
|
|
||||||
|
|
||||||
RS.INSTANCE.network.sendToServer(new MessageCrafterManagerRequestSlotData());
|
|
||||||
});
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ package com.raoulvdberge.refinedstorage.screen;
|
|||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
import com.raoulvdberge.refinedstorage.RS;
|
import com.raoulvdberge.refinedstorage.RS;
|
||||||
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCrafterManager;
|
import com.raoulvdberge.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode;
|
||||||
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
||||||
import com.raoulvdberge.refinedstorage.container.slot.CrafterManagerSlot;
|
import com.raoulvdberge.refinedstorage.container.slot.CrafterManagerSlot;
|
||||||
import com.raoulvdberge.refinedstorage.screen.widget.ScrollbarWidget;
|
import com.raoulvdberge.refinedstorage.screen.widget.ScrollbarWidget;
|
||||||
@@ -11,102 +11,43 @@ import com.raoulvdberge.refinedstorage.screen.widget.SearchWidget;
|
|||||||
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.CrafterManagerSearchBoxModeSideButton;
|
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.CrafterManagerSearchBoxModeSideButton;
|
||||||
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.GridSizeSideButton;
|
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.GridSizeSideButton;
|
||||||
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.RedstoneModeSideButton;
|
import com.raoulvdberge.refinedstorage.screen.widget.sidebutton.RedstoneModeSideButton;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileCrafterManager;
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
import com.raoulvdberge.refinedstorage.tile.data.TileDataManager;
|
import com.raoulvdberge.refinedstorage.tile.data.TileDataManager;
|
||||||
import com.raoulvdberge.refinedstorage.util.RenderUtils;
|
import com.raoulvdberge.refinedstorage.util.RenderUtils;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.inventory.container.Slot;
|
import net.minecraft.inventory.container.Slot;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
// TODO @MouseTweaksDisableWheelTweak
|
// TODO @MouseTweaksDisableWheelTweak
|
||||||
public class GuiCrafterManager extends BaseScreen<CrafterManagerContainer> implements IScreenInfoProvider {
|
public class CrafterManagerScreen extends BaseScreen<CrafterManagerContainer> implements IScreenInfoProvider {
|
||||||
private CrafterManagerContainer container;
|
private CrafterManagerNetworkNode crafterManager;
|
||||||
private NetworkNodeCrafterManager crafterManager;
|
|
||||||
|
|
||||||
private ScrollbarWidget scrollbar;
|
private ScrollbarWidget scrollbar;
|
||||||
private SearchWidget searchField;
|
private SearchWidget searchField;
|
||||||
|
|
||||||
public GuiCrafterManager(NetworkNodeCrafterManager crafterManager, PlayerInventory inventory) {
|
public CrafterManagerScreen(CrafterManagerContainer container, PlayerInventory inventory, ITextComponent title) {
|
||||||
super(null, 193, 0, inventory, null);
|
super(container, 193, 0, inventory, title);
|
||||||
|
|
||||||
this.crafterManager = crafterManager;
|
this.crafterManager = ((CrafterManagerTile) container.getTile()).getNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkNodeCrafterManager getCrafterManager() {
|
|
||||||
return crafterManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContainer(CrafterManagerContainer container) {
|
|
||||||
this.container = container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
@Override
|
@Override
|
||||||
protected void calcHeight() {
|
protected void onPreInit() {
|
||||||
this.ySize = getTopHeight() + getBottomHeight() + (getVisibleRows() * 18);
|
this.ySize = getTopHeight() + getBottomHeight() + (getVisibleRows() * 18);
|
||||||
this.ySize = ySize;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getTopHeight() {
|
|
||||||
return 19;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getBottomHeight() {
|
|
||||||
return 99;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getVisibleRows() {
|
|
||||||
switch (crafterManager.getSize()) {
|
|
||||||
case IGrid.SIZE_STRETCH:
|
|
||||||
int screenSpaceAvailable = height - getTopHeight() - getBottomHeight();
|
|
||||||
|
|
||||||
return Math.max(3, Math.min((screenSpaceAvailable / 18) - 3, Integer.MAX_VALUE)); // TODO CrafterManager MaxRowsStretch
|
|
||||||
case IGrid.SIZE_SMALL:
|
|
||||||
return 3;
|
|
||||||
case IGrid.SIZE_MEDIUM:
|
|
||||||
return 5;
|
|
||||||
case IGrid.SIZE_LARGE:
|
|
||||||
return 8;
|
|
||||||
default:
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRows() {
|
|
||||||
return (container == null || !crafterManager.isActive()) ? 0 : container.getRows();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getCurrentOffset() {
|
|
||||||
return scrollbar == null ? 0 : scrollbar.getOffset();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getSearchFieldText() {
|
|
||||||
return searchField == null ? "" : searchField.getText();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getYPlayerInventory() {
|
|
||||||
return getTopHeight() + (getVisibleRows() * 18) + 16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPostInit(int x, int y) {
|
public void onPostInit(int x, int y) {
|
||||||
addSideButton(new RedstoneModeSideButton(this, TileCrafterManager.REDSTONE_MODE));
|
addSideButton(new RedstoneModeSideButton(this, CrafterManagerTile.REDSTONE_MODE));
|
||||||
addSideButton(new CrafterManagerSearchBoxModeSideButton(this));
|
addSideButton(new CrafterManagerSearchBoxModeSideButton(this));
|
||||||
addSideButton(new GridSizeSideButton(this, () -> crafterManager.getSize(), size -> TileDataManager.setParameter(TileCrafterManager.SIZE, size)));
|
addSideButton(new GridSizeSideButton(this, () -> crafterManager.getSize(), size -> TileDataManager.setParameter(CrafterManagerTile.SIZE, size)));
|
||||||
|
|
||||||
this.scrollbar = new ScrollbarWidget(this, 174, getTopHeight(), 12, (getVisibleRows() * 18) - 2);
|
this.scrollbar = new ScrollbarWidget(this, 174, getTopHeight(), 12, (getVisibleRows() * 18) - 2);
|
||||||
this.scrollbar.addListener((oldOffset, newOffset) -> {
|
this.scrollbar.addListener((oldOffset, newOffset) -> container.initSlots(null));
|
||||||
if (container != null) {
|
|
||||||
container.initSlots(null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
container.initSlots(null);
|
container.initSlots(null);
|
||||||
|
|
||||||
@@ -125,6 +66,8 @@ public class GuiCrafterManager extends BaseScreen<CrafterManagerContainer> imple
|
|||||||
searchField.x = sx;
|
searchField.x = sx;
|
||||||
searchField.y = sy;
|
searchField.y = sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addButton(searchField);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,7 +96,7 @@ public class GuiCrafterManager extends BaseScreen<CrafterManagerContainer> imple
|
|||||||
|
|
||||||
blit(x, yy, 0, getTopHeight() + (18 * 3), xSize, getBottomHeight());
|
blit(x, yy, 0, getTopHeight() + (18 * 3), xSize, getBottomHeight());
|
||||||
|
|
||||||
if (container != null && crafterManager.isActive()) {
|
if (crafterManager.isActive()) {
|
||||||
for (Slot slot : container.inventorySlots) {
|
for (Slot slot : container.inventorySlots) {
|
||||||
if (slot instanceof CrafterManagerSlot && slot.isEnabled()) {
|
if (slot instanceof CrafterManagerSlot && slot.isEnabled()) {
|
||||||
blit(x + slot.xPos - 1, y + slot.yPos - 1, 0, 193, 18, 18);
|
blit(x + slot.xPos - 1, y + slot.yPos - 1, 0, 193, 18, 18);
|
||||||
@@ -161,41 +104,14 @@ public class GuiCrafterManager extends BaseScreen<CrafterManagerContainer> imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchField != null) {
|
searchField.render(0, 0, 0);
|
||||||
// TODO render searchField.render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
scrollbar.render();
|
||||||
public boolean mouseClicked(double mouseX, double mouseY, int clickedButton) {
|
|
||||||
boolean clicked = searchField.mouseClicked(mouseX, mouseY, clickedButton);
|
|
||||||
|
|
||||||
if (clicked) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.mouseClicked(mouseX, mouseY, clickedButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
@Override
|
|
||||||
protected void keyTyped(char character, int keyCode) throws IOException {
|
|
||||||
if (searchField == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (checkHotbarKeys(keyCode)) {
|
|
||||||
// NO OP
|
|
||||||
} else if (searchField.textboxKeyTyped(character, keyCode)) {
|
|
||||||
container.initSlots(null);
|
|
||||||
} else {
|
|
||||||
super.keyTyped(character, keyCode);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderForeground(int mouseX, int mouseY) {
|
public void renderForeground(int mouseX, int mouseY) {
|
||||||
renderString(7, 7, I18n.format("gui.refinedstorage:crafter_manager"));
|
renderString(7, 7, title.getFormattedText());
|
||||||
renderString(7, getYPlayerInventory() - 12, I18n.format("container.inventory"));
|
renderString(7, getYPlayerInventory() - 12, I18n.format("container.inventory"));
|
||||||
|
|
||||||
if (container != null && crafterManager.isActive()) {
|
if (container != null && crafterManager.isActive()) {
|
||||||
@@ -216,7 +132,109 @@ public class GuiCrafterManager extends BaseScreen<CrafterManagerContainer> imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double mouseX, double mouseY, int clickedButton) {
|
||||||
|
if (scrollbar.mouseClicked(mouseX, mouseY, clickedButton)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.mouseClicked(mouseX, mouseY, clickedButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) {
|
||||||
|
if (searchField.charTyped(p_charTyped_1_, p_charTyped_2_)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.charTyped(p_charTyped_1_, p_charTyped_2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyPressed(int key, int scanCode, int modifiers) {
|
||||||
|
if (key == GLFW.GLFW_KEY_ESCAPE) {
|
||||||
|
minecraft.player.closeScreen();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchField.keyPressed(key, scanCode, modifiers) || searchField.func_212955_f()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.keyPressed(key, scanCode, modifiers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseMoved(double mx, double my) {
|
||||||
|
scrollbar.mouseMoved(mx, my);
|
||||||
|
|
||||||
|
super.mouseMoved(mx, my);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseReleased(double mx, double my, int button) {
|
||||||
|
return scrollbar.mouseReleased(mx, my, button) || super.mouseReleased(mx, my, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseScrolled(double x, double y, double delta) {
|
||||||
|
return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta);
|
||||||
|
}
|
||||||
|
|
||||||
public SearchWidget getSearchField() {
|
public SearchWidget getSearchField() {
|
||||||
return searchField;
|
return searchField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CrafterManagerNetworkNode getCrafterManager() {
|
||||||
|
return crafterManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTopHeight() {
|
||||||
|
return 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBottomHeight() {
|
||||||
|
return 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVisibleRows() {
|
||||||
|
switch (crafterManager.getSize()) {
|
||||||
|
case IGrid.SIZE_STRETCH:
|
||||||
|
int screenSpaceAvailable = height - getTopHeight() - getBottomHeight();
|
||||||
|
|
||||||
|
return Math.max(3, Math.min((screenSpaceAvailable / 18) - 3, RS.CLIENT_CONFIG.getCrafterManager().getMaxRowsStretch()));
|
||||||
|
case IGrid.SIZE_SMALL:
|
||||||
|
return 3;
|
||||||
|
case IGrid.SIZE_MEDIUM:
|
||||||
|
return 5;
|
||||||
|
case IGrid.SIZE_LARGE:
|
||||||
|
return 8;
|
||||||
|
default:
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRows() {
|
||||||
|
return !crafterManager.isActive() ? 0 : container.getRows();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCurrentOffset() {
|
||||||
|
return scrollbar == null ? 0 : scrollbar.getOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchFieldText() {
|
||||||
|
return searchField == null ? "" : searchField.getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getYPlayerInventory() {
|
||||||
|
return getTopHeight() + (getVisibleRows() * 18) + 16;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.raoulvdberge.refinedstorage.screen.factory;
|
||||||
|
|
||||||
|
import com.raoulvdberge.refinedstorage.container.CrafterManagerContainer;
|
||||||
|
import com.raoulvdberge.refinedstorage.screen.CrafterManagerScreen;
|
||||||
|
import net.minecraft.client.gui.ScreenManager;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
|
||||||
|
public class CrafterManagerScreenFactory implements ScreenManager.IScreenFactory<CrafterManagerContainer, CrafterManagerScreen> {
|
||||||
|
@Override
|
||||||
|
public CrafterManagerScreen create(CrafterManagerContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||||
|
CrafterManagerScreen screen = new CrafterManagerScreen(container, playerInventory, title);
|
||||||
|
|
||||||
|
container.setScreenInfoProvider(screen);
|
||||||
|
|
||||||
|
return screen;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,10 +9,10 @@ import net.minecraft.util.text.ITextComponent;
|
|||||||
public class GridScreenFactory implements ScreenManager.IScreenFactory<GridContainer, GridScreen> {
|
public class GridScreenFactory implements ScreenManager.IScreenFactory<GridContainer, GridScreen> {
|
||||||
@Override
|
@Override
|
||||||
public GridScreen create(GridContainer container, PlayerInventory inv, ITextComponent title) {
|
public GridScreen create(GridContainer container, PlayerInventory inv, ITextComponent title) {
|
||||||
GridScreen grid = new GridScreen(container, container.getGrid(), inv, title);
|
GridScreen screen = new GridScreen(container, container.getGrid(), inv, title);
|
||||||
|
|
||||||
container.setScreenInfoProvider(grid);
|
container.setScreenInfoProvider(screen);
|
||||||
|
|
||||||
return grid;
|
return screen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,32 +2,32 @@ package com.raoulvdberge.refinedstorage.screen.widget.sidebutton;
|
|||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
||||||
import com.raoulvdberge.refinedstorage.integration.jei.JeiIntegration;
|
import com.raoulvdberge.refinedstorage.integration.jei.JeiIntegration;
|
||||||
import com.raoulvdberge.refinedstorage.screen.GuiCrafterManager;
|
import com.raoulvdberge.refinedstorage.screen.CrafterManagerScreen;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileCrafterManager;
|
import com.raoulvdberge.refinedstorage.tile.CrafterManagerTile;
|
||||||
import com.raoulvdberge.refinedstorage.tile.data.TileDataManager;
|
import com.raoulvdberge.refinedstorage.tile.data.TileDataManager;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
|
||||||
public class CrafterManagerSearchBoxModeSideButton extends SideButton {
|
public class CrafterManagerSearchBoxModeSideButton extends SideButton {
|
||||||
public CrafterManagerSearchBoxModeSideButton(GuiCrafterManager screen) {
|
public CrafterManagerSearchBoxModeSideButton(CrafterManagerScreen screen) {
|
||||||
super(screen);
|
super(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTooltip() {
|
public String getTooltip() {
|
||||||
return I18n.format("sidebutton.refinedstorage.grid.search_box_mode") + "\n" + TextFormatting.GRAY + I18n.format("sidebutton.refinedstorage.grid.search_box_mode." + ((GuiCrafterManager) screen).getCrafterManager().getSearchBoxMode());
|
return I18n.format("sidebutton.refinedstorage.grid.search_box_mode") + "\n" + TextFormatting.GRAY + I18n.format("sidebutton.refinedstorage.grid.search_box_mode." + ((CrafterManagerScreen) screen).getCrafterManager().getSearchBoxMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderButtonIcon(int x, int y) {
|
protected void renderButtonIcon(int x, int y) {
|
||||||
int mode = ((GuiCrafterManager) screen).getCrafterManager().getSearchBoxMode();
|
int mode = ((CrafterManagerScreen) screen).getCrafterManager().getSearchBoxMode();
|
||||||
|
|
||||||
screen.blit(x, y, mode == IGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED || mode == IGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ? 16 : 0, 96, 16, 16);
|
screen.blit(x, y, mode == IGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED || mode == IGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ? 16 : 0, 96, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPress() {
|
public void onPress() {
|
||||||
int mode = ((GuiCrafterManager) screen).getCrafterManager().getSearchBoxMode();
|
int mode = ((CrafterManagerScreen) screen).getCrafterManager().getSearchBoxMode();
|
||||||
|
|
||||||
if (mode == IGrid.SEARCH_BOX_MODE_NORMAL) {
|
if (mode == IGrid.SEARCH_BOX_MODE_NORMAL) {
|
||||||
mode = IGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED;
|
mode = IGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED;
|
||||||
@@ -43,6 +43,6 @@ public class CrafterManagerSearchBoxModeSideButton extends SideButton {
|
|||||||
mode = IGrid.SEARCH_BOX_MODE_NORMAL;
|
mode = IGrid.SEARCH_BOX_MODE_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
TileDataManager.setParameter(TileCrafterManager.SEARCH_BOX_MODE, mode);
|
TileDataManager.setParameter(CrafterManagerTile.SEARCH_BOX_MODE, mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,29 +2,29 @@ package com.raoulvdberge.refinedstorage.tile;
|
|||||||
|
|
||||||
import com.raoulvdberge.refinedstorage.RSTiles;
|
import com.raoulvdberge.refinedstorage.RSTiles;
|
||||||
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCrafterManager;
|
import com.raoulvdberge.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode;
|
||||||
import com.raoulvdberge.refinedstorage.screen.BaseScreen;
|
import com.raoulvdberge.refinedstorage.screen.BaseScreen;
|
||||||
import com.raoulvdberge.refinedstorage.screen.GuiCrafterManager;
|
import com.raoulvdberge.refinedstorage.screen.CrafterManagerScreen;
|
||||||
import com.raoulvdberge.refinedstorage.tile.data.TileDataParameter;
|
import com.raoulvdberge.refinedstorage.tile.data.TileDataParameter;
|
||||||
import net.minecraft.network.datasync.DataSerializers;
|
import net.minecraft.network.datasync.DataSerializers;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileCrafterManager extends NetworkNodeTile<NetworkNodeCrafterManager> {
|
public class CrafterManagerTile extends NetworkNodeTile<CrafterManagerNetworkNode> {
|
||||||
public static final TileDataParameter<Integer, TileCrafterManager> SIZE = new TileDataParameter<>(DataSerializers.VARINT, IGrid.SIZE_STRETCH, t -> t.getNode().getSize(), (t, v) -> {
|
public static final TileDataParameter<Integer, CrafterManagerTile> SIZE = new TileDataParameter<>(DataSerializers.VARINT, IGrid.SIZE_STRETCH, t -> t.getNode().getSize(), (t, v) -> {
|
||||||
if (IGrid.isValidSize(v)) {
|
if (IGrid.isValidSize(v)) {
|
||||||
t.getNode().setSize(v);
|
t.getNode().setSize(v);
|
||||||
t.getNode().markDirty();
|
t.getNode().markDirty();
|
||||||
}
|
}
|
||||||
}, (initial, p) -> BaseScreen.executeLater(GuiCrafterManager.class, BaseScreen::init));
|
}, (initial, p) -> BaseScreen.executeLater(CrafterManagerScreen.class, BaseScreen::init));
|
||||||
public static final TileDataParameter<Integer, TileCrafterManager> SEARCH_BOX_MODE = new TileDataParameter<>(DataSerializers.VARINT, 0, t -> t.getNode().getSearchBoxMode(), (t, v) -> {
|
public static final TileDataParameter<Integer, CrafterManagerTile> SEARCH_BOX_MODE = new TileDataParameter<>(DataSerializers.VARINT, 0, t -> t.getNode().getSearchBoxMode(), (t, v) -> {
|
||||||
if (IGrid.isValidSearchBoxMode(v)) {
|
if (IGrid.isValidSearchBoxMode(v)) {
|
||||||
t.getNode().setSearchBoxMode(v);
|
t.getNode().setSearchBoxMode(v);
|
||||||
t.getNode().markDirty();
|
t.getNode().markDirty();
|
||||||
}
|
}
|
||||||
}, (initial, p) -> BaseScreen.executeLater(GuiCrafterManager.class, crafterManager -> crafterManager.getSearchField().setMode(p)));
|
}, (initial, p) -> BaseScreen.executeLater(CrafterManagerScreen.class, crafterManager -> crafterManager.getSearchField().setMode(p)));
|
||||||
|
|
||||||
public TileCrafterManager() {
|
public CrafterManagerTile() {
|
||||||
super(RSTiles.CRAFTER_MANAGER);
|
super(RSTiles.CRAFTER_MANAGER);
|
||||||
|
|
||||||
dataManager.addWatchedParameter(SIZE);
|
dataManager.addWatchedParameter(SIZE);
|
||||||
@@ -32,7 +32,7 @@ public class TileCrafterManager extends NetworkNodeTile<NetworkNodeCrafterManage
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NetworkNodeCrafterManager createNode(World world, BlockPos pos) {
|
public CrafterManagerNetworkNode createNode(World world, BlockPos pos) {
|
||||||
return new NetworkNodeCrafterManager(world, pos);
|
return new CrafterManagerNetworkNode(world, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,41 +1,36 @@
|
|||||||
{
|
{
|
||||||
"forge_marker": 1,
|
|
||||||
"defaults": {
|
|
||||||
"model": "refinedstorage:cube_north_cutout",
|
|
||||||
"textures": {
|
|
||||||
"particle": "refinedstorage:blocks/side",
|
|
||||||
"north": "refinedstorage:blocks/crafter_manager/front",
|
|
||||||
"east": "refinedstorage:blocks/crafter_manager/left",
|
|
||||||
"south": "refinedstorage:blocks/crafter_manager/back",
|
|
||||||
"west": "refinedstorage:blocks/crafter_manager/right",
|
|
||||||
"up": "refinedstorage:blocks/crafter_manager/top",
|
|
||||||
"cutout": "refinedstorage:blocks/crafter_manager/cutouts/front_disconnected",
|
|
||||||
"down": "refinedstorage:blocks/bottom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"variants": {
|
"variants": {
|
||||||
"connected": {
|
"connected=true,direction=north": {
|
||||||
"true": {
|
"model": "refinedstorage:block/crafter_manager_connected",
|
||||||
"textures": {
|
|
||||||
"cutout": "refinedstorage:blocks/crafter_manager/cutouts/front_connected"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"false": {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"direction": {
|
|
||||||
"north": {
|
|
||||||
"y": 0
|
"y": 0
|
||||||
},
|
},
|
||||||
"east": {
|
"connected=true,direction=east": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_connected",
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
"south": {
|
"connected=true,direction=south": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_connected",
|
||||||
"y": 180
|
"y": 180
|
||||||
},
|
},
|
||||||
"west": {
|
"connected=true,direction=west": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_connected",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"connected=false,direction=north": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_disconnected",
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"connected=false,direction=east": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_disconnected",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"connected=false,direction=south": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_disconnected",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"connected=false,direction=west": {
|
||||||
|
"model": "refinedstorage:block/crafter_manager_disconnected",
|
||||||
"y": 270
|
"y": 270
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
"gui.refinedstorage.security_manager.permission.5": "Security",
|
"gui.refinedstorage.security_manager.permission.5": "Security",
|
||||||
"gui.refinedstorage.security_manager.permission.5.tooltip": "Ability to change security options",
|
"gui.refinedstorage.security_manager.permission.5.tooltip": "Ability to change security options",
|
||||||
"gui.refinedstorage.storage_monitor": "Storage Monitor",
|
"gui.refinedstorage.storage_monitor": "Storage Monitor",
|
||||||
"gui.refinedstorage:crafter_manager": "Crafter Manager",
|
"gui.refinedstorage.crafter_manager": "Crafter Manager",
|
||||||
"misc.refinedstorage.energy_stored": "%d / %d FE",
|
"misc.refinedstorage.energy_stored": "%d / %d FE",
|
||||||
"misc.refinedstorage.energy_usage": "Usage: %d FE/t",
|
"misc.refinedstorage.energy_usage": "Usage: %d FE/t",
|
||||||
"misc.refinedstorage.energy_usage_minimal": "%d FE/t",
|
"misc.refinedstorage.energy_usage_minimal": "%d FE/t",
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
"block.refinedstorage.portable_grid": "Portable Grid",
|
"block.refinedstorage.portable_grid": "Portable Grid",
|
||||||
"block.refinedstorage.creative_portable_grid": "Creative Portable Grid",
|
"block.refinedstorage.creative_portable_grid": "Creative Portable Grid",
|
||||||
"block.refinedstorage.portable_grid.tooltip": "Sneak to place in the world.",
|
"block.refinedstorage.portable_grid.tooltip": "Sneak to place in the world.",
|
||||||
"block.refinedstorage:crafter_manager": "Crafter Manager",
|
"block.refinedstorage.crafter_manager": "Crafter Manager",
|
||||||
"item.refinedstorage.1k_storage_disk": "1k Storage Disk",
|
"item.refinedstorage.1k_storage_disk": "1k Storage Disk",
|
||||||
"item.refinedstorage.4k_storage_disk": "4k Storage Disk",
|
"item.refinedstorage.4k_storage_disk": "4k Storage Disk",
|
||||||
"item.refinedstorage.16k_storage_disk": "16k Storage Disk",
|
"item.refinedstorage.16k_storage_disk": "16k Storage Disk",
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"parent": "refinedstorage:block/cube_north_cutout",
|
||||||
|
"textures": {
|
||||||
|
"particle": "refinedstorage:block/side",
|
||||||
|
"north": "refinedstorage:block/crafter_manager/front",
|
||||||
|
"east": "refinedstorage:block/crafter_manager/left",
|
||||||
|
"south": "refinedstorage:block/crafter_manager/back",
|
||||||
|
"west": "refinedstorage:block/crafter_manager/right",
|
||||||
|
"up": "refinedstorage:block/crafter_manager/top",
|
||||||
|
"down": "refinedstorage:block/bottom"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "refinedstorage:block/crafter_manager",
|
||||||
|
"textures": {
|
||||||
|
"cutout": "refinedstorage:block/crafter_manager/cutouts/front_connected"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "refinedstorage:block/crafter_manager",
|
||||||
|
"textures": {
|
||||||
|
"cutout": "refinedstorage:block/crafter_manager/cutouts/front_disconnected"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "refinedstorage:block/crafter_manager_disconnected"
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "refinedstorage:crafter_manager"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -7,14 +7,13 @@
|
|||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"P": {
|
"P": {
|
||||||
"item": "#advanced_processor"
|
"item": "refinedstorage:advanced_processor"
|
||||||
},
|
},
|
||||||
"C": {
|
"C": {
|
||||||
"item": "refinedstorage:crafter"
|
"item": "refinedstorage:crafter"
|
||||||
},
|
},
|
||||||
"G": {
|
"G": {
|
||||||
"type": "forge:ore_dict",
|
"tag": "forge:glass"
|
||||||
"ore": "blockGlass"
|
|
||||||
},
|
},
|
||||||
"E": {
|
"E": {
|
||||||
"item": "refinedstorage:quartz_enriched_iron"
|
"item": "refinedstorage:quartz_enriched_iron"
|
||||||
Reference in New Issue
Block a user