Fix JABBA-related issues with crafting station slots (#54)

* Fix shift-merging tools voiding items

fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392>

* Change 0-sized ItemStacks into null stacks in crafting station attached slots

Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425>

* Update buildscript

* spotlessApply
This commit is contained in:
Raven Szewczyk authored and GitHub committed 2022-09-22 20:51:23 +02:00
1 parent 18bfeaff32
commit 39be06c23b
571 files changed
+25959 -28223

No files matched your search

@@ -1,61 +1,50 @@
package tconstruct.util.network;
import tconstruct.TConstruct;
import tconstruct.armor.TinkerArmor;
import tconstruct.armor.player.TPlayerStats;
import cpw.mods.fml.common.network.ByteBufUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import mantle.common.network.AbstractPacket;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.armor.TinkerArmor;
import tconstruct.armor.player.TPlayerStats;
/**
* This Packet is for sending the players TPlayerStats from the server to the client.
*
*
* @author covers1624
*/
public class ArmourGuiSyncPacket extends AbstractPacket
{
public class ArmourGuiSyncPacket extends AbstractPacket {
NBTTagCompound playerStats = new NBTTagCompound();
public ArmourGuiSyncPacket()
{
}
public ArmourGuiSyncPacket() {}
/**
* For sending the players TPlayerStats to the client.
* @param tag, The players TPlayerStats written to NBT.
*/
public ArmourGuiSyncPacket(NBTTagCompound tag)
{
public ArmourGuiSyncPacket(NBTTagCompound tag) {
playerStats = tag;
}
@Override
public void encodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
{
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
ByteBufUtils.writeTag(buffer, playerStats);
}
@Override
public void decodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
{
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
playerStats = ByteBufUtils.readTag(buffer);
}
@Override
public void handleClientSide (EntityPlayer player)
{
public void handleClientSide(EntityPlayer player) {
TPlayerStats stats = new TPlayerStats(player);
stats.loadNBTData(playerStats);
TinkerArmor.proxy.updatePlayerStats(stats);
}
@Override
public void handleServerSide (EntityPlayer player)
{
//NO-OP. this is a Server -> client packet.
public void handleServerSide(EntityPlayer player) {
// NO-OP. this is a Server -> client packet.
}
}