remove out commentec code

run SA
This commit is contained in:
Martin Robertz committed 2022-11-08 19:34:25 +01:00
1 parent b846e30b67
commit 2b27b551a3
795 files changed
+33663 -37253

No files matched your search

@@ -1,67 +1,54 @@
package WayofTime.alchemicalWizardry.common;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage>
{
public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage> {
private byte keyPressed;
public MessageKeyPressed()
{
}
public MessageKeyPressed() {}
public MessageKeyPressed(Key key)
{
if (key == Key.OMEGA_ACTIVE)
{
public MessageKeyPressed(Key key) {
if (key == Key.OMEGA_ACTIVE) {
this.keyPressed = (byte) Key.OMEGA_ACTIVE.ordinal();
}
}
@Override
public void fromBytes(ByteBuf buf)
{
public void fromBytes(ByteBuf buf) {
this.keyPressed = buf.readByte();
}
@Override
public void toBytes(ByteBuf buf)
{
public void toBytes(ByteBuf buf) {
buf.writeByte(keyPressed);
}
@Override
public IMessage onMessage(MessageKeyPressed message, MessageContext ctx)
{
public IMessage onMessage(MessageKeyPressed message, MessageContext ctx) {
EntityPlayer entityPlayer = ctx.getServerHandler().playerEntity;
if(message.keyPressed == Key.OMEGA_ACTIVE.ordinal())
{
if(entityPlayer != null)
{
ItemStack[] armourInventory = entityPlayer.inventory.armorInventory;
if(armourInventory[2] != null)
{
ItemStack chestStack = armourInventory[2];
if(chestStack.getItem() instanceof OmegaArmour)
{
((OmegaArmour)chestStack.getItem()).onOmegaKeyPressed(entityPlayer, chestStack);
}
}
if (message.keyPressed == Key.OMEGA_ACTIVE.ordinal()) {
if (entityPlayer != null) {
ItemStack[] armourInventory = entityPlayer.inventory.armorInventory;
if (armourInventory[2] != null) {
ItemStack chestStack = armourInventory[2];
if (chestStack.getItem() instanceof OmegaArmour) {
((OmegaArmour) chestStack.getItem()).onOmegaKeyPressed(entityPlayer, chestStack);
}
}
}
}
return null;
}
public enum Key
{
OMEGA_ACTIVE
public enum Key {
OMEGA_ACTIVE
}
}