Jump to content

Recommended Posts

Posted

hello. I did create a machine with that you can create Modules.

Now i have a bug i saw at EE3 (Direwolf20MPLP), that you can not use the transmuationcrafting.

Now i have the same problem. I want to create a new Item in the same slot (in this case a diamond) and it transforms back into my Item^^ i have no idea how that happends^^.

 

Here My ModulMaker source! I am not on 1.6/1.5. I still work on 1.4. But the code is the same.

 

package speiger.src.tinychest.common.tileentity.machines.machine;

import cpw.mods.fml.common.FMLLog;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.liquids.LiquidStack;
import speiger.src.api.api.ICable;
import speiger.src.api.api.IMachine;
import speiger.src.api.api.modules.advanced.ModulMakerRecipeRegister;
import speiger.src.api.common.functions.WorldReading;
import speiger.src.api.common.tile.TileFacing;
import speiger.src.tinychest.common.config.TinyItems;
import speiger.src.tinychest.common.items.module.ItemEmptyModul;
import speiger.src.tinychest.common.items.module.ModulCore;

public class ModuleMaker extends TileFacing implements IInventory, IMachine
{
public int[] button = new int[3];
public int[] progressButton = new int[6];
public ItemStack[] modulStack = new ItemStack[8];
public int progress = 0;
public int maxProgress = 7200;
public int mode = 0;
public int progressmode = 0;
public int energy = 0;
public int maxEnergy = 100000;

private void updateButtons() 
{
	if(button[0] > 0)
	{
		mode = 1;
	}
	if(button[1] > 0)
	{
		mode = 2;
	}
	if(button[2] > 0)
	{
		mode = 3;
	}

	if(progressButton[0] > 0)
	{
		progressmode = 1;
	}
	if(progressButton[1] > 0)
	{
		progressmode = 2;
	}
	if(progressButton[2] > 0)
	{
		progressmode = 3;
	}
	if(progressButton[3] > 0)
	{
		progressmode = 4;
	}
	if(progressButton[4] > 0)
	{
		progressmode = 5;
	}
	if(progressButton[5] > 0)
	{
		progressmode = 6;
	}

}

@Override
public int getSizeInventory() 
{
	return this.modulStack.length;
}

    public ItemStack getStackInSlot(int par1)
    {
        return this.modulStack[par1];
    }

    public ItemStack decrStackSize(int par1, int par2)
    {
        if (this.modulStack[par1] != null)
        {
            ItemStack var3;

            if (this.modulStack[par1].stackSize <= par2)
            {
                var3 = this.modulStack[par1];
                this.modulStack[par1] = null;
                return var3;
            }
            else
            {
                var3 = this.modulStack[par1].splitStack(par2);

                if (this.modulStack[par1].stackSize == 0)
                {
                    this.modulStack[par1] = null;
                }

                return var3;
            }
        }
        else
        {
            return null;
        }
    }
   
    public ItemStack getStackInSlotOnClosing(int par1)
    {
        if (this.modulStack[par1] != null)
        {
            ItemStack var2 = this.modulStack[par1];
            this.modulStack[par1] = null;
            return var2;
        }
        else
        {
            return null;
        }
    }

    public void setInventorySlotContents(int par1, ItemStack par2ItemStack)
    {
        this.modulStack[par1] = par2ItemStack;

        if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())
        {
            par2ItemStack.stackSize = this.getInventoryStackLimit();
        }
    }

    public String getInvName()
    {
        return "Module Maker";
    }

public int getInventoryStackLimit() 
{
	return 1;
}

public boolean isUseableByPlayer(EntityPlayer var1) 
{
	return true;
}

public void openChest() 
{
}

@Override
public void closeChest() 
{
}

@Override
public void updateEntity() 
{
	super.updateEntity();
	updateButtons();
	updateCable();
	createModul();
}

public void createModul()
{
	if(progressmode == 1)
	{
		createCleanModul();
	}
	if(progressmode == 2)
	{
		setModulKind();
	}


}

public void setModulKind() 
{

}

public void createCleanModul() 
{

	if(modulStack[0] != null && modulStack[0].getItem() instanceof ModulCore)
	{
		progress+= 10;
		FMLLog.getLogger().info("Progress: "+progress);
		if(progress >= getProgressFromMode())
		{
			progress = 0;
			ItemStack par1 = new ItemStack(Item.diamond, 1);
			modulStack[0] = null;
			modulStack[0] = par1.copy();




		}
	}

}

public int getProgressFromMode() 
{
	if(mode == 1)return maxProgress / 2;
	else if(mode == 2)return maxProgress;
	else return maxProgress*2;
}

public void updateCable()
{
	for(int i = 0;i<6;i++)
	{
		TileEntity tile = WorldReading.getTileEntity(worldObj, xCoord, yCoord, zCoord, i);
		if(tile != null && tile instanceof ICable)
		{
			ICable ic = (ICable) tile;
			ic.setPriorty(0);
		}
	}
}

@Override
public boolean needEnergie() 
{
	return energy < maxEnergy;
}

@Override
public int getMaxStoredEnergy() 
{
	return maxEnergy;
}

@Override
public int getStoredEnergy() 
{
	return energy;
}

@Override
public void sendEnergyToMachine(int i) 
{
	energy += i;
}

@Override
public int getTransferlimit() 
{
	return 128;
}

@Override
public int getEnergyOutOfMachine(int i)
{
	return 0;
}

@Override
public boolean hasLiquidContainer() 
{
	return false;
}

@Override
public boolean needsLiquid() 
{
	return false;
}

@Override
public boolean hasFinalLiquid() 
{
	return false;
}

@Override
public boolean hasLiquid() 
{
	return false;
}

@Override
public LiquidStack getLiquidID() 
{
	return null;
}

@Override
public int getStoredLiquid() 
{
	return 0;
}

@Override
public int getMaxLiquidLevel() 
{
	return 0;
}

@Override
public void setLiquidID(LiquidStack par1) 
{
}

@Override
public void sendLiquid(int i)
{
}

@Override
public int suckLiquidOutOfMachine(int i) 
{
	return 0;
}





}

 

Can you help me with that bug?

 

Posted

If you don't want to help me then tell it and don't let me wait hours for an answer!

And if you do not know how to fix it tell it me too.

Posted

Man, this is a forum, anyone can chose to answer or not.

 

                                progress = 0;
			ItemStack par1 = new ItemStack(Item.diamond, 1);
			modulStack[0] = null;
			modulStack[0] = par1.copy();

can't you just do instead:

setInventorySlotContents(0, new ItemStack(Item.diamond));

 

Posted

Man, this is a forum, anyone can chose to answer or not.

 

                                progress = 0;
			ItemStack par1 = new ItemStack(Item.diamond, 1);
			modulStack[0] = null;
			modulStack[0] = par1.copy();

can't you just do instead:

setInventorySlotContents(0, new ItemStack(Item.diamond));

 

 

i already tried this way^^ The item still Transform back to the old Item!

 

Posted

Ok i did find out what the problem is!

My buttoncode is the problem! Without that i can make the items without problems.

Now my Problem is i can not work without my Buttons^^.

I mean the RecipeList ist to complex to do it without buttons.

So the question is how do i fix it?

Do you need more source to find the error?

 

Posted

Here is my Whole source.

 

Gui ModuleMaker


package speiger.src.tinychest.client.gui.machines.machine;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector;

import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;

import cpw.mods.fml.common.FMLLog;

import speiger.src.tinychest.common.container.machines.machine.ContainerModulMaker;
import speiger.src.tinychest.common.tileentity.machines.machine.ModuleMaker;

public class GuiModuleMaker extends GuiContainer 
{
private ModuleMaker tile;

public GuiModuleMaker(InventoryPlayer par1, ModuleMaker par2) 
{
	super(new ContainerModulMaker(par1, par2));
	tile = par2;
	this.ySize = 232;
	this.xSize = 211;
}


protected void drawGuiContainerForegroundLayer(int par1, int par2)
    {
	this.fontRenderer.drawString("Fast", 38, 128, 0xffffff);
	this.fontRenderer.drawString("Med", 80, 128, 0xffffff);
	this.fontRenderer.drawString("Slow", 118, 128, 0xffffff);
        this.fontRenderer.drawString("Module Maker", 65, 6, 4210752);
        this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 5, 4210752);
        this.fontRenderer.drawString("Clearing", 153, 10, 0xffffff);
        this.fontRenderer.drawString("Specify", 155, 30, 0xffffff);
        this.fontRenderer.drawString("Production", 146, 50, 0xffffff);
        this.fontRenderer.drawString("AdvProduct", 144, 70, 0xffffff);
        this.fontRenderer.drawString("Upgrade", 153, 90, 0xffffff);
        this.fontRenderer.drawString("Fuel", 164, 110, 0xffffff);
    }

    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    {
        int var4 = this.mc.renderEngine.getTexture("/speiger/src/tinychest/textures/ModuleMaker.png");
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.renderEngine.bindTexture(var4);
        int var5 = (this.width - this.xSize) / 2;
        int var6 = (this.height - this.ySize) / 2;
        this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
        int var7;
        


  
        if(tile.button[0] == 1)
        {
        	this.drawTexturedModalRect(32 + var5, 81 + var6 + 44, 222, 41, 35, 15);
       	}
       	if(tile.button[1] == 1)
       	{
       		this.drawTexturedModalRect(72 + var5, 81 + var6 + 44, 222, 41, 35, 15);
       	}
       	if(tile.button[2] == 1)
       	{
       		this.drawTexturedModalRect(112 + var5, 81 + var6 + 44, 222, 41, 35, 15);
        }
        
       	if(tile.progressButton[0] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 6 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[1] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 26 + var6, 138, 234, 64, 15);
       	}
        
       	if(tile.progressButton[2] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 46 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[3] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 66 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[4] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 86 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[5] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 106 + var6, 138, 234, 64, 15);
       	}
       	
       	
       	
       	
       	
        
    }

    
    public int getButtonprosition(int x, int y) 
    {
    	if(x>=33 && x<=64 && y>=125 && y<=139)return 1;
    	else if(x>=73 && x<=104 && y>=125 && y<=139)return 2;
    	else if(x>=113 && x<=144 && y>=125 && y<=139)return 3;
    	
    	else if(x>=141 && x<=204 && y>=6 && y<=20)return 4;
    	else if(x>=141 && x<=204 && y>=26 && y<=40)return 5;
    	else if(x>=141 && x<=204 && y>=46 && y<=60)return 6;
//    	else if(x>=141 && x<=204 && y>=66 && y<=80)return 7;
//    	else if(x>=141 && x<=204 && y>=86 && y<=100)return 8;
//    	else if(x>=141 && x<=204 && y>=106 && y<=120)return 9;
    	else return 0;
    }
    

    


@Override
protected void mouseClicked(int par1, int par2, int par3) 
{
	super.mouseClicked(par1, par2, par3);


	int cornerX = (width - xSize) / 2;
	int cornerY = (height - ySize) / 2;
	int prosition = getButtonprosition(par1 - cornerX, par2 - cornerY);
	if(prosition != 0)
	{
		tile.progress = 0;
		if(prosition == 1)
		{
			tile.button[0] = 1;
			tile.button[1] = 0;
			tile.button[2] = 0;
		}
		if(prosition == 2)
		{
			tile.button[0] = 0;
			tile.button[1] = 1;
			tile.button[2] = 0;
		}
		if(prosition == 3)
		{
			tile.button[0] = 0;
			tile.button[1] = 0;
			tile.button[2] = 1;
		}

		if(prosition == 4)
		{
			tile.progressButton[0] = 1;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 5)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 1;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 6)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 1;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 7)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 1;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 1;
			tile.progressButton[5] = 0;
		}

		if(prosition == 9)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 1;
		}
	}
}

}

 

ContainerModuleMaker:

package speiger.src.tinychest.common.container.machines.machine;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import speiger.src.tinychest.common.tileentity.machines.machine.ModuleMaker;

public class ContainerModulMaker extends Container 
{

public ContainerModulMaker(InventoryPlayer par1, ModuleMaker par2) 
{
	this.addSlotToContainer(new Slot(par2, 0, 79, 21));//Circuit Slot
	this.addSlotToContainer(new Slot(par2, 1, 79, 54)); //Modul Input
	this.addSlotToContainer(new Slot(par2, 2, 112, 54)); //OutputSlot
	this.addSlotToContainer(new Slot(par2, 3, 36, 10)); //Input Slot 1
	this.addSlotToContainer(new Slot(par2, 4, 36, 32)); //Input Slot 2
	this.addSlotToContainer(new Slot(par2, 5, 36, 54)); //Input Slot 3
	this.addSlotToContainer(new Slot(par2, 6, 36, 76)); //Input Slot 4
	this.addSlotToContainer(new Slot(par2, 7, 36, 98)); //Input Slot 5


        int var3;

        for (var3 = 0; var3 < 3; ++var3)
        {
            for (int var4 = 0; var4 < 9; ++var4)
            {
                this.addSlotToContainer(new Slot(par1, var4 + var3 * 9 + 9, 9 + var4 * 18, 151 + var3 * 18));
            }
        }

        for (var3 = 0; var3 < 9; ++var3)
        {
            this.addSlotToContainer(new Slot(par1, var3, 9 + var3 * 18, 209));
        }
}

@Override
public boolean canInteractWith(EntityPlayer var1)
{
	return true;
}

@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) 
{
	return null;
}



}

 

TileEntity ModuleMaker

package speiger.src.tinychest.common.tileentity.machines.machine;

import cpw.mods.fml.common.FMLLog;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.liquids.LiquidStack;
import speiger.src.api.api.ICable;
import speiger.src.api.api.IMachine;
import speiger.src.api.api.modules.advanced.ModulMakerRecipeRegister;
import speiger.src.api.common.functions.WorldReading;
import speiger.src.api.common.tile.TileFacing;
import speiger.src.tinychest.common.config.TinyItems;
import speiger.src.tinychest.common.items.module.ItemEmptyModul;
import speiger.src.tinychest.common.items.module.ModulCore;

public class ModuleMaker extends TileFacing implements IInventory, IMachine
{
public int[] button = new int[3];
public int[] progressButton = new int[6];
public ItemStack[] modulStack = new ItemStack[8];
public int progress = 0;
public int maxProgress = 7200;
public int mode = 0;
public int progressmode = 0;
public int energy = 0;
public int maxEnergy = 100000;

private void updateButtons() 
{
	if(button[0] > 0)
	{
		mode = 1;
	}
	if(button[1] > 0)
	{
		mode = 2;
	}
	if(button[2] > 0)
	{
		mode = 3;
	}

	if(progressButton[0] > 0)
	{
		progressmode = 1;
	}
	if(progressButton[1] > 0)
	{
		progressmode = 2;
	}
	if(progressButton[2] > 0)
	{
		progressmode = 3;
	}
	if(progressButton[3] > 0)
	{
		progressmode = 4;
	}
	if(progressButton[4] > 0)
	{
		progressmode = 5;
	}
	if(progressButton[5] > 0)
	{
		progressmode = 6;
	}

}

@Override
public int getSizeInventory() 
{
	return this.modulStack.length;
}

    public ItemStack getStackInSlot(int par1)
    {
        return this.modulStack[par1];
    }

    public ItemStack decrStackSize(int par1, int par2)
    {
        if (this.modulStack[par1] != null)
        {
            ItemStack var3;

            if (this.modulStack[par1].stackSize <= par2)
            {
                var3 = this.modulStack[par1];
                this.modulStack[par1] = null;
                return var3;
            }
            else
            {
                var3 = this.modulStack[par1].splitStack(par2);

                if (this.modulStack[par1].stackSize == 0)
                {
                    this.modulStack[par1] = null;
                }

                return var3;
            }
        }
        else
        {
            return null;
        }
    }
   
    public ItemStack getStackInSlotOnClosing(int par1)
    {
        if (this.modulStack[par1] != null)
        {
            ItemStack var2 = this.modulStack[par1];
            this.modulStack[par1] = null;
            return var2;
        }
        else
        {
            return null;
        }
    }

    public void setInventorySlotContents(int par1, ItemStack par2ItemStack)
    {
        this.modulStack[par1] = par2ItemStack;

        if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())
        {
            par2ItemStack.stackSize = this.getInventoryStackLimit();
        }
    }

    public String getInvName()
    {
        return "Module Maker";
    }

public int getInventoryStackLimit() 
{
	return 1;
}

public boolean isUseableByPlayer(EntityPlayer var1) 
{
	return true;
}

public void openChest() 
{
}

@Override
public void closeChest() 
{
}

@Override
public void updateEntity() 
{
	super.updateEntity();
	if(!worldObj.isRemote || worldObj.getWorldTime() % 10 == 0)return;

	updateButtons();
	updateCable();
	ItemStack par1 = new ItemStack(Item.diamond);
	if(modulStack[0] != null && canProgress())
	{
		modulStack[2] = par1.copy();
		modulStack[0] = null;


	}
}



public boolean canProgress() 
{
        if (this.modulStack[0] == null)
        {
            return false;
        }
        else
        {
            ItemStack var1 = new ItemStack(Item.diamond);
            if (this.modulStack[2] == null) return true;
            if (!this.modulStack[2].isItemEqual(var1)) return false;
            int result = modulStack[2].stackSize + var1.stackSize;
            return (result <= getInventoryStackLimit() && result <= var1.getMaxStackSize());
        }
}

public int getProgressFromMode() 
{
	if(mode == 1)return maxProgress / 2;
	else if(mode == 2)return maxProgress;
	else return maxProgress*2;
}

public void updateCable()
{
	for(int i = 0;i<6;i++)
	{
		TileEntity tile = WorldReading.getTileEntity(worldObj, xCoord, yCoord, zCoord, i);
		if(tile != null && tile instanceof ICable)
		{
			ICable ic = (ICable) tile;
			ic.setPriorty(0);
		}
	}
}

@Override
public boolean needEnergie() 
{
	return energy < maxEnergy;
}

@Override
public int getMaxStoredEnergy() 
{
	return maxEnergy;
}

@Override
public int getStoredEnergy() 
{
	return energy;
}

@Override
public void sendEnergyToMachine(int i) 
{
	energy += i;
}

@Override
public int getTransferlimit() 
{
	return 128;
}

@Override
public int getEnergyOutOfMachine(int i)
{
	return 0;
}

@Override
public boolean hasLiquidContainer() 
{
	return false;
}

@Override
public boolean needsLiquid() 
{
	return false;
}

@Override
public boolean hasFinalLiquid() 
{
	return false;
}

@Override
public boolean hasLiquid() 
{
	return false;
}

@Override
public LiquidStack getLiquidID() 
{
	return null;
}

@Override
public int getStoredLiquid() 
{
	return 0;
}

@Override
public int getMaxLiquidLevel() 
{
	return 0;
}

@Override
public void setLiquidID(LiquidStack par1) 
{
}

@Override
public void sendLiquid(int i)
{
}

@Override
public int suckLiquidOutOfMachine(int i) 
{
	return 0;
}





}

 

so my problem is that he creates ghost items.

I know from where the problem comes but i do not know how to fix it.

The problem activate every time when i asking is this button pressed or is it not (in form of the variable mode, progressmode, work) if i implement these variables he start to create Ghost items. so how can i fix it?

Posted

From the Gui, send a packet to server when mouseClicked() is called, with enough data to change the tileentity state on the server side.

I would recommend using

this.mc.getNetHandler().addToSendQueue(packet);

With packet being constructed with your "prosition" data.

 

Then in a class implementing IPacketHandler, read the data and change the tileentity state.

You'll need to register channel and packet handling class in your @NetworkMod annotation.

Posted

Cool but 1 little problem i do not know anything about packet handling!

And my coding knowledge go with this over everything i know. Short i reach my limit^^ At the moment!

Posted

Without a tutorial i am lost xD (on this way)

Can you explain me how i can do this?

xD i know there is a tutorial on forge. But i do not understand it^^. It does confuse me.

Posted

Well, this is going to be long.

Let's start from the beginning, shall we ?

 

For the server to know what the client is doing, (and vice-versa) information needs to be sent. You need to remember that client part is distinct from server part, because they can be, like, 1000 kilometres apart.

On your case, you have a client input (a click). You need to send this info to the server.

But rough info can't travel through the internet (which is the commonly used communicating system), as it would be slow and insecure.

You send packets containing the info.

How it is done:

You (as client here) write info into a DataOutputStream in a sequence (of Byte arrays), then put it into a new Packet.

You send the packet. (from your client, to the server, in your case)

*packet travels safely through the internet*

You receive the packet in your (server here) packet handler class. (IPacketHandler is our common backbone for receiving packets, so you get a call by onPacketData)

You (as server here) read info with a DataInputStream, in same sequence as it was written.

You (as server here) do the changes the data tells.

 

Do you understand till here ?

[You don't really need to understand what DataOutputStream and DataInputStream are doing to the packet, though you need to use them]

Posted

Ok. I did read your text and i can see the differens between datainput/outputstream^^

Now a very important thing. I am still on 1.4.7 so do not forget that.

And i tried to implement a packethandler (i do not know if its working but the code is there)

But now is the problem how do i sync the Infos between my gui and my tile. Because the SyncTileEntities tutorial on forge is like: yeah you do need to sync sometimes manually but a specail explaining is not there.

 

Sry for saying it like that but i always say what i think! ^^

Posted

i actually made that tutorial btw, and its intended for people who have experience with java,but if you need help i will explain in more details if you want

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

you might want to take a look at http://www.minecraftforge.net/wiki/Organising_packet_handlers, another tutorial i made

 

basicly make a class that implements IPacketHandling

 

register that class using

NetworkRegistry.instance().registerChannel(new ServerPacketHandler(), "channelName", Side.SERVER);

or for client:

NetworkRegistry.instance().registerChannel(new ClientPacketHandler(), "channelName", Side.CLIENT);

 

also, GotoLink said use this.mc.getNetHandler().addToSendQueue(packet);

its not bad, but i recommend PacketDispatcher.sendPacketToServer(packet);

its the same, except if you ever send a packet from somewhere else then a gui you wont have access to a Minecraft reference

and using PacketDispatcher server side has some convinient methods

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Yeah that would maybe work but i do not get Anything done with it.

I tried to register a packetHandler and if i trie that then the game crashes and the game says Invalid Channel name. My Channel name is: "TinyModularThings"

 

Here are the classes^^.

 

xD if the forge forum would not block my PrimäryBrowserIP then i could read the answers better xD but that is not interessting now!

Posted

have you researched into WHY thsi channel name is invalid ? anythign in the log ? try changing the channel name?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Classes:

 

ModClass:

package speiger.src.tinychest;

import java.io.File;
import java.util.logging.Logger;

import net.minecraft.creativetab.CreativeTabs;
import speiger.src.api.api.modules.advanced.ModulRecipeRegister;
import speiger.src.tinychest.addons.AddonHelper;
import speiger.src.tinychest.common.config.TinyConfig;
import speiger.src.tinychest.common.config.TinyTileRegistry;
import speiger.src.tinychest.common.core.CreativeTapTinyChest;
import speiger.src.tinychest.common.core.TinyChestCore;
import speiger.src.tinychest.common.core.helpers.RecipeHelper;
import speiger.src.tinychest.common.lib.TinyChestRecipes;
import speiger.src.tinychest.common.lib.TinyChestReference;
import speiger.src.tinychest.common.packet.SpmodPackets;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;


@Mod(modid = TinyChestReference.TinyID, name = TinyChestReference.TinyName, version = TinyChestReference.TinyVersion, dependencies = "required-after:SpmodAPI")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = "TinyModularThings", packetHandler = SpmodPackets.class)
public class TinyChest 
{
@SidedProxy(clientSide = TinyChestReference.TinyClient, serverSide = TinyChestReference.TinyCore)
public static TinyChestCore core;

@Instance(TinyChestReference.TinyID)
public static TinyChest instance;

public static Logger tinyLogger = Logger.getLogger("TinyChestReference.TinyName");

public static CreativeTabs tinyChest = new CreativeTapTinyChest(CreativeTabs.getNextID(), TinyChestReference.TinyID);


@PreInit
    public void preInit(FMLPreInitializationEvent par1)
{

	NetworkRegistry.instance().registerGuiHandler(this, core);
	NetworkRegistry.instance().registerChannel(new SpmodPackets(), "TinyModularThings");
	instance = this;

	TinyConfig.loadTinyChests(new File(par1.getModConfigurationDirectory(), "Spmod/TinyChest.cfg"));
	LanguageRegistry.instance().addStringLocalization("itemGroup."+TinyChestReference.TinyID, "Tiny Chest");
    }



@Init
public void load(FMLInitializationEvent evt)
{

	ModulRecipeRegister.RegisterModulReicpeOutput(new RecipeHelper());
	TinyChestRecipes.loadTinyChests();
	TinyTileRegistry.registerTiles();
	core.registerTileRenders();
	core.preloadTexture();
}


@PostInit
public void modsLoaded(FMLPostInitializationEvent evt) 
{
	AddonHelper.loadAddons();
}

}

 

PacketClass:

package speiger.src.tinychest.common.packet;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;

import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;

public class SpmodPackets implements IPacketHandler {

@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) 
{

}



}

Posted

ps: can i take this example of "trying a new string" and put it into my debugging 101 guide ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Ok i changed my String to TinyChest (Which was my Old ModName)

xD

 

Now the thing is how can i use the packethandler to send the information to the TileEntity?

 

And yes you can^^

Posted

well basicly this is the flow of information

lets say i have a block that you can right click to open a gui, and in thsi gui there are buttons to change the values of the block (colors, meta, wtv you can think of)

 

what i want to do is in my gui, when a certain button is pressed (a button labeled "update" or wtv)

send a packet to the server containing every important information, in your case just send a integer that represent what action has been taken (btw i havnt actually read your post, just the few last one where GotoLink says:

On your case, you have a client input (a click). You need to send this info to the server.

so anyway, just feed the integer (or you could also send NOTHING if that teh only kind of packet that is send with thsi channel + the x, y, z coord of the TE (so that server side knows wtf you're talking about, but usually you want to send many different thigns with 1 channel)

on server side when you receive this packet

get the 3 coordinates, get a world ref, get that tile entity using the world ref  and apply the changes you want to the tile entity

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

I have tinkers construct installed (source) and because we have a nearly simmilar way of creating items i watched what he did^^.

 

So now i did a view changes. I Did not test really if it is write. But it does crash nothing!

 

Modfile

package speiger.src.tinychest;

import java.io.File;
import java.util.logging.Logger;

import net.minecraft.creativetab.CreativeTabs;
import speiger.src.api.api.modules.advanced.ModulRecipeRegister;
import speiger.src.tinychest.addons.AddonHelper;
import speiger.src.tinychest.common.config.TinyConfig;
import speiger.src.tinychest.common.config.TinyTileRegistry;
import speiger.src.tinychest.common.core.CreativeTapTinyChest;
import speiger.src.tinychest.common.core.TinyChestCore;
import speiger.src.tinychest.common.core.helpers.RecipeHelper;
import speiger.src.tinychest.common.lib.TinyChestRecipes;
import speiger.src.tinychest.common.lib.TinyChestReference;
import speiger.src.tinychest.common.packet.SpmodPackets;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;


@Mod(modid = TinyChestReference.TinyID, name = TinyChestReference.TinyName, version = TinyChestReference.TinyVersion, dependencies = "required-after:SpmodAPI")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = "TinyChest", packetHandler = SpmodPackets.class)
public class TinyChest 
{
@SidedProxy(clientSide = TinyChestReference.TinyClient, serverSide = TinyChestReference.TinyCore)
public static TinyChestCore core;

@Instance(TinyChestReference.TinyID)
public static TinyChest instance;

public static Logger tinyLogger = Logger.getLogger("TinyChestReference.TinyName");

public static CreativeTabs tinyChest = new CreativeTapTinyChest(CreativeTabs.getNextID(), TinyChestReference.TinyID);


@PreInit
    public void preInit(FMLPreInitializationEvent par1)
{

	NetworkRegistry.instance().registerGuiHandler(this, core);
	NetworkRegistry.instance().registerChannel(new SpmodPackets(), "TinyChest", Side.SERVER);
	instance = this;

	TinyConfig.loadTinyChests(new File(par1.getModConfigurationDirectory(), "Spmod/TinyChest.cfg"));
	LanguageRegistry.instance().addStringLocalization("itemGroup."+TinyChestReference.TinyID, "Tiny Chest");
    }



@Init
public void load(FMLInitializationEvent evt)
{

	ModulRecipeRegister.RegisterModulReicpeOutput(new RecipeHelper());
	TinyChestRecipes.loadTinyChests();
	TinyTileRegistry.registerTiles();
	core.registerTileRenders();
	core.preloadTexture();
}


@PostInit
public void modsLoaded(FMLPostInitializationEvent evt) 
{
	AddonHelper.loadAddons();
}

}

 

Gui

package speiger.src.tinychest.client.gui.machines.machine;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.util.StatCollector;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.network.PacketDispatcher;

import speiger.src.tinychest.common.container.machines.machine.ContainerModuleMaker;
import speiger.src.tinychest.common.tileentity.machines.machine.ModuleMaker;

public class GuiModuleMaker extends GuiContainer 
{
private ModuleMaker tile;

public GuiModuleMaker(InventoryPlayer par1, ModuleMaker par2) 
{
	super(new ContainerModuleMaker(par1, par2));
	tile = par2;
	this.ySize = 232;
	this.xSize = 211;
}

protected void drawGuiContainerForegroundLayer(int par1, int par2)
    {
	this.fontRenderer.drawString("Fast", 38, 128, 0xffffff);
	this.fontRenderer.drawString("Work", 78, 106, 0xffffff);
	this.fontRenderer.drawString("Med", 80, 128, 0xffffff);
	this.fontRenderer.drawString("Slow", 118, 128, 0xffffff);
        this.fontRenderer.drawString("Module Maker", 65, 6, 4210752);
        this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 5, 4210752);
        this.fontRenderer.drawString("Clearing", 153, 10, 0xffffff);
        this.fontRenderer.drawString("Specify", 155, 30, 0xffffff);
        this.fontRenderer.drawString("Production", 146, 50, 0xffffff);
        this.fontRenderer.drawString("AdvProduct", 144, 70, 0xffffff);
        this.fontRenderer.drawString("Upgrade", 153, 90, 0xffffff);
        this.fontRenderer.drawString("Fuel", 164, 110, 0xffffff);
    }

    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    {
        int var4 = this.mc.renderEngine.getTexture("/speiger/src/tinychest/textures/ModuleMaker.png");
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.renderEngine.bindTexture(var4);
        int var5 = (this.width - this.xSize) / 2;
        int var6 = (this.height - this.ySize) / 2;
        this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
        int var7;
        
       	if(tile.CanWork())
       	{
       		this.drawTexturedModalRect(72 + var5, 81 + var6 + 22, 222, 24, 35, 15);
       	}
       	
       	if(tile.work == 1)
       	{
       		this.drawTexturedModalRect(72 + var5, 81 + var6 + 22, 222, 41, 35, 15);
       	}

  
        if(tile.button[0] == 1)
        {
        	this.drawTexturedModalRect(32 + var5, 81 + var6 + 44, 222, 41, 35, 15);
       	}
       	if(tile.button[1] == 1)
       	{
       		this.drawTexturedModalRect(72 + var5, 81 + var6 + 44, 222, 41, 35, 15);
       	}
       	if(tile.button[2] == 1)
       	{
       		this.drawTexturedModalRect(112 + var5, 81 + var6 + 44, 222, 41, 35, 15);
        }
        
       	if(tile.progressButton[0] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 6 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[1] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 26 + var6, 138, 234, 64, 15);
       	}
        
       	if(tile.progressButton[2] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 46 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[3] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 66 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[4] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 86 + var6, 138, 234, 64, 15);
       	}
       	
       	if(tile.progressButton[5] == 1)
       	{
       		this.drawTexturedModalRect(141 + var5, 106 + var6, 138, 234, 64, 15);
       	}
       	
       	
       	
       	
       	
        
    }

    
    public int getButtonprosition(int x, int y) 
    {
    	if(x>=33 && x<=64 && y>=125 && y<=139)return 1;
    	else if(x>=73 && x<=104 && y>=125 && y<=139)return 2;
    	else if(x>=113 && x<=144 && y>=125 && y<=139)return 3;
    	
    	else if(x>=141 && x<=204 && y>=6 && y<=20)return 4;
    	else if(x>=141 && x<=204 && y>=26 && y<=40)return 5;
    	else if(x>=141 && x<=204 && y>=46 && y<=60)return 6;
//    	else if(x>=141 && x<=204 && y>=66 && y<=80)return 7;
//    	else if(x>=141 && x<=204 && y>=86 && y<=100)return 8;
//    	else if(x>=141 && x<=204 && y>=106 && y<=120)return 9;
    	else if(x>=73 && x<=104 && y>=103 && y<=117)return 10;
    	else return 0;
    }
    

    


@Override
protected void mouseClicked(int par1, int par2, int par3) 
{
	super.mouseClicked(par1, par2, par3);



	int cornerX = (width - xSize) / 2;
	int cornerY = (height - ySize) / 2;

	int prosition = getButtonprosition(par1 - cornerX, par2 - cornerY);

	if(prosition != 0)
	{
		tile.progress = 0;
		tile.canWork = false;
		tile.work = 0;
		this.sendPacket(prosition);
		if(prosition == 1)
		{
			tile.button[0] = 1;
			tile.button[1] = 0;
			tile.button[2] = 0;
		}
		if(prosition == 2)
		{
			tile.button[0] = 0;
			tile.button[1] = 1;
			tile.button[2] = 0;
		}
		if(prosition == 3)
		{
			tile.button[0] = 0;
			tile.button[1] = 0;
			tile.button[2] = 1;
		}

		if(prosition == 4)
		{
			tile.progressButton[0] = 1;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 5)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 1;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 6)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 1;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 7)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 1;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 0;
		}
		if(prosition == 
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 1;
			tile.progressButton[5] = 0;
		}

		if(prosition == 9)
		{
			tile.progressButton[0] = 0;
			tile.progressButton[1] = 0;
			tile.progressButton[2] = 0;
			tile.progressButton[3] = 0;
			tile.progressButton[4] = 0;
			tile.progressButton[5] = 1;
		}

		if(prosition == 10)
		{
			if(tile.work == 0 && tile.canWork)
			{
				tile.work = 1;
			}
			else
			{
				if(tile.work == 1)
				{
					tile.work = 0;
				}
			}
		}
	}
}

public void sendPacket(int prosition) 
{
	ByteArrayOutputStream bitout = new ByteArrayOutputStream(;
	DataOutputStream output = new DataOutputStream(bitout);

	try 
	{
		output.writeByte(1);
		output.writeInt(tile.worldObj.provider.dimensionId);
		output.writeInt(tile.xCoord);
		output.writeInt(tile.yCoord);
		output.writeInt(tile.zCoord);
		output.writeInt(prosition);
		FMLLog.getLogger().info("Send Data");
	}
	catch (Exception e) 
	{
		FMLLog.getLogger().info("Send Data");
		e.printStackTrace();
	}

	Packet250CustomPayload packet = new Packet250CustomPayload();
	packet.channel = "TinyChests";
	packet.data = bitout.toByteArray();
	packet.length = bitout.size();
	PacketDispatcher.sendPacketToServer(packet);
}

}

 

PacketHandler

package speiger.src.tinychest.common.packet;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;

import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import speiger.src.tinychest.common.tileentity.machines.machine.ModuleMaker;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;

public class SpmodPackets implements IPacketHandler {

@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) 
{
	if(packet.channel.equals("TinyChest"))
	{
		handlePacket(packet);
	}
}

void handlePacket(Packet250CustomPayload packet) 
{
	DataInputStream input = new DataInputStream(new ByteArrayInputStream(packet.data));
	byte packetID;
	int dimID;
	try 
	{
		FMLLog.getLogger().info("Test");
		packetID = input.readByte();
		dimID = input.readInt();

		World world = DimensionManager.getWorld(dimID);

		if(packetID == 1)//ModuleMaker
		{
			FMLLog.getLogger().info("Test2");
			int x = input.readInt();
			int y = input.readInt();
			int z = input.readInt();
			int prosition = input.readInt();
			TileEntity tile = world.getBlockTileEntity(x, y, z);
			if(tile != null && tile instanceof ModuleMaker)
			{
				ModuleMaker mod = (ModuleMaker) tile;
				mod.runTest();
			}
		}


	}
	catch (Exception e) 
	{
		System.out.println("[TinyChest] Error on Sending Packet");
		e.printStackTrace();
		return;
	}
}



}

 

It does crash nothing and something does he do but what he do i do not know^^

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
    • Verified user can get a $100 off Temu   Coupon code using the code ((“aci789589”)). This Temu   $100 Off code is specifically for new and existing customers both and can be redeemed to receive a $100 discount on your purchase. Our exclusive Temu   Coupon code offers a flat $100 off your purchase, plus an additional 100% discount on top of that. You can slash prices by up to $100 as a new Temu   customer using code ((“aci789589”)). Existing users can enjoy $100 off their next haul with this code. But that’s not all! With our Temu   Coupon codes for 2025, you can get up to 90% discount on select items and clearance sales. Whether you’re a new customer or an existing shopper, our Temu   codes provide extra discounts tailored just for you. Save up to 100% with these current Temu   Coupons ["^"aci789589 "^"] for April 2025. The latest Temu   coupon codes at here. New users at Temu   receive a $100 discount on orders over $100 Use the code ((“aci789589”)) during checkout to get Temu   Coupon $100 Off For New Users. You can save $100 Off your first order with the coupon code available for a limited time only. Temu   90% Off promo code ((“aci789589”)) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu   offers $100 Off coupon code “aci789589” for first time users. You can get a $100 bonus plus $100 Off any purchase at Temu   with the $100 Coupon Bundle at Temu   if you sign up with the referral code ((“aci789589”)) and make a first purchase of $100 or more. Free Temu   codes $100 off — ((“aci789589”)) Temu Coupon $100 off — ((“aci789589”)) Temu Coupon 100% off — ((“aci789589”)) Temu Memorial Day Sale $100 off — ((“aci789589”)) Temu Coupon code today — ((“aci789589”)) Temu free gift code — ["^"aci789589"^"](Without inviting friends or family member) Temu Coupon code for  USA      - $100 Off— ((“aci789589”)) Temu Coupon code  USA     - $100 Off— ((“aci789589”)) Temu Coupon code USA  - $100 Off — ((“aci789589”)) Temu Coupon code Japan - $100 Off — ((“aci789589”)) Temu Coupon code Mexico - $100 Off — ((“aci789589”)) Temu Coupon code Chile - $100 Off — ((“aci789589”)) Temu Coupon code USA - $100 Off — ((“aci789589”)) Temu Coupon code Colombia - $100 Off — ((“aci789589”)) Temu Coupon code Malaysia - $100 Off — ((“aci789589”)) Temu Coupon code Philippines - $100 Off — ((“aci789589”)) Temu Coupon code South Korea - $100 Off — ((“aci789589”)) Redeem Free Temu   Coupon Code ["^"aci789589"^"] for first-time users Get a $100 discount on your Temu   order with the promo code "aci789589". You can get a discount by clicking on the item to purchase and entering this Temu   Coupon code $100 off ((“aci789589”)). Temu   New User Coupon ((“aci789589)): Up To $100 OFF For First-Time Users Our Temu   first-time user coupon codes are designed just for new customers, offering the biggest discounts and the best deals currently available on Temu  . To maximize your savings, download the Temu   app and apply our Temu   new user coupon during checkout. Temu   Coupon Codes For Existing Users ((“aci789589”)): $100 Price Slash Have you been shopping on Temu   for a while? Our Temu   Coupon for existing customers is here to reward you for your continued support, offering incredible discounts on your favorite products. Temu   Coupon For $100 Off ((“aci789589”)): Get A Flat $100 Discount On Order Value Get ready to save big with our incredible Temu   Coupon for $100 off! Our amazing Temu   $100 off coupon code will give you a flat $100 discount on your order value, making your shopping experience even more rewarding. Temu   Coupon Code For $100 Off ((“aci789589”)): For Both New And Existing Customers Our incredible Temu   Coupon code for $100 off is here to help you save big on your purchases. Whether you’re a new user or an existing customer, our $100 off code for Temu   will give you an additional discount! Temu   Coupon Bundle ((“aci789589”)): Flat $100 Off + Up To $100 Discount Get ready for an unbelievable deal with our Temu   Coupon bundle for 2025! Our Temu   Coupon bundles will give you a flat $100 discount and an additional $100 off on top of it. Free Temu   Coupons ((“aci789589”)): Unlock Unlimited Savings! Get ready to unlock a world of savings with our free Temu   Coupons! We’ve got you covered with a wide range of Temu   Coupon code options that will help you maximize your shopping experience. 100% Off Temu   Coupons, Promo Codes + 25% Cash Back ((“aci789589”)) Redeem Temu   Coupon Code ((“aci789589”)) Temu Coupon $100 OFF ((“aci789589”)) Temu Coupon $100 OFF FOR EXISTING CUSTOMERS ((“aci789589”)) Temu Coupon $100 OFF FIRST ORDER ((“aci789589”)) Temu Coupon $100 OFF REDDIT ((“aci789589”)) Temu Coupon $100 OFF FOR EXISTING CUSTOMERS REDDIT ((“aci789589”)) Temu $100 OFF CODE ((“aci789589”)) Temu 70 OFF COUPON 2025 ((“aci789589”)) DOMINOS 70 RS OFF COUPON CODE ((“aci789589”)) WHAT IS A COUPON RATE ((“aci789589”)) Temu $100 OFF FOR EXISTING CUSTOMERS ((“aci789589”)) Temu $100 OFF FIRST ORDER ((“aci789589”)) Temu $100 OFF FREE SHIPPING ((“aci789589”)) You can get an exclusive $100 off discount on your Temu   purchase with the code [aci789589] Or [aci789589].This code is specially designed for new customers and offers a significant price cut on your shopping. Make your first purchase on Temu   more rewarding by using this code to get $100 off instantly. Temu   Coupon Code For $100 Off [aci789589] Or [aci789589]: Get A Flat $100 Discount On Order Value Get ready to save big with our incredible Temu   coupon for $100 off! Our coupon code will give you a flat $100 discount on your order value, making your shopping experience even more rewarding. Exclusive Temu   Discount Code [aci789589] Or [aci789589]: Flat $200 OFF for New and Existing Customers Using our Temu   promo code you can get A$ 200 off your order and 100% off using our Temu   promo code [aci789589] Or [aci789589]. As a new Temu   customer, you can save up to $100 using this promo code. For returning users, our Temu   promo code offers a $100 price slash on your next shopping spree. This is our way of saying thank you for shopping with us! Best Temu   Deals and Coupons [aci789589] Or [aci789589]: During 2025, Temu   coupon codes offer discounts of up to 90% on select items, making it possible for both new and existing users to get incredible deals. From $100 off deals to 100% discounts, our Temu   promo codes make shopping more affordable than ever. Temu   Coupon Code For $100% Off [aci789589] Or [aci789589]: For Both New And Existing Customers Free Temu   $100 Off Code — [aci789589] Or [aci789589] Temu Coupon 100% Off — [aci789589] Or [aci789589] Temu Memorial Day Sale - $100 Off — [aci789589] Or [aci789589] Temu Free Gift Code — [aci789589] Or [aci789589] Temu $500 Off Code — [aci789589 ] Or [aci789589] Best Temu   $200 Off Code — [aci789589 ] Or [aci789589] Temu Coupon Code first order — [aci789589] Or [aci789589] Temu Coupon Code for New user — [aci789589] Or [aci789589] Temu Coupon Code A$100 off — [aci789589] Or [aci789589] Temu Coupon Code $50 off — [aci789589] Or [aci789589] Temu Coupon Code $100 off — [aci789589] Or [aci789589] Temu Promo Code 2025 — [aci789589] Or [aci789589] Temu Coupon Code $200 off — [aci789589] Or [aci789589] Temu Coupon Code $90 off — [aci789589] Or [aci789589] Temu Sign up Bonus Code — [aci789589] Or [aci789589] Temu Coupon Code A$120 off — [aci789589] Or [aci789589] Our exclusive Temu   coupon code allows you to take a flat $200 off your purchase with an added 100% discount on top. As a new Temu   shopper, you can save up to $100 using code [aci789589] Or [aci789589]. Returning customers can also enjoy a $100 discount on their next purchases with this code. Temu Coupon Code for Your Country Sign-up Bonus Temu $100 Off Code  USA      [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA     [aci789589] Or [aci789589] - 100% off Temu $100 Off Code USA  [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Japan [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Mexico [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Chile [aci789589] Or [aci789589] - 100% off Temu $100 Off Code USA [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Colombia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Malaysia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Philippines [aci789589] Or [aci789589] - 100% off Temu $100 Off Code South Korea [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA      [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Pakistan [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Finland [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Saudi Arabia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Qatar [aci789589] Or [aci789589] - 100% off Temu $100 Off Code France [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Germany [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA   [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Israel [aci789589] Or [aci789589] - 100% off Get a $100 discount on your Temu   order with the promo code [aci789589] Or [aci789589]. You can get a discount by clicking on the item to purchase and entering this Temu   coupon code $100 off [aci789589] Or [aci789589]. Temu   Coupon Code [aci789589] Or [aci789589]: Get Up To 90% OFF In NOV 2025 Are you looking for the best Temu   coupon codes to get amazing discounts? Our Temu   coupons are perfect for getting those extra savings you crave. We regularly test our coupon codes for Temu   to ensure they work flawlessly, giving you a guaranteed discount every time. Temu   New User Coupon [aci789589] Or [aci789589]: Up To $100 OFF For First-Time Users Our Temu   first-time user coupon codes are designed just for new customers, offering the biggest discounts and the best deals currently available on Temu  . To maximize your savings, download the Temu   app and apply our Temu   new user coupon during checkout.
    • Verified user can get a $100 off Temu   Coupon code using the code ((“aci789589”)). This Temu   $100 Off code is specifically for new and existing customers both and can be redeemed to receive a $100 discount on your purchase. Our exclusive Temu   Coupon code offers a flat $100 off your purchase, plus an additional 100% discount on top of that. You can slash prices by up to $100 as a new Temu   customer using code ((“aci789589”)). Existing users can enjoy $100 off their next haul with this code. But that’s not all! With our Temu   Coupon codes for 2025, you can get up to 90% discount on select items and clearance sales. Whether you’re a new customer or an existing shopper, our Temu   codes provide extra discounts tailored just for you. Save up to 100% with these current Temu   Coupons ["^"aci789589 "^"] for April 2025. The latest Temu   coupon codes at here. New users at Temu   receive a $100 discount on orders over $100 Use the code ((“aci789589”)) during checkout to get Temu   Coupon $100 Off For New Users. You can save $100 Off your first order with the coupon code available for a limited time only. Temu   90% Off promo code ((“aci789589”)) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu   offers $100 Off coupon code “aci789589” for first time users. You can get a $100 bonus plus $100 Off any purchase at Temu   with the $100 Coupon Bundle at Temu   if you sign up with the referral code ((“aci789589”)) and make a first purchase of $100 or more. Free Temu   codes $100 off — ((“aci789589”)) Temu Coupon $100 off — ((“aci789589”)) Temu Coupon 100% off — ((“aci789589”)) Temu Memorial Day Sale $100 off — ((“aci789589”)) Temu Coupon code today — ((“aci789589”)) Temu free gift code — ["^"aci789589"^"](Without inviting friends or family member) Temu Coupon code for  USA      - $100 Off— ((“aci789589”)) Temu Coupon code  USA     - $100 Off— ((“aci789589”)) Temu Coupon code USA  - $100 Off — ((“aci789589”)) Temu Coupon code Japan - $100 Off — ((“aci789589”)) Temu Coupon code Mexico - $100 Off — ((“aci789589”)) Temu Coupon code Chile - $100 Off — ((“aci789589”)) Temu Coupon code USA - $100 Off — ((“aci789589”)) Temu Coupon code Colombia - $100 Off — ((“aci789589”)) Temu Coupon code Malaysia - $100 Off — ((“aci789589”)) Temu Coupon code Philippines - $100 Off — ((“aci789589”)) Temu Coupon code South Korea - $100 Off — ((“aci789589”)) Redeem Free Temu   Coupon Code ["^"aci789589"^"] for first-time users Get a $100 discount on your Temu   order with the promo code "aci789589". You can get a discount by clicking on the item to purchase and entering this Temu   Coupon code $100 off ((“aci789589”)). Temu   New User Coupon ((“aci789589)): Up To $100 OFF For First-Time Users Our Temu   first-time user coupon codes are designed just for new customers, offering the biggest discounts and the best deals currently available on Temu  . To maximize your savings, download the Temu   app and apply our Temu   new user coupon during checkout. Temu   Coupon Codes For Existing Users ((“aci789589”)): $100 Price Slash Have you been shopping on Temu   for a while? Our Temu   Coupon for existing customers is here to reward you for your continued support, offering incredible discounts on your favorite products. Temu   Coupon For $100 Off ((“aci789589”)): Get A Flat $100 Discount On Order Value Get ready to save big with our incredible Temu   Coupon for $100 off! Our amazing Temu   $100 off coupon code will give you a flat $100 discount on your order value, making your shopping experience even more rewarding. Temu   Coupon Code For $100 Off ((“aci789589”)): For Both New And Existing Customers Our incredible Temu   Coupon code for $100 off is here to help you save big on your purchases. Whether you’re a new user or an existing customer, our $100 off code for Temu   will give you an additional discount! Temu   Coupon Bundle ((“aci789589”)): Flat $100 Off + Up To $100 Discount Get ready for an unbelievable deal with our Temu   Coupon bundle for 2025! Our Temu   Coupon bundles will give you a flat $100 discount and an additional $100 off on top of it. Free Temu   Coupons ((“aci789589”)): Unlock Unlimited Savings! Get ready to unlock a world of savings with our free Temu   Coupons! We’ve got you covered with a wide range of Temu   Coupon code options that will help you maximize your shopping experience. 100% Off Temu   Coupons, Promo Codes + 25% Cash Back ((“aci789589”)) Redeem Temu   Coupon Code ((“aci789589”)) Temu Coupon $100 OFF ((“aci789589”)) Temu Coupon $100 OFF FOR EXISTING CUSTOMERS ((“aci789589”)) Temu Coupon $100 OFF FIRST ORDER ((“aci789589”)) Temu Coupon $100 OFF REDDIT ((“aci789589”)) Temu Coupon $100 OFF FOR EXISTING CUSTOMERS REDDIT ((“aci789589”)) Temu $100 OFF CODE ((“aci789589”)) Temu 70 OFF COUPON 2025 ((“aci789589”)) DOMINOS 70 RS OFF COUPON CODE ((“aci789589”)) WHAT IS A COUPON RATE ((“aci789589”)) Temu $100 OFF FOR EXISTING CUSTOMERS ((“aci789589”)) Temu $100 OFF FIRST ORDER ((“aci789589”)) Temu $100 OFF FREE SHIPPING ((“aci789589”)) You can get an exclusive $100 off discount on your Temu   purchase with the code [aci789589] Or [aci789589].This code is specially designed for new customers and offers a significant price cut on your shopping. Make your first purchase on Temu   more rewarding by using this code to get $100 off instantly. Temu   Coupon Code For $100 Off [aci789589] Or [aci789589]: Get A Flat $100 Discount On Order Value Get ready to save big with our incredible Temu   coupon for $100 off! Our coupon code will give you a flat $100 discount on your order value, making your shopping experience even more rewarding. Exclusive Temu   Discount Code [aci789589] Or [aci789589]: Flat $200 OFF for New and Existing Customers Using our Temu   promo code you can get A$ 200 off your order and 100% off using our Temu   promo code [aci789589] Or [aci789589]. As a new Temu   customer, you can save up to $100 using this promo code. For returning users, our Temu   promo code offers a $100 price slash on your next shopping spree. This is our way of saying thank you for shopping with us! Best Temu   Deals and Coupons [aci789589] Or [aci789589]: During 2025, Temu   coupon codes offer discounts of up to 90% on select items, making it possible for both new and existing users to get incredible deals. From $100 off deals to 100% discounts, our Temu   promo codes make shopping more affordable than ever. Temu   Coupon Code For $100% Off [aci789589] Or [aci789589]: For Both New And Existing Customers Free Temu   $100 Off Code — [aci789589] Or [aci789589] Temu Coupon 100% Off — [aci789589] Or [aci789589] Temu Memorial Day Sale - $100 Off — [aci789589] Or [aci789589] Temu Free Gift Code — [aci789589] Or [aci789589] Temu $500 Off Code — [aci789589 ] Or [aci789589] Best Temu   $200 Off Code — [aci789589 ] Or [aci789589] Temu Coupon Code first order — [aci789589] Or [aci789589] Temu Coupon Code for New user — [aci789589] Or [aci789589] Temu Coupon Code A$100 off — [aci789589] Or [aci789589] Temu Coupon Code $50 off — [aci789589] Or [aci789589] Temu Coupon Code $100 off — [aci789589] Or [aci789589] Temu Promo Code 2025 — [aci789589] Or [aci789589] Temu Coupon Code $200 off — [aci789589] Or [aci789589] Temu Coupon Code $90 off — [aci789589] Or [aci789589] Temu Sign up Bonus Code — [aci789589] Or [aci789589] Temu Coupon Code A$120 off — [aci789589] Or [aci789589] Our exclusive Temu   coupon code allows you to take a flat $200 off your purchase with an added 100% discount on top. As a new Temu   shopper, you can save up to $100 using code [aci789589] Or [aci789589]. Returning customers can also enjoy a $100 discount on their next purchases with this code. Temu Coupon Code for Your Country Sign-up Bonus Temu $100 Off Code  USA      [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA     [aci789589] Or [aci789589] - 100% off Temu $100 Off Code USA  [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Japan [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Mexico [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Chile [aci789589] Or [aci789589] - 100% off Temu $100 Off Code USA [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Colombia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Malaysia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Philippines [aci789589] Or [aci789589] - 100% off Temu $100 Off Code South Korea [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA      [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Pakistan [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Finland [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Saudi Arabia [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Qatar [aci789589] Or [aci789589] - 100% off Temu $100 Off Code France [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Germany [aci789589] Or [aci789589] - 100% off Temu $100 Off Code  USA   [aci789589] Or [aci789589] - 100% off Temu $100 Off Code Israel [aci789589] Or [aci789589] - 100% off Get a $100 discount on your Temu   order with the promo code [aci789589] Or [aci789589]. You can get a discount by clicking on the item to purchase and entering this Temu   coupon code $100 off [aci789589] Or [aci789589]. Temu   Coupon Code [aci789589] Or [aci789589]: Get Up To 90% OFF In NOV 2025 Are you looking for the best Temu   coupon codes to get amazing discounts? Our Temu   coupons are perfect for getting those extra savings you crave. We regularly test our coupon codes for Temu   to ensure they work flawlessly, giving you a guaranteed discount every time. Temu   New User Coupon [aci789589] Or [aci789589]: Up To $100 OFF For First-Time Users Our Temu   first-time user coupon codes are designed just for new customers, offering the biggest discounts and the best deals currently available on Temu  . To maximize your savings, download the Temu   app and apply our Temu   new user coupon during checkout.
    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
  • Topics

×
×
  • Create New...

Important Information

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