Jump to content

[1.7.10]Need help with custom inventory and packets


Jedispencer21

Recommended Posts

So I am new to packets and extended properties and I was wondering if anyone could help me with them. As far as I know, it works... kinda? but the GUI doesn't open when I click my button.

 

Here is my abstract packet class:

 

 

 

package com.feudalcraft.network;

 

import net.minecraft.entity.player.EntityPlayer;

 

import com.feudalcraft.main.MainRegistry;

 

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 cpw.mods.fml.relauncher.Side;

 

public abstract class FeudalPacket<REQ extends IMessage> implements IMessage, IMessageHandler<REQ, REQ>

{

public REQ onMessage(REQ message, MessageContext ctx)

{

if (ctx.side == Side.SERVER)

{

handleServerSide(message, ctx.getServerHandler().playerEntity);

}

else

{

handleClientSide(message, MainRegistry.proxy.getPlayer());

}

return null;

}

 

public abstract void handleClientSide(REQ paramREQ, EntityPlayer paramEntityPlayer);

 

public abstract void handleServerSide(REQ paramREQ, EntityPlayer paramEntityPlayer);

}

 

 

 

Here is my packet handler:

 

 

 

package com.feudalcraft.network;

 

import net.minecraft.entity.player.EntityPlayerMP;

 

import com.feudalcraft.lib.Strings;

import com.feudalcraft.network.play.client.OpenGuiPacket;

import com.feudalcraft.network.play.client.SyncPlayerPropsPacket;

 

import cpw.mods.fml.common.network.NetworkRegistry;

import cpw.mods.fml.common.network.simpleimpl.IMessage;

import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;

import cpw.mods.fml.relauncher.Side;

 

public class FeudalPacketHandler

{

public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(Strings.PACKET_CHANNEL);

private static int discriminant;

 

public static void init()

{

INSTANCE.registerMessage(OpenGuiPacket.class, OpenGuiPacket.class, discriminant++, Side.SERVER);

INSTANCE.registerMessage(OpenGuiPacket.class, OpenGuiPacket.class, discriminant++, Side.CLIENT);

INSTANCE.registerMessage(SyncPlayerPropsPacket.class, SyncPlayerPropsPacket.class, discriminant++, Side.SERVER);

INSTANCE.registerMessage(SyncPlayerPropsPacket.class, SyncPlayerPropsPacket.class, discriminant++, Side.CLIENT);

}

 

public static void sendToAll(IMessage message)

{

INSTANCE.sendToAll(message);

}

 

public static void sendTo(IMessage message, EntityPlayerMP player)

{

INSTANCE.sendTo(message, player);

}

 

public static void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point)

{

INSTANCE.sendToAllAround(message, point);

}

 

public static void sendToDimension(IMessage message, int dimensionId)

{

INSTANCE.sendToDimension(message, dimensionId);

}

 

public static void sendToServer(IMessage message)

{

INSTANCE.sendToServer(message);

}

}

 

 

 

Here is my class that extends IExtendedEntityProperties:

 

 

 

package com.feudalcraft.client.entity.player;

 

import net.minecraft.entity.Entity;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.EntityPlayerMP;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.world.World;

import net.minecraftforge.common.IExtendedEntityProperties;

 

import com.feudalcraft.main.CommonProxy;

import com.feudalcraft.main.MainRegistry;

import com.feudalcraft.network.play.client.SyncPlayerPropsPacket;

 

public class ExtendedPlayer implements IExtendedEntityProperties

{

public final static String EXTENDED_ENTITY_PLAYER = "ExtendedEntityPlayer";

public EntityPlayer player;

public CustomPlayerInventory inventory = new CustomPlayerInventory(player);

 

public ExtendedPlayer(EntityPlayer player)

{

this.player = player;

}

 

public static final void register(EntityPlayer player)

{

player.registerExtendedProperties(ExtendedPlayer.EXTENDED_ENTITY_PLAYER, new ExtendedPlayer(player));

}

 

/**

* Returns ExtendedPlayer properties for player

* This method is for convenience only.

*/

public static final ExtendedPlayer get(EntityPlayer player)

{

return (ExtendedPlayer) player.getExtendedProperties(EXTENDED_ENTITY_PLAYER);

}

 

/**

* Called when the entity that this class is attached to is saved.

* Any custom entity data  that needs saving should be saved here.

* @param compound The compound to save to.

*/

@Override

public void saveNBTData(NBTTagCompound compound)

{

NBTTagCompound properties = new NBTTagCompound();

compound.setTag(EXTENDED_ENTITY_PLAYER, properties);

this.inventory.writeToNBT(properties);

}

 

/**

* Called when the entity that this class is attached to is loaded.

* In order to hook into this, you will need to subscribe to the EntityConstructing event.

* Otherwise, you will need to initialize manually.

* @param compound The compound to load from.

*/

@Override

public void loadNBTData(NBTTagCompound compound)

{

NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXTENDED_ENTITY_PLAYER);

this.inventory.readFromNBT(properties);

}

 

/**

* Used to initialize the extended properties with the entity that this is attached to, as well

* as the world object.

* Called automatically if you register with the EntityConstructing event.

* May be called multiple times if the extended properties is moved over to a new entity.

*  Such as when a player switches dimension {Minecraft re-creates the player entity}

* @param entity  The entity that this extended properties is attached to

* @param world  The world in which the entity exists

*/

@Override

public void init(Entity entity, World world) {}

 

private static final String getSaveKey(EntityPlayer player)

{

return player.getCommandSenderName() + ":" + EXTENDED_ENTITY_PLAYER;

}

 

public static final void loadProxyData(EntityPlayer player)

{

ExtendedPlayer playerData = ExtendedPlayer.get(player);

NBTTagCompound savedData = CommonProxy.getEntityData(getSaveKey(player));

if (savedData != null) { playerData.loadNBTData(savedData); }

MainRegistry.packetFeudal.sendTo(new SyncPlayerPropsPacket(player), (EntityPlayerMP) player);

}

}

 

 

 

My EntityConstructing class:

 

 

 

package com.feudalcraft.handler;

 

import net.minecraft.entity.player.EntityPlayer;

import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;

 

import com.feudalcraft.client.entity.player.ExtendedPlayer;

 

import cpw.mods.fml.common.eventhandler.SubscribeEvent;

 

public class FeudalEventHandler

{

@SubscribeEvent

public void onEntityConstructing(EntityConstructing event)

{

if (event.entity instanceof EntityPlayer && ExtendedPlayer.get((EntityPlayer) event.entity) == null)

ExtendedPlayer.register((EntityPlayer) event.entity);

 

if (event.entity instanceof EntityPlayer && event.entity.getExtendedProperties(ExtendedPlayer.EXTENDED_ENTITY_PLAYER) == null)

event.entity.registerExtendedProperties(ExtendedPlayer.EXTENDED_ENTITY_PLAYER, new ExtendedPlayer((EntityPlayer) event.entity));

}

}

 

 

 

My OpenGuiPacket:

 

 

 

package com.feudalcraft.network.play.client;

 

import io.netty.buffer.ByteBuf;

import net.minecraft.client.Minecraft;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.EntityPlayerMP;

import net.minecraft.inventory.Container;

 

import com.feudalcraft.main.MainRegistry;

import com.feudalcraft.network.FeudalPacket;

import com.feudalcraft.network.FeudalPacketHandler;

 

public class OpenGuiPacket extends FeudalPacket<OpenGuiPacket>

{

int containerId;

int x;

int y;

int z;

 

public OpenGuiPacket(){}

 

public OpenGuiPacket(int containerId)

{

this.containerId = containerId;

}

 

@Override

public void fromBytes(ByteBuf buf)

{

this.containerId = buf.readInt();

 

this.x = buf.readInt();

this.y = buf.readInt();

this.z = buf.readInt();

}

 

@Override

public void toBytes(ByteBuf buf)

{

buf.writeInt(this.containerId);

 

buf.writeInt(this.x);

buf.writeInt(this.y);

    buf.writeInt(this.z);

}

 

@Override

public void handleClientSide(OpenGuiPacket message, EntityPlayer entity)

{

System.out.println("WORKING...?");

    Minecraft.getMinecraft().thePlayer.openContainer.windowId = message.containerId;

}

 

@Override

public void handleServerSide(OpenGuiPacket message, EntityPlayer player)

{

if ((player instanceof EntityPlayerMP))

{

EntityPlayerMP entityPlayer = (EntityPlayerMP)player;

 

Container container = (Container)MainRegistry.guiHandler.getServerGuiElement(message.containerId, entityPlayer, entityPlayer.worldObj, (int)entityPlayer.posZ, (int)entityPlayer.posY, (int)entityPlayer.posZ);

 

if (container != null)

{

entityPlayer.getNextWindowId();

entityPlayer.closeContainer();

 

int windowID = entityPlayer.currentWindowId;

 

entityPlayer.openContainer = container;

entityPlayer.openContainer.windowId = windowID;

 

FeudalPacketHandler.sendTo(new OpenGuiPacket(windowID), entityPlayer);

}

}

}

}

 

 

 

My SyncPlayerPropsPacket:

 

 

 

package com.feudalcraft.network.play.client;

 

import io.netty.buffer.ByteBuf;

import io.netty.channel.ChannelHandlerContext;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.nbt.NBTTagCompound;

 

import com.feudalcraft.client.entity.player.ExtendedPlayer;

import com.feudalcraft.network.FeudalPacket;

 

import cpw.mods.fml.common.network.ByteBufUtils;

import cpw.mods.fml.common.network.simpleimpl.IMessage;

 

public class SyncPlayerPropsPacket extends FeudalPacket<SyncPlayerPropsPacket>

{

private NBTTagCompound data;

 

public SyncPlayerPropsPacket(){}

 

public SyncPlayerPropsPacket(EntityPlayer player)

{

data = new NBTTagCompound();

ExtendedPlayer.get(player).saveNBTData(data);

}

 

@Override

public void fromBytes(ByteBuf buffer)

{

ByteBufUtils.writeTag(buffer, data);

}

 

@Override

public void toBytes(ByteBuf buffer)

{

data = ByteBufUtils.readTag(buffer);

}

 

@Override

public void handleClientSide(SyncPlayerPropsPacket paramREQ, EntityPlayer player)

{

ExtendedPlayer.get(player).loadNBTData(data);

}

 

@Override

public void handleServerSide(SyncPlayerPropsPacket paramREQ, EntityPlayer paramEntityPlayer) {}

}

 

 

 

Custom Inventory Container:

 

 

 

package com.feudalcraft.container;

 

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.inventory.Container;

import net.minecraft.inventory.IInventory;

import net.minecraft.inventory.InventoryCraftResult;

import net.minecraft.inventory.InventoryCrafting;

import net.minecraft.inventory.Slot;

import net.minecraft.inventory.SlotCrafting;

import net.minecraft.item.ItemArmor;

import net.minecraft.item.ItemStack;

import net.minecraft.item.crafting.CraftingManager;

import net.minecraft.util.IIcon;

 

import com.feudalcraft.client.entity.player.CustomPlayerInventory;

import com.feudalcraft.client.entity.player.ExtendedPlayer;

import com.feudalcraft.client.entity.player.SlotAccessory;

import com.feudalcraft.client.entity.player.SlotArmor;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

public class ContainerCustomInventory extends Container

{

/**

* Avoid magic numbers! This will greatly reduce the chance of you making

* errors in 'transferStackInSlot' method

*/

private static final int ARMOR_START = CustomPlayerInventory.INV_SIZE, ARMOR_END = ARMOR_START + 3, INV_START = ARMOR_END + 1, INV_END = INV_START + 26, HOTBAR_START = INV_END + 1, HOTBAR_END = HOTBAR_START + 8;

 

/** The crafting matrix inventory. */

public InventoryCrafting craftMatrix = new InventoryCrafting(this, 2, 2);

public IInventory craftResult = new InventoryCraftResult();

/** Determines if inventory manipulation should be handled. */

public boolean isLocalWorld;

private final EntityPlayer thePlayer;

 

public ContainerCustomInventory(ExtendedPlayer playerExtended, EntityPlayer player)

{

this.thePlayer = player;

}

 

public ContainerCustomInventory(InventoryPlayer inventoryplayer, boolean b, EntityPlayer entityplayer,CustomPlayerInventory inventoryCustom)

{

this.isLocalWorld = b;

this.thePlayer = entityplayer;

this.addSlotToContainer(new SlotCrafting(inventoryplayer.player, this.craftMatrix, this.craftResult, 0, 125, 8 ));

this.addSlotToContainer(new SlotAccessory(inventoryCustom, 0, null, 80, 8 ));

this.addSlotToContainer(new SlotAccessory(inventoryCustom, 1, null, 80, 26));

this.addSlotToContainer(new SlotAccessory(inventoryCustom, 2, null, 80, 44));

this.addSlotToContainer(new SlotAccessory(inventoryCustom, 3, null, 80, 62));

int i;

int j;

 

for (i = 0; i < 2; ++i)

{

for (j = 0; j < 2; ++j)

{

this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 2, 88 + j * 18, 26 + i * 18));

}

}

 

for (i = 0; i < 4; ++i)

{

this.addSlotToContainer(new SlotArmor(entityplayer, inventoryplayer, inventoryplayer.getSizeInventory() - 1 - i, 8, 8 + i * 18, i));

}

 

for (i = 0; i < 4; ++i)

{

            final int k = i;

            this.addSlotToContainer(new Slot(inventoryplayer, inventoryplayer.getSizeInventory() - 1 - i, 8, 8 + i * 18)

            {

            /**

            * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1

            * in the case of armor slots)

            */

            public int getSlotStackLimit()

            {

            return 1;

            }

                /**

                * Check if the stack is a valid item for this slot. Always true beside for the armor slots.

                */

                public boolean isItemValid(ItemStack p_75214_1_)

                {

                    if (p_75214_1_ == null) return false;

                    return p_75214_1_.getItem().isValidArmor(p_75214_1_, k, thePlayer);

                }

                /**

                * Returns the icon index on items.png that is used as background image of the slot.

                */

                @SideOnly(Side.CLIENT)

                public IIcon getBackgroundIconIndex()

                {

                    return ItemArmor.func_94602_b(k);

                }

            });

        }

 

        for (i = 0; i < 3; ++i)

        {

            for (j = 0; j < 9; ++j)

            {

                this.addSlotToContainer(new Slot(inventoryplayer, j + (i + 1) * 9, 8 + j * 18, 84 + i * 18));

            }

        }

 

        for (i = 0; i < 9; ++i)

        {

            this.addSlotToContainer(new Slot(inventoryplayer, i, 8 + i * 18, 142));

        }

 

        this.onCraftMatrixChanged(this.craftMatrix);

    }

 

    /**

    * Callback for when the crafting matrix is changed.

    */

    public void onCraftMatrixChanged(IInventory p_75130_1_)

    {

        this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.thePlayer.worldObj));

    }

 

    /**

    * Called when the container is closed.

    */

    public void onContainerClosed(EntityPlayer p_75134_1_)

    {

        super.onContainerClosed(p_75134_1_);

 

        for (int i = 0; i < 4; ++i)

        {

            ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);

 

            if (itemstack != null)

            {

                p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false);

            }

        }

 

        this.craftResult.setInventorySlotContents(0, (ItemStack)null);

    }

 

    public boolean canInteractWith(EntityPlayer p_75145_1_)

    {

        return true;

    }

 

    /**

    * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.

    */

    public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)

    {

        ItemStack itemstack = null;

        Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);

 

        if (slot != null && slot.getHasStack())

        {

            ItemStack itemstack1 = slot.getStack();

            itemstack = itemstack1.copy();

 

            if (p_82846_2_ == 0)

            {

                if (!this.mergeItemStack(itemstack1, 9, 45, true))

                {

                    return null;

                }

 

                slot.onSlotChange(itemstack1, itemstack);

            }

            else if (p_82846_2_ >= 1 && p_82846_2_ < 5)

            {

                if (!this.mergeItemStack(itemstack1, 9, 45, false))

                {

                    return null;

                }

            }

            else if (p_82846_2_ >= 5 && p_82846_2_ < 9)

            {

                if (!this.mergeItemStack(itemstack1, 9, 45, false))

                {

                    return null;

                }

            }

            else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack())

            {

                int j = 5 + ((ItemArmor)itemstack.getItem()).armorType;

 

                if (!this.mergeItemStack(itemstack1, j, j + 1, false))

                {

                    return null;

                }

            }

            else if (p_82846_2_ >= 9 && p_82846_2_ < 36)

            {

                if (!this.mergeItemStack(itemstack1, 36, 45, false))

                {

                    return null;

                }

            }

            else if (p_82846_2_ >= 36 && p_82846_2_ < 45)

            {

                if (!this.mergeItemStack(itemstack1, 9, 36, false))

                {

                    return null;

                }

            }

            else if (!this.mergeItemStack(itemstack1, 9, 45, false))

            {

                return null;

            }

 

            if (itemstack1.stackSize == 0)

            {

                slot.putStack((ItemStack)null);

            }

            else

            {

                slot.onSlotChanged();

            }

 

            if (itemstack1.stackSize == itemstack.stackSize)

            {

                return null;

            }

 

            slot.onPickupFromSlot(p_82846_1_, itemstack1);

        }

 

        return itemstack;

    }

 

    public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_)

    {

        return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_);

    }

}

 

 

 

Custom Inventory Gui:

 

 

 

package com.feudalcraft.gui;

 

import org.lwjgl.opengl.GL11;

import org.lwjgl.opengl.GL12;

 

import net.minecraft.client.gui.inventory.GuiContainer;

import net.minecraft.client.gui.inventory.GuiContainerCreative;

import net.minecraft.client.renderer.OpenGlHelper;

import net.minecraft.client.renderer.RenderHelper;

import net.minecraft.client.renderer.entity.RenderManager;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.EntityLivingBase;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.util.ResourceLocation;

 

import com.feudalcraft.client.entity.player.ContainerCustomPlayerInventory;

import com.feudalcraft.client.entity.player.CustomPlayerInventory;

import com.feudalcraft.client.entity.player.ExtendedPlayer;

import com.feudalcraft.container.ContainerCustomInventory;

import com.feudalcraft.lib.Strings;

 

import cpw.mods.fml.relauncher.*;

 

@SideOnly(Side.CLIENT)

public class GuiCustomInventory extends GuiContainer

{

/** x size of the inventory window in pixels. Defined as  float, passed as int */

private float xSizeFloat;

/** y size of the inventory window in pixels. Defined as  float, passed as int. */

private float ySizeFloat;

/** Could use IInventory type to be more generic, but this way will save an import... */

private CustomPlayerInventory customInventory = new CustomPlayerInventory();

 

public static final ResourceLocation inventory = new ResourceLocation(Strings.MOD_ID + ":textures/gui/inventory.png");

 

public GuiCustomInventory(ExtendedPlayer openingPlayer)

{

super(new ContainerCustomInventory(openingPlayer, openingPlayer.player));

this.allowUserInput = true;

}

 

public GuiCustomInventory(EntityPlayer player, InventoryPlayer inventoryPlayer, CustomPlayerInventory inventoryCustom)

{

super(new ContainerCustomPlayerInventory(player, inventoryPlayer, inventoryCustom));

this.customInventory = inventoryCustom;

this.allowUserInput = true;

System.out.println("This is in GuiCustomInventory");

}

 

/**

* Draw the foreground layer for the GuiContainer (everything in front of the items)

*/

protected void drawGuiContainerForegroundLayer(int i, int j)

{

String s = this.customInventory.hasCustomInventoryName() ? this.customInventory.getInventoryName() : I18n.format(this.customInventory.getInventoryName());

this.fontRendererObj.drawString(s, this.xSize - this.fontRendererObj.getStringWidth(s), 12, 4210752);

this.fontRendererObj.drawString(I18n.format("container.inventory"), 80, this.ySize - 96, 4210752);

this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 120, 2, 4210752);

}

 

/**

* Draws the screen and all the components in it.

*/

public void drawScreen(int i, int j, float f)

{

super.drawScreen(i, j, f);

this.xSizeFloat = (float)i;

this.ySizeFloat = (float)j;

}

 

/**

* Draw the background layer for the GuiContainer (everything behind the items)

*/

protected void drawGuiContainerBackgroundLayer(float f, int i, int j)

{

GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

this.mc.getTextureManager().bindTexture(inventory);

int k = this.guiLeft;

int l = this.guiTop;

this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

func_147046_a(k + 51, l + 75, 30, (float)(k + 51) - this.xSizeFloat, (float)(l + 75 - 50) - this.ySizeFloat, this.mc.thePlayer);

}

 

public static void func_147046_a(int x, int y, int z, float f, float f1, EntityLivingBase entitylivingbase)

{

GL11.glEnable(GL11.GL_COLOR_MATERIAL);

GL11.glPushMatrix();

GL11.glTranslatef((float)x, (float)y, 50.0F);

GL11.glScalef((float)(-z), (float)z, (float)z);

GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);

float f2 = entitylivingbase.renderYawOffset;

float f3 = entitylivingbase.rotationYaw;

float f4 = entitylivingbase.rotationPitch;

float f5 = entitylivingbase.prevRotationYawHead;

float f6 = entitylivingbase.rotationYawHead;

GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);

RenderHelper.enableStandardItemLighting();

GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);

GL11.glRotatef(-((float)Math.atan((double)(f1 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);

entitylivingbase.renderYawOffset = (float)Math.atan((double)(f / 40.0F)) * 20.0F;

entitylivingbase.rotationYaw = (float)Math.atan((double)(f / 40.0F)) * 40.0F;

entitylivingbase.rotationPitch = -((float)Math.atan((double)(f1 / 40.0F))) * 20.0F;

entitylivingbase.rotationYawHead = entitylivingbase.rotationYaw;

entitylivingbase.prevRotationYawHead = entitylivingbase.rotationYaw;

GL11.glTranslatef(0.0F, entitylivingbase.yOffset, 0.0F);

RenderManager.instance.playerViewY = 180.0F;

RenderManager.instance.renderEntityWithPosYaw(entitylivingbase, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);

entitylivingbase.renderYawOffset = f2;

entitylivingbase.rotationYaw = f3;

entitylivingbase.rotationPitch = f4;

entitylivingbase.prevRotationYawHead = f5;

entitylivingbase.rotationYawHead = f6;

GL11.glPopMatrix();

RenderHelper.disableStandardItemLighting();

GL11.glDisable(GL12.GL_RESCALE_NORMAL);

OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);

GL11.glDisable(GL11.GL_TEXTURE_2D);

OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);

}

}

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i have the decocraft mod and i can see all of them. i can click right click and place the items but as soon as i put it down it disappears. im so sad it doesnt work and i dont know how to fix it. i used cursed forge to launch minecraft as well.
    • Me and my friend wanted to make a custom mod pack hosted on aternos. I downloaded the same mods as the server then started the server and my minecraft and I joined the server without issues. Then I sent the mods to my friend compressed in a zip folder (i don’t know if that has anything to do with the issue). He unpacked it put it in his mod folder and started it but couldn't join the server and got this issue:   internal exception: java.lang.runtimeexception: server not initialized yet! call IMDLib.entityHandler (modid)   Also we are using curseforge launcher to manage the mods on client side. But as I said it works on my side but not with my friend, that’s why it doesn’t make sense   Mod list:   xplosives-1.2.0.jar whisperwoods-1.18.2-2.1.0-forge.jar waystones-forge-1.18.2-10.2.2.jar voicechat-forge-1.18.2-2.4.32.jar trashslot-forge-1.18.2-11.0.3.jar towns_and_towers_forge-1.10.0.1+1.18.2.jar torchmaster-18.2.1.jar ToolBelt-1.18.2-1.18.9.jar toms_storage-1.18.2-1.4.4.jar swingthroughgrass-1.18.2-1.9.1.jar strictly_origins_v5.1_1.18.2.jar starlight-1.0.2+forge.546ae87.jar SpartanWeaponry-1.18.2-3.0.4.jar SimpleQuarry-1.18.2-18.2.5.jar simpleplanes-1.18.2-5.2.2.jar secretrooms-1.18.2-1.1.5.jar right-click-harvest-3.2.0+1.18.2-forge.jar REIPluginCompatibilities-forge-8.0.89.jar RoughlyEnough|tems-8.3.681-forge.jar RegionsUnexploredForge-0.4.1_1+1.18.2.jar TerraBlender-forge-1.18.2-1.2.0.126.jar Recall_Potion_v1.0.3-1.18.2.jar Quark-3.2-358.jar PickleTweaks-1.18.2-6.1.2.jar Pehkui-3.7.11+1.18.2-forge.jar Origins-1.18.2-1.4.1.4-unified.jar naturalist-forge-1.1.1-1.18.2.jar mysticaloaktree-1.18.2-1.2.jar selene-1.18.2-1.17.14.jar MysticalAgradditions-1.18.2-5.1.4.jar MysticalAgriculture-1.18.2-5.1.5.jar MultiMine-1.18.7.jar moyai-1.18.2-1.1.4.jar ModernDynamicSurroundings-5.0.0.4.jar lootbeams-1.18.1-release-july1722.jar journeymap-1.18.2-5.9.7-forge.jar ironfurnaces-1.18.2-3.3.3.jar ironchest-1.18.2-13.2.11.jar industrial-foregoing-1.18.2-3.3.1.6-10.jar titanium-1.18.2-3.5.11-45.jar immersive_armors-1.5.6+1.18.2-forge.jar hardcorerevival-forge-1.18.2-8.0.1.jar HammerLib-1.18.2-18.2.16. jar gravestone-1.18.2-1.0.1.jar geckolib-forge-1.18-3.0.57.jar findme-3.0.6-forge.jar faithfulbackrooms3.0.0.7.jar elevatorid-1.18.2-1.8.4.jar EasyMagic-v3.3.0-1.18.2-Forge.jar PuzzlesLib-v3.5.9-1.18.2-Forge.jar easy_villagers-1.18.2-1.0.11.jar easy_mob_farm_1.18.2-7.1.0.jar DynamicTrees-1.18.2-1.0.4.jar dragonseeker-1.1.1-1.18.2.jar iceandfire-2.1.12-1.18.2.jar Cucumber-1.18.2-5.1.5 jar cloth-config-6.5.116-forge.jar citadel-1.11.3-1.18.2.jar chunkloaders-1.2.8a-forge-mc1.18.jar supermartijn642configlib-1.1.8-forge-mc1.18.jar supermartijn642corelib-1.1.17-forge-mc1.18.jar cave_dweller-1.18.2-1.6.4.jar carryon-1.18.2-1.17.1.12.jar caelus-forge-1.18.1-3.0.0.2.jar BotanyTrees-Forge-1.18.2-4.0.13.jar BotanyPots-Forge-1.18.2-8.1.29.jar Bookshelf-Forge-1.18.2-13.3.56.jar balm-3.2.6.jar AutoRegLib-1.7-53.jar ars_nouveau-1.18.2-2.9.0.jar curios-forge-1.18.2-5.0.9.2.jar Patchouli-1.18.2-71.1.jar architectury-4.12.94-forge.jar almostunified-forge-1.18.2-0.3.10.jar [1.18.2] SecurityCraft v1.9.8.jar
    • Thank you for trying, I really appreciate it
    • It worked! Now I can run my modpack without crashes, thanks!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.