Personal Chest Pocket Access Config

This controls access to Personal Chests from inventories
This commit is contained in:
DrParadox7 committed 2023-09-25 18:49:06 +02:00
1 parent e900821bd6
commit ea2e3da07d
4 files changed
+24 -19

No files matched your search

@@ -72,7 +72,7 @@ public class MekanismConfig
}
public static class mekce {
public static boolean enableBoPProgression = true;
public static boolean enableBoPProgression;
public static boolean EnableQuartzCompat;
public static boolean EnableDiamondCompat;
public static boolean EnablePoorOresCompat;
@@ -82,8 +82,9 @@ public class MekanismConfig
public static int IC2SourceTier;
public static int digitalMinerMaxRadius;
public static boolean enableSingleUseCardboxes;
public static boolean accurateHeavyWaterCapture = true;
public static int heavyWaterChance = 4;
public static boolean enablePersonalChestPocketAccess;
public static boolean accurateHeavyWaterCapture;
public static int heavyWaterChance;
}
+15 -13
View File
@@ -60,6 +60,8 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.io.File;
import static mekanism.api.MekanismConfig.mekce.enablePersonalChestPocketAccess;
/**
* Client proxy for the Mekanism mod.
* @author AidanBrady
@@ -117,9 +119,9 @@ public class ClientProxy extends CommonProxy
FMLClientHandler.instance().displayGuiScreen(entityplayer, new GuiPersonalChest(entityplayer.inventory, tileEntity));
entityplayer.openContainer.windowId = windowId;
}
else {
else if (enablePersonalChestPocketAccess)
{
ItemStack stack = entityplayer.getCurrentEquippedItem();
if(MachineType.get(stack) == MachineType.PERSONAL_CHEST)
{
InventoryPersonalChest inventory = new InventoryPersonalChest(entityplayer);
@@ -386,29 +388,29 @@ public class ClientProxy extends CommonProxy
case 58:
return new GuiFuelwoodHeater(player.inventory, (TileEntityFuelwoodHeater)tileEntity);
}
return null;
}
@Override
public void handleTeleporterUpdate(PortableTeleporterMessage message)
{
GuiScreen screen = Minecraft.getMinecraft().currentScreen;
if(screen instanceof GuiTeleporter && ((GuiTeleporter)screen).itemStack != null)
{
GuiTeleporter teleporter = (GuiTeleporter)screen;
teleporter.clientStatus = message.status;
teleporter.clientFreq = message.frequency;
teleporter.clientPublicCache = message.publicCache;
teleporter.clientPrivateCache = message.privateCache;
teleporter.clientProtectedCache = message.protectedCache;
teleporter.updateButtons();
}
}
@Override
public void addHitEffects(Coord4D coord, MovingObjectPosition mop)
{
@@ -417,7 +419,7 @@ public class ClientProxy extends CommonProxy
Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(coord.xCoord, coord.yCoord, coord.zCoord, mop);
}
}
@Override
public void doGenericSparkle(TileEntity tileEntity, INodeChecker checker)
{
@@ -432,7 +434,7 @@ public class ClientProxy extends CommonProxy
@Override
public boolean isNode(TileEntity tile)
{
return MultiblockManager.areEqual(tile, tileEntity);
return MultiblockManager.areEqual(tile, tileEntity);
}
}).run();
}
@@ -442,11 +444,11 @@ public class ClientProxy extends CommonProxy
public void loadUtilities()
{
super.loadUtilities();
FMLCommonHandler.instance().bus().register(new ClientPlayerTracker());
FMLCommonHandler.instance().bus().register(new ClientTickHandler());
FMLCommonHandler.instance().bus().register(new RenderTickHandler());
new MekanismKeyHandler();
HolidayManager.init();
@@ -522,7 +524,7 @@ public class ClientProxy extends CommonProxy
{
Minecraft.getMinecraft().effectRenderer.addEffect(new EntityLaser(world, from, to, direction, energy));
}
@Override
public FontRenderer getFontRenderer()
{
@@ -315,7 +315,7 @@ public class CommonProxy implements IGuiProvider
mekce.enableSiliconCompat = Mekanism.configurationce.get("mekce", "EnableSiliconCompat", true, "When a mod that adds silicon (galacticraft, enderio and projectred) is detected, recipe for control circuit is changed from using iron to silicon in the metalurgic infuser").getBoolean();
mekce.digitalMinerMaxRadius = Mekanism.configurationce.get("mekce", "DigitalMinerMaxRadius", 32, "Select range from 1 to 64, we do not recommend going over 32", 1, 64).getInt();
mekce.enableSingleUseCardboxes = Mekanism.configurationce.get("mekce", "EnableSingleUseCardboxes", true, "This allows to force single use on cardboxes or not").getBoolean();
mekce.enablePersonalChestPocketAccess = Mekanism.configurationce.get("mekce", "enablePersonalChestPocketAccess", true, "This allows opening Personal Chests from your inventory without having to place them").getBoolean();
mekce.IC2SinkTier = Mekanism.configurationce.get("mekce", "IC2SinkTier", 4, "Tier level for machines, we recommend setting it to tier 2 for ic2 classic", 1, 4).getInt();
mekce.IC2SourceTier = Mekanism.configurationce.get("mekce", "IC2SourceTier", 4, "Tier level for generators, we recommend setting it to tier 2 for ic2 classic", 1, 4).getInt();
@@ -86,7 +86,8 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
dataStream.writeInt(mekce.IC2SourceTier);
dataStream.writeInt(mekce.digitalMinerMaxRadius);
dataStream.writeBoolean(mekce.enableSingleUseCardboxes);
dataStream.writeBoolean(mekce.enablePersonalChestPocketAccess);
for(MachineType type : MachineType.getValidMachines())
{
dataStream.writeBoolean(machines.isEnabled(type.name));
@@ -281,7 +282,8 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
mekce.IC2SourceTier = dataStream.readInt();
mekce.digitalMinerMaxRadius = dataStream.readInt();
mekce.enableSingleUseCardboxes = dataStream.readBoolean();
mekce.enablePersonalChestPocketAccess = dataStream.readBoolean();
for(MachineType type : MachineType.getValidMachines())
{
machines.setEntry(type.name, dataStream.readBoolean());