mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 22:34:21 +00:00
Fixed Logistical Transporter packet issue, fixed JEI crashes
This commit is contained in:
1 parent
afd3525a4b
commit
bfef18c0d3
6 files changed
+14
-49
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.jei;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -180,6 +181,6 @@ public abstract class BaseRecipeCategory implements IRecipeCategory, IGuiWrapper
|
||||
@Override
|
||||
public List getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
return null;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -114,16 +114,4 @@ public class AdvancedMachineRecipeCategory extends BaseRecipeCategory
|
||||
itemStacks.set(1, ((ItemStackOutput)tempRecipe.recipeOutput).output);
|
||||
itemStacks.set(2, ((AdvancedMachineRecipeWrapper)recipeWrapper).getFuelStacks(input.gasType));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -104,16 +104,4 @@ public class ChanceMachineRecipeCategory extends BaseRecipeCategory
|
||||
itemStacks.set(2, output.secondaryOutput);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -90,16 +90,4 @@ public class MachineRecipeCategory extends BaseRecipeCategory
|
||||
|
||||
itemStacks.set(ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,11 @@ public class PacketHandler
|
||||
try {
|
||||
for(Object data : dataValues)
|
||||
{
|
||||
if(data instanceof Integer)
|
||||
if(data instanceof Byte)
|
||||
{
|
||||
output.writeByte((Byte)data);
|
||||
}
|
||||
else if(data instanceof Integer)
|
||||
{
|
||||
output.writeInt((Integer)data);
|
||||
}
|
||||
@@ -178,10 +182,6 @@ public class PacketHandler
|
||||
{
|
||||
writeString(output, (String)data);
|
||||
}
|
||||
else if(data instanceof Byte)
|
||||
{
|
||||
output.writeByte((Byte)data);
|
||||
}
|
||||
else if(data instanceof EnumFacing)
|
||||
{
|
||||
output.writeInt(((EnumFacing)data).ordinal());
|
||||
|
||||
@@ -190,16 +190,16 @@ public class TileEntityLogisticalTransporter extends TileEntityTransmitter<IInve
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream) throws Exception
|
||||
{
|
||||
tier = TransporterTier.values()[dataStream.readInt()];
|
||||
|
||||
super.handlePacketData(dataStream);
|
||||
|
||||
if(FMLCommonHandler.instance().getSide().isClient())
|
||||
{
|
||||
int type = dataStream.readInt();
|
||||
|
||||
|
||||
if(type == 0)
|
||||
{
|
||||
super.handlePacketData(dataStream);
|
||||
|
||||
tier = TransporterTier.values()[dataStream.readInt()];
|
||||
|
||||
int c = dataStream.readInt();
|
||||
|
||||
EnumColor prev = getTransmitter().getColor();
|
||||
@@ -252,11 +252,11 @@ public class TileEntityLogisticalTransporter extends TileEntityTransmitter<IInve
|
||||
@Override
|
||||
public ArrayList<Object> getNetworkedData(ArrayList<Object> data)
|
||||
{
|
||||
data.add(tier.ordinal());
|
||||
data.add(0);
|
||||
|
||||
super.getNetworkedData(data);
|
||||
|
||||
data.add(0);
|
||||
data.add(tier.ordinal());
|
||||
|
||||
if(getTransmitter().getColor() != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user