Jump to content

Recommended Posts

Posted

Hello im back again after fixing the glitch on armor ( lol it was about the getArmorModel )

anyways im having crash whenever i right click my hunter bench block. This does not happen from 1.7.10. Almost all code is the same no changes 

 

 

Here is the crash report

 

---- Minecraft Crash Report ----
// You're mean.
Time: 4/23/17 12:50 AM
Description: Unexpected error
java.lang.NullPointerException: The validated object is null
    at org.apache.commons.lang3.Validate.notNull(Validate.java:222)
    at org.apache.commons.lang3.Validate.notNull(Validate.java:203)
    at net.minecraft.util.NonNullList.set(NonNullList.java:48)
    at net.minecraft.inventory.InventoryCraftResult.setInventorySlotContents(InventoryCraftResult.java:88)
    at mhfc.net.client.container.ContainerHunterBench.onCraftMatrixChanged(ContainerHunterBench.java:106)
    at mhfc.net.client.container.ContainerHunterBench.<init>(ContainerHunterBench.java:101)
    at mhfc.net.client.gui.GuiHunterBench.<init>(GuiHunterBench.java:392)
    at mhfc.net.common.eventhandler.MHFCGuiHandler.getClientGuiElement(MHFCGuiHandler.java:39)
    at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:273)
    at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:110)
    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2725)
    at mhfc.net.common.block.container.BlockHunterBench.onBlockActivated(BlockHunterBench.java:48)
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:442)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1612)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2282)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2059)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1847)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1125)
    at net.minecraft.client.Minecraft.run(Minecraft.java:405)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)

 

 

The first crash heading to 

 

 

@Override
    public void onCraftMatrixChanged(IInventory par1IInventory) {
        this.craftResult.setInventorySlotContents(0,MHFCCraftingManager.getInstance()
                .findMatchingRecipe(this.craftMatrix, this.worldObj));
    }

 

 

2nd crash pointing

 this.onCraftMatrixChanged(this.craftMatrix);

      

 

 

3rd

public GuiHunterBench(
            InventoryPlayer par1InventoryPlayer,
            World par2World,
            TileHunterBench tileEntity,
            int x,
            int y,
            int z) {
        super(new ContainerHunterBench(par1InventoryPlayer, par2World, tileEntity, x, y, z));
        this.tileEntity = tileEntity;
        this.xSize = 374;
        this.ySize = 220;
        mc = Minecraft.getMinecraft();
        width = MHFCGuiUtil.minecraftWidth(mc);
        height = MHFCGuiUtil.minecraftHeight(mc);
        this.guiLeft = (width - this.xSize - tabWidth) / 2 + tabWidth;
        this.guiTop = (height - this.ySize) / 2;
        this.addTab(new CraftArmorTab(tileEntity), "Armor");
        this.addTab(new CraftWeaponTab(tileEntity), "Weapons");
        this.addTab(new CraftUpgradeTab(tileEntity), "Upgrade");
        this.addTab(new WeaponTreeTab(), "Weapon tree");
        startCrafting = new GuiButton(0, guiLeft + 228 + (xSize - 228 - 60) / 2, guiTop + 166, 40, 20, "Craft") {
            @Override
            public void mouseReleased(int p_146118_1_, int p_146118_2_) {
                GuiHunterBench.this.tileEntity.beginCrafting();
            }
        };
        selectTab();
    }

 

 

 

Lastly

 

 

              @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        switch (ID) {
        case MHFCContainerRegistry.gui_hunterbench_id:
            TileEntity tE = world.getTileEntity(new BlockPos(x, y, z));
            if (tE instanceof TileHunterBench) {
                return new GuiHunterBench(player.inventory, world, (TileHunterBench) tE, x, y, z);
            } else {
                MHFCMain.logger().debug(
                        "Tried to open hunter bench gui for block at {} {} {} which does not have a hunter bench tile entity",
                        x,
                        y,
                        z);
            }
            break;
        case MHFCContainerRegistry.gui_questgiver_id:
            return GuiQuestGiver.getScreen(x, player);
        case MHFCContainerRegistry.gui_questboard_id:
            return GuiQuestBoard.getQuestBoard(player);
        case MHFCContainerRegistry.gui_queststatus_id:
            return new QuestStatusInventory(player);
        case MHFCContainerRegistry.gui_changearea_id:
            return getChangeAreaGui(world, x, y, z);
        }
        return null;
    }

 

Here is my block class

 

package mhfc.net.common.block.container;

import mhfc.net.MHFCMain;
import mhfc.net.common.core.registry.MHFCContainerRegistry;
import mhfc.net.common.index.ResourceInterface;
import mhfc.net.common.tile.TileHunterBench;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class BlockHunterBench extends BlockContainer {

	public BlockHunterBench() {
		super(Material.ROCK);
		setUnlocalizedName(ResourceInterface.block_hunterbench_name);
		setHardness(1.2F);
		setCreativeTab(MHFCMain.mhfctabs);
	}

	@Override
	public TileEntity createNewTileEntity(World world, int var1) {
		return new TileHunterBench();
	}

	@Override
	public boolean isOpaqueCube(IBlockState state) {
		return false;
	}

	@Override
	public boolean onBlockActivated(
			World worldIn,
			BlockPos pos,
			IBlockState state,
			EntityPlayer player,
			EnumHand hand,
			EnumFacing side,
			float hitX,
			float hitY,
			float hitZ) {
		if (!player.isSneaking()) {
			player.openGui(
					MHFCMain.instance(),
					MHFCContainerRegistry.gui_hunterbench_id,
					worldIn,
					pos.getX(),
					pos.getY(),
					pos.getZ());
			return true;
		}
		return false;
	}

}

 

Posted (edited)

You're calling IInventory#setInventorySlotContents with a null value (returned by MHFCCraftingManager#findMatchingRecipe), which is invalid.

 

ItemStacks can no longer be null in 1.11.x, the default value is now the empty ItemStack (i.e. any ItemStack that returns true from ItemStack#isEmpty). The ItemStack.EMPTY field contains an ItemStack that's always empty.

Edited by Choonster
  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
17 minutes ago, Heltrato said:

Wait im confused. Which parrt is where the ItemStack is empty? Am i called it right?

 

MHFCCraftingManager#findMatchingRecipe is returning null (presumably because there's no matching recipe), which is no longer a valid value for an ItemStack. Instead of returning null, return ItemStack.EMPTY.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Okay so this is what i did.

As you can see i replace return null in ItemStack.EMPTY.

package mhfc.net.common.crafting;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import mhfc.net.common.crafting.recipes.MHFCShapedRecipes;
import mhfc.net.common.crafting.recipes.MHFCShapelessRecipe;
import net.minecraft.block.Block;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;

public class MHFCCraftingManager {
	private static final MHFCCraftingManager instance = new MHFCCraftingManager();

	private Set<IRecipe> recipes;

	public static final MHFCCraftingManager getInstance() {
		return instance;
	}

	public MHFCCraftingManager() {
		recipes = new LinkedHashSet<>();
	}

	// TODO: beautify this, is an akward method to add recipes
	// TODO rework this, pls, separation of concerns
	public ItemStack findMatchingRecipe(InventoryCrafting par1InventoryCrafting, World par2World) {
		int var3 = 0;
		ItemStack var4 = null;
		ItemStack var5 = null;
		int var6;

		for (var6 = 0; var6 < par1InventoryCrafting.getSizeInventory(); ++var6) {
			ItemStack var7 = par1InventoryCrafting.getStackInSlot(var6);

			if (var7 != null) {
				if (var3 == 0) {
					var4 = var7;
				}

				if (var3 == 1) {
					var5 = var7;
				}

				++var3;
			}
		}

		if (var3 == 2 && var4.getItem() == var5.getItem() && var4.getCount() == 1 && var5.getCount() == 1
				&& var5.getItem().isRepairable()) {
			Item var11 = var5.getItem();
			int var13 = var11.getMaxDamage() - var4.getItemDamage();
			int var8 = var11.getMaxDamage() - var5.getItemDamage();
			int var9 = var13 + var8 + var11.getMaxDamage() * 5 / 100;
			int var10 = var11.getMaxDamage() - var9;

			if (var10 < 0) {
				var10 = 0;
			}

			return new ItemStack(var4.getItem(), 1, var10);
		}

		for (IRecipe var12 : this.recipes) {
			if (var12.matches(par1InventoryCrafting, par2World)) {
				return var12.getCraftingResult(par1InventoryCrafting);
			}
		}

		return ItemStack.EMPTY;
	}

	public Set<IRecipe> getRecipeList() {
		return this.recipes;
	}

	public MHFCShapedRecipes addShapedRecipe(ItemStack par1ItemStack, Object... par2ArrayOfObj) {

		// TODO this should be moved into an constructor of shaped recipe
		String var3 = "";
		int var4 = 0;
		int var5 = 0;
		int var6 = 0;

		if (par2ArrayOfObj[var4] instanceof String[]) {
			String[] var7 = ((String[]) par2ArrayOfObj[var4++]);

			for (String var9 : var7) {
				++var6;
				var5 = var9.length();
				var3 = var3 + var9;
			}
		} else {
			while (par2ArrayOfObj[var4] instanceof String) {
				String var11 = (String) par2ArrayOfObj[var4++];
				++var6;
				var5 = var11.length();
				var3 = var3 + var11;
			}
		}

		HashMap<Character, ItemStack> var12 = new HashMap<>();

		for (; var4 < par2ArrayOfObj.length; var4 += 2) {
			Character var13 = (Character) par2ArrayOfObj[var4];
			ItemStack var14 = null;

			if (par2ArrayOfObj[var4 + 1] instanceof Item) {
				var14 = new ItemStack((Item) par2ArrayOfObj[var4 + 1]);
			} else if (par2ArrayOfObj[var4 + 1] instanceof Block) {
				var14 = new ItemStack((Block) par2ArrayOfObj[var4 + 1], 1, -1);
			} else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack) {
				var14 = (ItemStack) par2ArrayOfObj[var4 + 1];
			}

			var12.put(var13, var14);
		}

		ItemStack[] var15 = new ItemStack[var5 * var6];

		for (int var16 = 0; var16 < var5 * var6; ++var16) {
			char var10 = var3.charAt(var16);

			if (var12.containsKey(Character.valueOf(var10))) {
				var15[var16] = var12.get(Character.valueOf(var10)).copy();
			} else {
				var15[var16] = null;
			}
		}

		MHFCShapedRecipes var17 = new MHFCShapedRecipes(var5, var6, var15, par1ItemStack);
		this.recipes.add(var17);
		return var17;
	}

	public void addShapelessRecipe(ItemStack par1ItemStack, ItemStack... recipeStacks) {
		List<ItemStack> var3 = new ArrayList<>();
		var3.addAll(Arrays.asList(recipeStacks));
		this.recipes.add(new MHFCShapelessRecipe(par1ItemStack, var3));
	}

}

 

 

And ended up with this crash. It seems there is no mhfc package related.

 

---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 4/23/17 1:02 PM
Description: Rendering screen

java.lang.NullPointerException: Rendering screen
	at net.minecraft.client.gui.inventory.GuiContainer.drawSlot(GuiContainer.java:274)
	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:117)
	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382)
	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1164)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1146)
	at net.minecraft.client.Minecraft.run(Minecraft.java:405)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraft.client.gui.inventory.GuiContainer.drawSlot(GuiContainer.java:274)
	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:117)
	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382)

-- Screen render details --
Details:
	Screen name: mhfc.net.client.gui.GuiHunterBench
	Mouse location: Scaled: (213, 119). Absolute: (427, 240)
	Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player694'/0, l='MpServer', x=522.75, y=4.00, z=319.43]]
	Chunk stats: MultiplayerChunkCache: 81, 81
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (529,4,332), Chunk: (at 1,0,12 in 33,20; contains blocks 528,0,320 to 543,255,335), Region: (1,0; contains chunks 32,0 to 63,31, blocks 512,0,0 to 1023,255,511)
	Level time: 3932 game time, 1 day time
	Level dimension: 0
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
	Forced entities: 1 total; [EntityPlayerSP['Player694'/0, l='MpServer', x=522.75, y=4.00, z=319.43]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:451)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2780)
	at net.minecraft.client.Minecraft.run(Minecraft.java:426)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.11
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_102, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 872090520 bytes (831 MB) / 1621098496 bytes (1546 MB) up to 3797417984 bytes (3621 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.35 Powered by Forge 13.19.1.2189 6 mods loaded, 6 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11-13.19.1.2189.jar) 
	UCHIJAAAA	forge{13.19.1.2189} [Minecraft Forge] (forgeSrc-1.11-13.19.1.2189.jar) 
	UCHIJAAAA	mcanm{2.6.0.125} [Minecraft Animated] (MCAnm-v2.6.0-deobf.jar) 
	UCHIJAAAA	worldedit{6.1.6} [WorldEdit] (worldedit-forge-mc1.11-6.1.6-dev.jar) 
	UCHIJAAAA	mhfc{${version}} [§6Monster Hunter Frontier Craft] (bin) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 353.82' Renderer: 'GeForce 920M/PCIe/SSE2'
	Launched Version: 1.11
	LWJGL: 2.9.4
	OpenGL: GeForce 920M/PCIe/SSE2 GL version 4.5.0 NVIDIA 353.82, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: PureBDcraft  64x MC19.zip
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 4x Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz

 

Posted (edited)
8 minutes ago, Heltrato said:

java.lang.NullPointerException: Rendering screen
	at net.minecraft.client.gui.inventory.GuiContainer.drawSlot(GuiContainer.java:274)
	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:117)

 

This exception is thrown when GuiContainer tries to render a Slot with a null ItemStack in it.

 

MHFCCraftingManager is still using null ItemStacks in several places, you need to fix this.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

Update:gone to slothunter bench and replaced all null into ItemStack.Empty . but holly molyy now my minecraft hangs..

 

---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 4/23/17 2:40 PM
Description: Ticking player

java.lang.NullPointerException: Ticking player
	at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:442)
	at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:89)
	at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292)
	at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2134)
	at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:879)
	at net.minecraft.world.World.updateEntity(World.java:2101)
	at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:676)
	at net.minecraft.world.World.updateEntities(World.java:1890)
	at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547)
	at java.lang.Thread.run(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
	at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:442)
	at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:89)
	at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292)
	at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2134)
	at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:879)
	at net.minecraft.world.World.updateEntity(World.java:2101)

-- Player being ticked --
Details:
	Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
	Entity ID: 0
	Entity Name: Player512
	Entity's Exact location: 634.70, 4.00, -736.15
	Entity's Block location: World: (634,4,-737), Chunk: (at 10,0,15 in 39,-47; contains blocks 624,0,-752 to 639,255,-737), Region: (1,-2; contains chunks 32,-64 to 63,-33, blocks 512,0,-1024 to 1023,255,-513)
	Entity's Momentum: 0.00, -0.08, 0.00
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
	at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:676)
	at net.minecraft.world.World.updateEntities(World.java:1890)
	at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647)

-- Affected level --
Details:
	Level name: New World
	All players: 1 total; [EntityPlayerMP['Player512'/0, l='New World', x=634.70, y=4.00, z=-736.15]]
	Chunk stats: ServerChunkCache: 256 Drop: 0
	Level seed: 1928336456568822493
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (645,4,-733), Chunk: (at 5,0,3 in 40,-46; contains blocks 640,0,-736 to 655,255,-721), Region: (1,-2; contains chunks 32,-64 to 63,-33, blocks 512,0,-1024 to 1023,255,-513)
	Level time: 2825 game time, 0 day time
	Level dimension: 0
	Level storage version: 0x04ABD - Anvil
	Level weather: Rain time: 98798 (now: false), thunder time: 45343 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.11
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_102, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 533167192 bytes (508 MB) / 1945108480 bytes (1855 MB) up to 3797417984 bytes (3621 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.35 Powered by Forge 13.19.1.2189 6 mods loaded, 6 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11-13.19.1.2189.jar) 
	UCHIJAAAA	forge{13.19.1.2189} [Minecraft Forge] (forgeSrc-1.11-13.19.1.2189.jar) 
	UCHIJAAAA	mcanm{2.6.0.125} [Minecraft Animated] (MCAnm-v2.6.0-deobf.jar) 
	UCHIJAAAA	worldedit{6.1.6} [WorldEdit] (worldedit-forge-mc1.11-6.1.6-dev.jar) 
	UCHIJAAAA	mhfc{${version}} 6Monster Hunter Frontier Craft] (bin) 
	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 1 / 8; [EntityPlayerMP['Player512'/0, l='New World', x=634.70, y=4.00, z=-736.15]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

 

 

[14:39:59] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@6eb98739[id=4296a45d-fd1d-3a8b-9f25-0f078d10cc6b,name=Player512,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
	at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3062) [Minecraft.class:?]
	at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_102]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_102]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_102]
[14:40:07] [Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException: The validated object is null
	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_102]
	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_102]
	at net.minecraft.util.Util.runTask(Util.java:27) [Util.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:753) [MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698) [MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_102]
Caused by: java.lang.NullPointerException: The validated object is null
	at org.apache.commons.lang3.Validate.notNull(Validate.java:222) ~[commons-lang3-3.3.2.jar:3.3.2]
	at org.apache.commons.lang3.Validate.notNull(Validate.java:203) ~[commons-lang3-3.3.2.jar:3.3.2]
	at net.minecraft.util.NonNullList.add(NonNullList.java:54) ~[NonNullList.class:?]
	at java.util.AbstractList.add(Unknown Source) ~[?:1.8.0_102]
	at net.minecraft.inventory.Container.getInventory(Container.java:64) ~[Container.class:?]
	at net.minecraft.inventory.Container.addListener(Container.java:53) ~[Container.class:?]
	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:100) ~[FMLNetworkHandler.class:?]
	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2725) ~[EntityPlayer.class:?]
	at mhfc.net.common.block.container.BlockHunterBench.onBlockActivated(BlockHunterBench.java:41) ~[BlockHunterBench.class:?]
	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:474) ~[PlayerInteractionManager.class:?]
	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:701) ~[NetHandlerPlayServer.class:?]
	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_102]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_102]
	at net.minecraft.util.Util.runTask(Util.java:26) ~[Util.class:?]
	... 5 more

 

Edited by Heltrato
not ocmplete
Posted (edited)

You still have a null ItemStack somewhere in the inventory used by the Container. To narrow it down, set a breakpoint inside the for loop Container#getInventory with the condition inventorySlots.get(i).getStack() == null (i.e. the Slot's ItemStack is null). When the breakpoint is hit, look at the Slot's inventory (Slot#inventory or SlotItemHandler#itemHandler) and index (Slot#slotIndex) to see which inventory slot contains the null ItemStack.

 

Once you know where the null ItemStack is, you can figure out where that slot is set from and why it's being set to null.

 

To help avoid errors like this, annotate any ItemStack return value or parameter with @Nonnull. Your IDE will warn you when you return a nullable value from a @Nonnull method or pass a nullable value to a @Nonnull parameter.

 

If you copy the package-info.java file from a vanilla package into your own packages, the @MethodsReturnNonnullByDefault and @ParametersAreNonnullByDefault annotations will tell your IDE that the methods and parameters in that package are @Nonnull by default. Use @Nullable if a method can return or accept null values.

Edited by Choonster
  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

Update i started debugging this line

 

 

  public NonNullList<ItemStack> getInventory()
    {
        NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>create();

        for (int i = 0; i < this.inventorySlots.size(); ++i)
        {
            nonnulllist.add(((Slot)this.inventorySlots.get(i)).getStack());  // <--- BREAKPOINT HERE.
        }

        return nonnulllist;
    }

 

But after i created a new world it begans to stop

havent opening the block yet.

Edited by Heltrato
Posted

I able to bypass the world load by disabling the line and enabiling as soon as i right click the block. Now i see a NULL at defaultElement then i set it as ItemStack.EMPTY.

Posted
57 minutes ago, Heltrato said:

Update i started debugging this line

 

But after i created a new world it begans to stop

havent opening the block yet.

 

Did you set a condition for the breakpoint like I said? If you did, it should only trigger when you right click on the block to open the GUI.

 

30 minutes ago, Heltrato said:

I able to bypass the world load by disabling the line and enabiling as soon as i right click the block. Now i see a NULL at defaultElement then i set it as ItemStack.EMPTY.

 

That's not the field I told you to look at. It's normal for that field to be null.

 

16 minutes ago, Matryoshika said:

Don't think that that is proper Java syntax there

Just call NonNullList.create().

 

It is valid, though not normally needed. That snippet of code is from vanilla, not the OP's mod.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
3 hours ago, Choonster said:

 

Did you set a condition for the breakpoint like I said? If you did, it should only trigger when you right click on the block to open the GUI.

 

 

That's not the field I told you to look at. It's normal for that field to be null.

 

 

It is valid, though not normally needed. That snippet of code is from vanilla, not the OP's mod.

Sorry Late reply i just took a nap anyways here is the progress.

 

 I added the conditions

 

and as far as my searching for nulls this is what i found 

Inside inventorySlots>elementData>[0..99]>[0](which is the Hunter Bench>inventory>stackresults etc.

 

 

 

Posted

Somehow the InventoryCraftResult#stackResult NonNullList has an instance of Arrays.ArrayList as its delegate list but null as its default element. This shouldn't be possible unless the protected NonNullList(List<E>, E) constructor was called directly rather than being called through NonNullList#create or NonNullList#withSize.

 

Does ContainerHunterBench use the vanilla InventoryCraftResult class? Post the ContainerHunterBench, TileEntityHunterBench and InventoryCraftResult (if it's your own) classes.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
42 minutes ago, Choonster said:

Somehow the InventoryCraftResult#stackResult NonNullList has an instance of Arrays.ArrayList as its delegate list but null as its default element. This shouldn't be possible unless the protected NonNullList(List<E>, E) constructor was called directly rather than being called through NonNullList#create or NonNullList#withSize.

 

Does ContainerHunterBench use the vanilla InventoryCraftResult class? Post the ContainerHunterBench, TileEntityHunterBench and InventoryCraftResult (if it's your own) classes.

Yes it does wait up 

 

Container Hunter Bench

package mhfc.net.client.container;

import mhfc.net.client.gui.slot.SlotHunterBench;
import mhfc.net.common.core.registry.MHFCBlockRegistry;
import mhfc.net.common.crafting.MHFCCraftingManager;
import mhfc.net.common.tile.TileHunterBench;
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.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class ContainerHunterBench extends Container {
	public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 5);
	public IInventory craftResult = new InventoryCraftResult();
	private World worldObj;
	private int posX;
	private int posY;
	private int posZ;

	public ContainerHunterBench(InventoryPlayer par1InventoryPlayer, World par2World, TileHunterBench tileEntity, int x,int y,int z) {
		this.worldObj = par2World;
		this.posX = x;
		this.posY = y;
		this.posZ = z;
		this.addSlotToContainer(
				new SlotHunterBench(
						par1InventoryPlayer.player,
						this.craftMatrix,
						this.craftResult,
						0,
						124 + 8,
						35 + 1));
		int var6;
		int var7;

		for (var6 = 0; var6 < 5; ++var6) {
			for (var7 = 0; var7 < 3; ++var7) {
				this.addSlotToContainer(new Slot(this.craftMatrix, var7 + var6 * 3, 30 + var7 * 18, var6 * 18 + 15));
			}
		}

		for (var6 = 0; var6 < 3; ++var6) {
			for (var7 = 0; var7 < 9; ++var7) {
				this.addSlotToContainer(
						new Slot(par1InventoryPlayer, var7 + var6 * 9 + 9, 158 + var7 * 18, var6 * 18 + 15));
			}
		}

		for (var6 = 0; var6 < 9; ++var6) {
			this.addSlotToContainer(new Slot(par1InventoryPlayer, var6, 158 + var6 * 18, 84));
		}

		for (var6 = 0; var6 < 7; ++var6) {
			Slot s = new Slot(tileEntity, var6 + 3, var6 * 18 + 229, 28) {
				@Override
				public boolean isItemValid(ItemStack stack) {
					return false;
				}

				@Override
				public boolean canTakeStack(EntityPlayer p) {
					return false;
				}
			};
			this.addSlotToContainer(s);
		}

		for (var6 = 0; var6 < 7; ++var6) {
			this.addSlotToContainer(new Slot(tileEntity, var6 + 10, var6 * 18 + 229, 191) {
			});
		}

		this.addSlotToContainer(new Slot(tileEntity, TileHunterBench.resultSlot, 280, 146) {
			@Override
			public boolean isItemValid(ItemStack stack) {
				return false;
			}
		});

		this.addSlotToContainer(new Slot(tileEntity, TileHunterBench.fuelSlot, 354, 168));
		this.addSlotToContainer(new Slot(tileEntity, TileHunterBench.outputSlot, 335, 146));

		for (var6 = 0; var6 < 4; ++var6) {
			for (var7 = 0; var7 < 9; ++var7) {
				this.addSlotToContainer(new Slot(par1InventoryPlayer, var7 + var6 * 9, 7 + var6 * 18, var7 * 18 + 28));
			}
		}
		this.onCraftMatrixChanged(this.craftMatrix);
	}

	@Override
	public void onCraftMatrixChanged(IInventory par1IInventory) {
		this.craftResult.setInventorySlotContents(0,MHFCCraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
	}

	@Override
	public boolean canInteractWith(EntityPlayer par1EntityPlayer) {
		return this.worldObj.getBlockState(new BlockPos(this.posX, this.posY, this.posZ))
				.getBlock() != MHFCBlockRegistry.getRegistry().mhfcblockhunterbench
						? false
						: par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64.0D;
	}

	@Override
	public void onContainerClosed(EntityPlayer par1EntityPlayer) {
		super.onContainerClosed(par1EntityPlayer);

		if (!this.worldObj.isRemote) {
			for (int i = 0; i < 15; ++i) {
				ItemStack itemstack = this.craftMatrix.getStackInSlot(i);

				if (itemstack != null) {
					par1EntityPlayer.dropItem(itemstack, false);
				}
			}
		}
	}

	@Override
	public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
		ItemStack var3 = null;
		Slot var4 = this.inventorySlots.get(par2);

		if (var4 != null && var4.getHasStack()) {
			ItemStack var5 = var4.getStack();
			var3 = var5.copy();

			if (par2 == 0) {
				if (!this.mergeItemStack(var5, 10, 46, true)) {
					return null;
				}

				var4.onSlotChange(var5, var3);
			} else if (par2 >= 10 && par2 < 37) {
				if (!this.mergeItemStack(var5, 37, 46, false)) {
					return null;
				}
			} else if (par2 >= 37 && par2 < 46) {
				if (!this.mergeItemStack(var5, 10, 37, false)) {
					return null;
				}
			} else if (!this.mergeItemStack(var5, 10, 46, false)) {
				return null;
			}

			if (var5.getCount() == 0) {
				var4.putStack((ItemStack) null);
			} else {
				var4.onSlotChanged();
			}

			if (var5.getCount() == var3.getCount()) {
				return null;
			}

			var4.onTake(par1EntityPlayer, var5);
		}

		return var3;
	}

	@Override
	public boolean canMergeSlot(ItemStack par1ItemStack, Slot par2Slot) {
		return par2Slot.inventory != this.craftResult && super.canMergeSlot(par1ItemStack, par2Slot);
	}
}

 

 

Tile Entity

 

package mhfc.net.common.tile;

import mhfc.net.common.core.registry.MHFCEquipementRecipeRegistry;
import mhfc.net.common.crafting.recipes.equipment.EquipmentRecipe;
import mhfc.net.common.crafting.recipes.equipment.EquipmentRecipe.RecipeType;
import mhfc.net.common.index.ResourceInterface;
import mhfc.net.common.network.PacketPipeline;
import mhfc.net.common.network.message.bench.MessageBeginCrafting;
import mhfc.net.common.network.message.bench.MessageBenchRefreshRequest;
import mhfc.net.common.network.message.bench.MessageCancelRecipe;
import mhfc.net.common.network.message.bench.MessageCraftingUpdate;
import mhfc.net.common.network.message.bench.MessageSetRecipe;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.util.ITickable;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class TileHunterBench extends TileEntity implements ITickable, IInventory, TileMHFCUpdateStream {

	public static final int outputSlot = 2;
	public static final int fuelSlot = 0;
	public static final int resultSlot = 1;

	private ItemStack fuelStack;
	private ItemStack resultStack;
	private ItemStack[] recipeStacks;
	private ItemStack[] inputStacks;
	private ItemStack outputStack;

	/**
	 * How hot the furnace currently is
	 */
	volatile private int heatStrength;
	/**
	 * How hot the fire produced by the currently burning item is
	 */
	volatile private int heatFromItem;
	/**
	 * How long the furnace stays hot
	 */
	volatile private int heatLength;
	/**
	 * How long the furnace stayed hot initially with the burning item
	 */
	private int heatLengthInit;
	/**
	 * How long the current item has been smelting
	 */
	volatile private int itemSmeltDuration;
	/**
	 * The selected recipe
	 */
	private EquipmentRecipe recipe;
	/**
	 * If the recipe is currently worked on
	 */
	volatile private boolean workingMHFCBench;

	public TileHunterBench() {
		recipeStacks = new ItemStack[7];
		inputStacks = new ItemStack[recipeStacks.length];
		workingMHFCBench = false;
		heatLengthInit = 1;
	}

	@Override
	public int getSizeInventory() {
		return recipeStacks.length + inputStacks.length + 3;
	}

	@Override
	public void update() {
		if (heatLength > 0) {
			--heatLength;
			heatStrength = getNewHeat(heatStrength, heatFromItem);
			if (TileHunterBench.this.workingMHFCBench && recipe != null && heatStrength >= recipe.getRequiredHeat()) {
				++itemSmeltDuration;
			}
		} else {
			if (fuelStack != null && TileHunterBench.this.workingMHFCBench) {
				heatLength = TileEntityFurnace.getItemBurnTime(fuelStack);
				heatLengthInit = heatLength;
				heatFromItem = getItemHeat(fuelStack);
				decrStackSize(fuelSlot, 1);
				if (!world.isRemote) {
					sendUpdateCraft();
				}
			} else {
				heatStrength = getNewHeat(heatStrength, 0);
			}
		}
		if (recipe != null && itemSmeltDuration >= recipe.getDuration()) {
			finishRecipe();
		}
	}

	private void finishRecipe() {
		if (world.isRemote) {
			return;
		}
		inputStacks = new ItemStack[inputStacks.length];
		outputStack = resultStack.copy();
		workingMHFCBench = false;
		itemSmeltDuration = 0;
		sendUpdateCraft();
	}

	/**
	 * Forces the client to end the crafting and put the stack into the output slot. Unused
	 *
	 * @param stack
	 */
	@SideOnly(Side.CLIENT)
	public void forceEndCrafting(ItemStack stack) {
		outputStack = stack;
		inputStacks = new ItemStack[inputStacks.length];
		TileHunterBench.this.workingMHFCBench = false;
		itemSmeltDuration = 0;
	}

	public boolean isWorking() {
		return TileHunterBench.this.workingMHFCBench;
	}

	public void changeRecipe(EquipmentRecipe recipe) {
		if (world.isRemote) {
			sendSetRecipe(recipe);
		}
		if (recipe != this.recipe) {
			cancelRecipe();
			setRecipe(recipe);
		}
	}

	protected void setRecipe(EquipmentRecipe recipe) {
		if (recipe == null) {
			recipeStacks = new ItemStack[7];
			this.recipe = null;
			resultStack = null;
		} else {
			resultStack = recipe.getRecipeOutput();
			this.recipe = recipe;
			setIngredients(recipe);
		}
	}

	public void setIngredients(EquipmentRecipe recipe) {
		this.recipeStacks = recipe.getRequirements(7);
	}

	public static int getItemHeat(ItemStack itemStack) {
		if (itemStack == null) {
			return 0;
		}
		if (itemStack.getItem() == Item.getItemById(327)) {
			return 1000;
		}
		return 200;
	}

	private int getNewHeat(int heatOld, int heatAim) {
		int diff = heatAim - heatOld;
		// Some math to confuse the hell out of everyone reading this
		double change = Math.ceil(Math.log(Math.abs(diff) + 1.0));
		return heatOld + (int) (Math.ceil(change / 3.0) * Math.signum(diff));
	}

	@Override
	public ItemStack decrStackSize(int slot, int count) {
		markDirty();
		if (count <= 0) {
			return null;
		}
		// FIXME: can do that better...
		if (slot > recipeStacks.length + 2) {
			ItemStack stack = inputStacks[slot - recipeStacks.length - 3];
			if (stack == null) {
				return null;
			}
			cancelRecipe();
			if (count > stack.getCount()) {
				count = stack.getCount();
			}
			if (count == stack.getCount()) {
				inputStacks[slot - recipeStacks.length - 3] = null;
				return stack;
			}
			return stack.splitStack(count);
		}
		if (slot > 2) {
			return null; // You cant get anything from the recipe slots
		} else if (slot == outputSlot) {
			if (outputStack == null) {
				return null;
			}
			if (count > outputStack.getCount()) {
				count = outputStack.getCount();
			}
			if (count == outputStack.getCount()) {
				ItemStack fuel = outputStack;
				outputStack = null;
				return fuel;
			}
			return outputStack.splitStack(count);
		} else if (slot == resultSlot) {
			return null;
		} else {
			if (fuelStack == null) {
				return null;
			}
			if (count > fuelStack.getCount()) {
				count = fuelStack.getCount();
			}
			if (count == fuelStack.getCount()) {
				ItemStack fuel = fuelStack;
				fuelStack = null;
				return fuel;
			}
			return fuelStack.splitStack(count);
		}
	}

	/**
	 * Resets all working progress but leaves the recipe set
	 */
	public void cancelRecipe() {
		if (world.isRemote) {
			sendCancelRecipe();
		}
		TileHunterBench.this.workingMHFCBench = false;
		itemSmeltDuration = 0;
	}

	@Override
	public ItemStack removeStackFromSlot(int index) {
		ItemStack stack = getStackInSlot(index);
		setInventorySlotContents(index, null);
		return stack;
	}

	@Override
	public ItemStack getStackInSlot(int i) {
		if (i < 0 || i >= getSizeInventory()) {
			return null;
		} else if (i >= recipeStacks.length + 3) {
			return inputStacks[i - 3 - recipeStacks.length];
		} else if (i >= 3) {
			return recipeStacks[i - 3];
		} else if (i == outputSlot) {
			return outputStack;
		} else if (i == resultSlot) {
			return resultStack;
		} else {
			return fuelStack;
		}
	}

	@Override
	public void setInventorySlotContents(int i, ItemStack itemstack) {
		if (i < 0 || i >= getSizeInventory()) {
			return;
		}
		if (i >= recipeStacks.length + 3) {
			inputStacks[i - recipeStacks.length - 3] = itemstack;
		} else if (i >= 3) {
			recipeStacks[i - 3] = itemstack;
		} else if (i == outputSlot) {
			outputStack = itemstack;
		} else if (i == resultSlot) {
			resultStack = itemstack;
		} else if (i == fuelSlot) {
			fuelStack = itemstack;
		}
		markDirty();
	}

	public boolean isInvNameLocalized() {
		return false;
	}

	@Override
	public boolean isEmpty() {
		for (ItemStack stack : inputStacks) {
			if (!stack.isEmpty()) {
				return false;
			}
		}
		return true;
	}

	@Override
	public int getInventoryStackLimit() {
		return 64;
	}

	@Override
	public boolean isUsableByPlayer(EntityPlayer entityplayer) {
		return getDistanceSq(entityplayer.posX, entityplayer.posY, entityplayer.posZ) <= 64.0f;
	}

	@Override
	public boolean isItemValidForSlot(int i, ItemStack itemstack) {
		return (i == fuelSlot && TileEntityFurnace.isItemFuel(itemstack))
				|| (i > recipeStacks.length + 2 && i < recipeStacks.length * 2 + 3);
	}

	@Override
	public ITextComponent getDisplayName() {
		return new TextComponentTranslation(getName());
	}

	public boolean beginCrafting() {
		if (world.isRemote) {
			sendBeginCraft();
		}
		if (canBeginCrafting()) {
			TileHunterBench.this.workingMHFCBench = true;
		}
		return TileHunterBench.this.workingMHFCBench;
	}

	@SideOnly(Side.CLIENT)
	private void sendBeginCraft() {
		PacketPipeline.networkPipe.sendToServer(new MessageBeginCrafting(this));
	}

	@SideOnly(Side.CLIENT)
	private void sendSetRecipe(EquipmentRecipe recipeToSend) {
		PacketPipeline.networkPipe.sendToServer(new MessageSetRecipe(this, recipeToSend));
	}

	@SideOnly(Side.CLIENT)
	private void sendCancelRecipe() {
		PacketPipeline.networkPipe.sendToServer(new MessageCancelRecipe(this));
	}

	@Override
	public void refreshState() {
		if (world.isRemote) {
			PacketPipeline.networkPipe.sendToServer(new MessageBenchRefreshRequest(this));
		}
	}

	private void sendUpdateCraft() {
		PacketPipeline.networkPipe.sendToAll(new MessageCraftingUpdate(this));
	}

	public boolean canBeginCrafting() {
		return (recipe != null) && matchesInputOutput() && (outputStack == null);
	}

	protected boolean matchesInputOutput() {
		for (int i = 0; i < inputStacks.length; i++) {
			if (!ItemStack.areItemStacksEqual(inputStacks[i], recipeStacks[i])) {
				return false;
			}
		}
		return true;
	}

	public int getHeatStrength() {
		return heatStrength;
	}

	public int getBurningItemHeat() {
		return heatFromItem;
	}

	public int getHeatLength() {
		return heatLength;
	}

	public int getHeatLengthOriginal() {
		return heatLengthInit;
	}

	public int getItemSmeltDuration() {
		return itemSmeltDuration;
	}

	@Override
	public void readFromNBT(NBTTagCompound nbtTag) {
		super.readFromNBT(nbtTag);
		readCustomUpdate(nbtTag);

		NBTTagList items = nbtTag.getTagList("Items", 10);
		for (int a = 0; a < items.tagCount(); a++) {
			NBTTagCompound stack = items.getCompoundTagAt(a);
			byte id = stack.getByte("Slot");
			if (id >= 0 && id < getSizeInventory()) {
				setInventorySlotContents(id, new ItemStack(stack));
			}
		}
	}

	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound nbtTag) {
		nbtTag = super.writeToNBT(nbtTag);
		storeCustomUpdate(nbtTag);

		NBTTagList itemsStored = new NBTTagList();
		for (int a = 0; a < getSizeInventory(); a++) {
			ItemStack s = getStackInSlot(a);
			if (s != null) {
				NBTTagCompound tag = new NBTTagCompound();
				tag.setByte("Slot", (byte) a);
				s.writeToNBT(tag);
				itemsStored.appendTag(tag);
			}
		}
		nbtTag.setTag("Items", itemsStored);
		return nbtTag;
	}

	public EquipmentRecipe getRecipe() {
		return recipe;
	}

	private static final String heatStrID = "heatStrength";
	private static final String heatFromItemID = "heatFromItem";
	private static final String heatLengthID = "heatLength";
	private static final String heatLengthInitID = "heatLengthInit";
	private static final String itemSmeltDurationID = "itemSmeltDuration";
	private static final String workingID = "workingID";
	private static final String recipeTypeID = "recipeType";
	private static final String recipeIDID = "recipeID";

	@Override
	public void storeCustomUpdate(NBTTagCompound nbtTag) {
		nbtTag.setInteger(heatStrID, heatStrength);
		nbtTag.setInteger(heatFromItemID, heatFromItem);
		nbtTag.setInteger(heatLengthID, heatLength);
		nbtTag.setInteger(heatLengthInitID, heatLengthInit);
		nbtTag.setInteger(itemSmeltDurationID, itemSmeltDuration);
		nbtTag.setBoolean(workingID, TileHunterBench.this.workingMHFCBench);
		RecipeType type = recipe != null ? recipe.getRecipeType() : RecipeType.MHFC;
		int recipeID = MHFCEquipementRecipeRegistry.getIDFor(recipe);
		nbtTag.setInteger(recipeTypeID, type.ordinal());
		nbtTag.setInteger(recipeIDID, recipeID);
	}

	@Override
	public void readCustomUpdate(NBTTagCompound nbtTag) {
		heatStrength = nbtTag.getInteger(heatStrID);
		heatFromItem = nbtTag.getInteger(heatFromItemID);
		heatLength = nbtTag.getInteger(heatLengthID);
		heatLengthInit = nbtTag.getInteger(heatLengthInitID);
		itemSmeltDuration = nbtTag.getInteger(itemSmeltDurationID);
		TileHunterBench.this.workingMHFCBench = nbtTag.getBoolean(workingID);
		int irecType = nbtTag.getInteger(recipeTypeID);
		int recId = nbtTag.getInteger(recipeIDID);
		RecipeType recType = RecipeType.values()[irecType];
		setRecipe(MHFCEquipementRecipeRegistry.getRecipeFor(recId, recType));
	}

	@Override
	public String getName() {
		return "container" + ResourceInterface.block_hunterbench_name;
	}

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

	@Override
	public void openInventory(EntityPlayer player) {}

	@Override
	public void closeInventory(EntityPlayer player) {}

	@Override
	public void clear() {
		for (int i = 0; i < getSizeInventory(); ++i) {
			removeStackFromSlot(i);
		}
	}

	@Override
	public int getField(int id) {
		throw new IllegalArgumentException("No such field: " + id);
	}

	@Override
	public void setField(int id, int value) {
		throw new IllegalArgumentException("No such field: " + id);
	}

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

}

 

 

I dont have my own inventory crafting i uses vanilla.

Posted

Shit! looks like my team found a fix and its all in TileCraftingBench all along !!!! fak it 

 

Thank you for telling us the ItemStack.NULL. *phew 

 

Anyways here it is :D

 

Posted (edited)

You shouldn't be using or implementing IInventory or storing ItemStacks in arrays, create an IItemHandler field for each of the TileEntity's inventories and expose them using the Capability system. If you just need a temporary collection of ItemStacks without a formal inventory, use a NonNullList (created by calling NonNullList#withSize with ItemStack.EMPTY as the second argument) instead of an array.

 

This will help to eliminate any potential null ItemStacks.

Edited by Choonster
Fixed typo
  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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

    • Use the exclusive "acw696499" Temu coupon code to unlock the best discounts available in 2025. This code is especially beneficial for savvy shoppers in the USA, Canada, and across European nations. If you're an existing customer, this is your chance to cash in on massive savings. With our Temu coupon code 2025 for existing customers and Temu 70% discount coupon, there's never been a better time to shop. What Is The Temu Coupon Code 70% Off? At Temu, both new and returning customers are rewarded generously. With our Temu coupon 70% off and 70% off Temu coupon code, you can enjoy steep discounts whether you're shopping for the first time or coming back for more. acw696499 – Use this to get up to 70% off for new users. acw696499 – Apply it for a flat 70% discount for existing users. acw696499 – Unlock a $100 discount for new Temu users. acw696499 – Redeem a $100 coupon pack usable across multiple orders. acw696499 – Claim an extra $100 off promo code valid in the USA, Canada, and European nations. Temu Coupon Code 70% Off For New Users If you're new to Temu, you’re in for a treat. Our Temu coupon 70% off is your one-way pass to the best value for your first order. The Temu coupon code 70 off for existing users also holds great perks for loyal customers who haven't redeemed this offer yet. Here’s how new users can benefit from our code: acw696499 – Get a flat 70% discount right off the bat. acw696499 – Unlock a $100 coupon bundle exclusively for new customers. acw696499 – Redeem up to $100 in coupons across multiple transactions. acw696499 – Enjoy free shipping to 68 countries globally. acw696499 – Grab an extra 40% off your first purchase. How To Redeem The Temu 70% Off Coupon Code For New Customers? Using the Temu 70% off and Temu 70 off coupon code is easy. Just follow these steps: Download the Temu app or visit the official website. Create a new account or sign in. Add your favorite products to the cart. Proceed to checkout. Enter the coupon code acw696499 in the promo section. Hit "Apply" and enjoy your 70% discount. Temu Coupon Code 70% Off For Existing Users Existing users, don’t feel left out! With our exclusive Temu 70 off coupon code, you too can enjoy incredible savings. Our Temu coupon code for existing customers ensures you get the value you deserve for sticking with Temu. Check out these benefits: acw696499 – Enjoy a generous 70% discount on your next purchase. acw696499 – Unlock a $100 coupon bundle for multiple shopping sessions. acw696499 – Get a free gift with express shipping across the USA and Canada. acw696499 – Score an extra 30% off even on discounted items. acw696499 – Benefit from free shipping to 68 countries worldwide. How To Use The Temu Coupon Code 70% Off For Existing Customers? To use the Temu coupon code 70 off and Temu discount code for existing users, follow this quick guide: Open the Temu app or log in to the website. Log into your existing Temu account. Select your desired items and go to the cart. Enter the coupon code acw696499 in the promo box. Click "Apply" and see the savings roll in. How To Find The Temu Coupon Code 70% Off? You can easily find the Temu coupon code 70% off first order and latest Temu coupons 70 off through various platforms. Sign up for the Temu newsletter to get insider deals directly to your inbox. Follow Temu on their official social media accounts for flash deals and coupon drops. For verified and tested promo codes, make sure to visit trusted coupon websites like ours regularly. How Temu 70% Off Coupons Work? The Temu coupon code 70% off first time user and Temu coupon code 70 percent off work by applying the discount directly to your cart during checkout. All you need to do is enter the coupon code, and Temu automatically adjusts your total amount. These promo codes are valid for both app and website users. Whether you're shopping from the USA, Canada, or Europe, the discount applies as long as the code is valid and the items are eligible. No tricky terms, just straightforward savings. How To Earn 70% Off Coupons In Temu As A New Customer? To earn the Temu coupon code 70% off and Temu 70 off coupon code first order, simply sign up on Temu as a new customer. After registration, you’ll receive access to a welcome bonus pack, including exclusive discounts. You can also participate in Temu’s referral program to get even more discount codes. Keep your eyes on seasonal campaigns or app notifications, which often contain limited-time coupon opportunities. What Are The Advantages Of Using Temu 70% Off Coupons? The benefits of using our Temu 70% off coupon code legit and coupon code for Temu 70 off are truly impressive: 70% discount on your first order. $100 coupon bundle usable for multiple purchases. 70% discount on popular items across various categories. 70% off for existing Temu customers. Up to 70% off selected items. Free gift for new users. Free delivery to 68 countries. Temu Free Gift And Special Discount For New And Existing Users When you apply the Temu 70% off coupon code or 70% off Temu coupon code, you open the door to exclusive rewards and gifts. acw696499 – Get 70% discount on your first order. acw696499 – Enjoy an extra 30% off on any item. acw696499 – Claim a free gift exclusively for new Temu users. acw696499 – Score up to 70% discount on any item available in the Temu app. acw696499 – Get a free gift with free shipping to 68 countries including the USA and UK. Pros And Cons Of Using Temu Coupon Code 70% Off Here are some pros and cons of using the Temu coupon 70% off code and Temu free coupon code 70 off: Pros: Massive 70% discount on a wide range of items. Easy to apply and redeem. Works for both new and existing users. Includes free gifts and shipping. Valid across 68 countries. Cons: Can’t be combined with some other promotions. Limited to select items and categories. May have limited-time availability. Terms And Conditions Of The Temu 70% Off Coupon Code In 2025 Make sure to understand these terms when using our Temu coupon code 70% off free shipping and Temu coupon code 70% off reddit: The coupon code doesn’t have any expiration date. Valid for both new and existing users. Usable in 68 countries including the USA, Canada, and European regions. No minimum purchase required. Cannot be combined with some other limited-time offers. Must be entered manually at checkout to apply. Final Note Don’t miss out on this golden opportunity to save with our Temu coupon code 70% off. Whether you're a new shopper or a loyal Temu fan, the savings are too good to pass up. We hope this guide helps you take full advantage of the Temu 70% off coupon. Start shopping smart and enjoy unbeatable discounts today! FAQs Of Temu 70% Off Coupon What is the best Temu coupon code for 2025? The best code we recommend is "acw696499," which gives users up to 70% off, a $100 coupon pack, and free gifts for both new and existing users. Can existing users use the Temu 70% off coupon? Yes, existing users can use the "acw696499" coupon to get 70% off, free gifts, and shipping benefits. It’s not just for new users anymore.  Is the Temu 70% off coupon valid globally? Yes, the code works in 68 countries including the USA, UK, Canada, and across Europe. Just apply it at checkout to redeem your discounts.  How often can I use the Temu 70% off code? You can use it for multiple purchases as long as it’s valid and active. Some benefits are even reusable across different orders.  Where can I find working Temu coupons? Check the Temu app, sign up for their newsletter, follow their social media, or visit trusted coupon websites like ours for verified codes.
    • With the power of the acw696499 Temu coupon code, you can unlock some of the most valuable discounts available today. This code brings maximum benefits to users in the United Kingdom and across European nations. Whether you're typing in Temu coupon £100 off or looking for a Temu 100 off coupon code, we’ve got the verified solution for you. It’s time to shop smarter and save more. What Is The Coupon Code For Temu £100 Off? Both new and existing customers can get fantastic perks by using our Temu coupon £100 off on the Temu website or app. This £100 off Temu coupon is the key to scoring some of the best savings online. acw696499: Unlocks a flat £100 off your order instantly. acw696499: Provides a £100 coupon pack that can be used multiple times. acw696499: Offers a flat £100 discount for all new customers. acw696499: Delivers an extra £100 promo boost just for existing customers. acw696499: Exclusive £100 coupon for Temu users in the UK. Temu Coupon Code £100 Off For New Users In 2025 If you're new to Temu, you're in the perfect position to maximise your savings. Download the app and use our Temu coupon £100 off to enjoy unmatched value. acw696499: Get a flat £100 discount exclusively for new users. acw696499: Claim a generous £100 coupon bundle on sign-up. acw696499: Receive up to £100 in coupon savings for multiple purchases. acw696499: Enjoy free shipping across all European countries. acw696499: Snag an extra 30% off any item on your first purchase. How To Redeem The Temu coupon £100 off For New Customers? Using the Temu £100 coupon is as easy as a few simple steps. Follow this guide to activate the Temu £100 off coupon code for new users: Visit the Temu website or download the Temu app. Sign up as a new customer using your email or social media. Add your favourite items to your shopping basket. At checkout, enter the coupon code acw696499. Enjoy your £100 discount and proceed with payment. Temu Coupon £100 Off For Existing Customers Good news! Existing customers are not left out. Our Temu £100 coupon codes for existing users offer excellent value alongside Temu coupon £100 off for existing customers free shipping. acw696499: Gives you an additional £100 off for repeat Temu purchases. acw696499: Offers a £100 coupon bundle for multiple checkouts. acw696499: Includes a free gift with express delivery across Europe. acw696499: Grants up to 70% off on top of your existing discounts. acw696499: Enables free shipping benefits across the UK. How To Use The Temu Coupon Code £100 Off For Existing Customers? Applying the Temu coupon code £100 off is a breeze for our loyal users. Here's how to redeem the Temu coupon £100 off code: Log in to your existing Temu account. Browse and add items to your cart. Head to the checkout page. Paste the promo code acw696499 into the coupon field. Complete your order with the discount applied. Latest Temu Coupon £100 Off First Order If you’re making your first purchase, our promo code delivers unparalleled savings. Use the Temu coupon code £100 off first order, Temu coupon code first order, and Temu coupon code £100 off first time user to enjoy these benefits: acw696499: Flat £100 off your very first order. acw696499: Exclusive £100 Temu coupon code first order. acw696499: Up to £100 in multi-use coupon benefits. acw696499: Free delivery to all European destinations. acw696499: Additional 30% discount on any product for your first buy in the UK. How To Find The Temu Coupon Code £100 Off? Finding the best Temu coupon £100 off is easy if you know where to look. Many people also check platforms like Temu coupon £100 off Reddit to see what works for them. Sign up for the Temu newsletter to receive verified, up-to-date coupons. You can also check Temu’s official social media pages for ongoing promotions. Lastly, we recommend visiting reputable coupon sites like ours to grab the latest working codes. Is Temu £100 Off Coupon Legit? Yes, the Temu £100 Off Coupon Legit claim is absolutely true. You can trust our Temu 100 off coupon legit offer for all your shopping needs. The coupon code acw696499 is 100% legitimate and tested. It works smoothly on both new and existing orders throughout the UK and Europe. We’ve verified this code multiple times to ensure consistent results. Plus, it doesn’t expire, making it one of the most valuable promos available. How Does Temu £100 Off Coupon Work? The Temu coupon code £100 off first-time user and Temu coupon codes 100 off work by applying an instant discount to your total purchase amount. Just enter the code acw696499 at checkout, and £100 will be deducted from your total. This discount is automatically triggered once the code is validated, ensuring that you enjoy instant savings. Whether you’re a new customer or a long-time Temu user, this coupon applies directly to your basket and can be combined with other deals. It’s an easy way to reduce your costs while enjoying top-quality products. How To Earn Temu £100 Coupons As A New Customer? To earn Temu coupon code £100 off and 100 off Temu coupon code as a new user, simply register on the Temu app or website. Once your account is created, you’ll receive a welcome package including the promo code acw696499, allowing you to enjoy instant discounts. From there, you’ll also be eligible for Temu’s referral program, exclusive new-user promotions, and additional surprise vouchers. The best part? You don’t need to spend anything upfront to activate these perks. The more you shop, the more you save. What Are The Advantages Of Using The Temu Coupon £100 Off? Here are the top perks of using our Temu coupon code 100 off and Temu coupon code £100 off: £100 discount on your first order. £100 coupon bundle usable across multiple purchases. Up to 70% off on trending and popular items. Extra 30% off for existing Temu customers in the UK. Up to 90% off in selected clearance items. Free gift for new customers in the UK. Free shipping throughout Europe. Temu £100 Discount Code And Free Gift For New And Existing Customers By using our Temu £100 off coupon code and £100 off Temu coupon code, you unlock multiple rewards instantly. The acw696499 code is your gateway to amazing deals. acw696499: £100 discount on your very first Temu order. acw696499: Extra 30% discount on any item. acw696499: Free welcome gift for new users. acw696499: Up to 70% savings on items listed on the app. acw696499: Free gift along with free delivery in the UK and Europe. Pros And Cons Of Using Temu Coupon Code £100 Off This Month Explore the pros and cons of the Temu coupon £100 off code and Temu 100 off coupon this month: Pros: Massive £100 discount. Works for both new and existing users. Free shipping included. Additional offers stacked with the coupon. No expiration date. Cons: Not valid outside Europe and the UK. Requires coupon entry at checkout, which some may forget. Terms And Conditions Of Using The Temu Coupon £100 Off In 2025 Please keep in mind the following rules for the Temu coupon code £100 off free shipping and latest Temu coupon code £100 off: Valid for both new and existing users. Applicable in the UK and across Europe. No minimum purchase necessary. Coupon code acw696499 is required. No expiration date, use whenever you like. Final Note: Use The Latest Temu Coupon Code £100 Off Don’t miss out on this chance to save with the Temu coupon code £100 off. Whether you're buying fashion, gadgets, or home items, every pound counts. The Temu coupon £100 off is a game-changer for UK and European shoppers. Use it today and enjoy premium shopping at pocket-friendly prices. FAQs Of Temu £100 Off Coupon Can I use the Temu coupon code £100 off more than once? Yes, the coupon code can be used multiple times across different orders depending on eligibility.  Is the Temu 100 off coupon legit for UK users? Absolutely. The code acw696499 is verified and works smoothly for UK customers.  Does Temu offer free shipping with the £100 coupon code? Yes, all users using the code will enjoy free delivery across Europe.  Can existing users also use the Temu coupon £100 off? Yes, existing customers benefit from the same code with additional perks.  Where can I find the latest Temu £100 coupon code? Visit our website or trusted coupon platforms regularly for updated promo codes like acw696499.
    • Our special acw696499 Temu coupon code provides maximum benefits for shoppers in Europe, the USA, Canada, the Middle East, and beyond. Whether you're buying fashion, electronics, or home essentials, this code ensures you're getting the best deal available. With the Temu coupon code 2024 for existing customers and the unbeatable Temu 90% discount coupon, you’re all set to make the most of your purchases without breaking the bank. Let’s explore all the ways you can make the most of this exclusive offer! What Is The Temu Coupon Code 90% Off? Both new and existing customers can enjoy incredible benefits by using the Temu coupon 90% off on the app or website. This 90% off Temu coupon code is the key to unlocking up to 90% savings on thousands of items. acw696499 – Get up to 90% off on your first order as a new user. acw696499 – Enjoy an extra 30% discount if you’re an existing user. acw696499 – Redeem a flat 100€ off when you register as a new Temu customer. acw696499 – Receive a 100€ coupon pack usable over multiple purchases. acw696499 – Unlock 100€-300€ worth of coupons as a European shopper. Temu Coupon Code 90% Off For New Users If you’re new to Temu, you can enjoy maximum benefits by using the Temu coupon 90% off on your very first order. This offer is unmatched and ideal for first-time users wanting to save big with the Temu coupon code 90 off for existing users included for comparison. acw696499 – Enjoy a flat 90% discount on your first purchase. acw696499 – Unlock a 100€ coupon bundle as a welcome gift. acw696499 – Get up to 100€ in coupon bundles for repeat use. acw696499 – Benefit from free shipping to 68 countries worldwide. acw696499 – Receive 100€-300€ discount vouchers instantly. acw696499 – Grab an extra 30% off any first-time purchase. How To Redeem The Temu 90% Off Coupon Code For New Customers? To activate the Temu 90% off deal, start by installing the Temu app or visiting the website. Log in or sign up and follow the instructions below to use your Temu 90 off coupon code: Add your favourite items to the cart. Proceed to the checkout page. Enter the code acw696499 in the promo code box. Click "Apply" to activate the discount. Complete your payment and enjoy your savings! Temu Coupon Code 90% Off For Existing Users Returning users can also reap rewards by using our special coupon code on the Temu app. Whether you’re buying again or restocking, our Temu 90 off coupon code and Temu coupon code for existing customers work seamlessly to provide excellent value. acw696499 – Unlock a 90% discount as an existing Temu customer. acw696499 – Get a 100€ coupon pack for multiple future orders. acw696499 – Receive a free gift with express delivery throughout Europe. acw696499 – Enjoy an extra 90% off in addition to ongoing deals. acw696499 – Access free shipping to 68 international destinations. How To Use The Temu Coupon Code 90% Off For Existing Customers? Using the Temu coupon code 90 off is quick and effortless for repeat shoppers. Follow these steps to activate your Temu discount code for existing users: Open the Temu app or visit the official website. Sign into your existing account. Add products to your shopping bag. Enter the promo code acw696499 at checkout. Hit apply and finalize your order. How To Find The Temu Coupon Code 90% Off? Finding the Temu coupon code 90% off first order is easier than you think. Stay updated with latest Temu coupons 90 off by subscribing to their newsletter. You can also follow Temu’s official social media pages for time-limited promo codes and updates. Alternatively, check trusted coupon websites like ours to access verified and working deals every day. How Temu 90% Off Coupons Work? The Temu coupon code 90% off first time user works by slashing the total cost of your purchase by up to 90%. This is not just limited to new users; it often applies to selected deals for returning customers too. Once the code is entered at checkout, the system instantly recalculates the final price, applying the discount or activating special offers. The Temu coupon code 90 percent off can apply to a broad range of items across various categories, making it perfect for budget-conscious shoppers. How To Earn 90% Off Coupons In Temu As A New Customer? To earn the Temu coupon code 90% off, sign up on the app or site and you’ll automatically be eligible for exclusive welcome deals. New customers can also participate in daily sign-in bonuses and referral programs to earn more rewards. The Temu 90 off coupon code first order is typically part of the welcome package, which includes multiple coupons, free shipping perks, and even free gifts. Always keep your notifications on to never miss a limited-time offer. What Are The Advantages Of Using Temu 90% Off Coupons? Using the Temu 90% off coupon code legit has several great benefits. Here are the biggest advantages of our coupon code for Temu 90 off: 90% discount on your very first order. 100€ coupon bundle redeemable over multiple purchases. 75% discount on trending and popular items. 90% off for existing Temu customers. Up to 90% off on specially selected items. Free gift with your first order. Free international delivery to 68 countries. Temu Free Gift And Special Discount For New And Existing Users There are so many reasons to use our Temu 90% off coupon code for both new and returning customers. Whether you want a deal or a freebie, the 90% off Temu coupon code delivers. acw696499 – Get a 90% discount on your very first order. acw696499 – Redeem an extra 30% off on any purchase. acw696499 – Unlock a free gift for new customers. acw696499 – Score up to 75% off any item listed on Temu. acw696499 – Enjoy a free gift and free shipping across 68 countries. Pros And Cons Of Using Temu Coupon Code 90% Off Let’s explore the real benefits and a few limitations of using the Temu coupon 90% off code and Temu free coupon code 90 off: Pros: Massive 90% discount on selected purchases. Extra savings for both new and existing customers. Free gift with most coupon redemptions. Global shipping included at no extra cost. Works on both app and desktop. Cons: Some offers are time-limited. May not apply to all products. Needs manual entry at checkout. Terms And Conditions Of The Temu 90% Off Coupon Code In 2024 Be sure to understand the rules tied to the Temu coupon code 90% off free shipping and Temu coupon code 90% off reddit before using: The coupon code has no expiration date and can be used any time. It’s valid for both new and existing users in 68 countries. No minimum purchase is required to use the code. The offer includes free international shipping. Some items may be excluded based on inventory or promotions. Final Note Our Temu coupon code 90% off opens the door to amazing deals and big-time savings for smart shoppers like you. Whether you're a first-timer or seasoned user, this deal is not to be missed. With the Temu 90% off coupon, you can access deals, discounts, and gifts that make shopping a joy. Use our trusted code today and start saving! FAQs Of Temu 90% Off Coupon Is the Temu 90% off coupon valid for everyone? Yes, the coupon is valid for both new and existing users across multiple countries including the UK, France, Germany, and the USA.  How do I know the Temu 90% off code is legit? We personally verify all codes like acw696499 to ensure they are working, legit, and safe to use for everyone.  Can I use the 90% off Temu coupon more than once? New users can enjoy the discount once, but existing users may get additional offers and bundles for multiple use. Does the 90% off Temu coupon work on the app and website? Yes, you can use the code on both the Temu app and official website across mobile and desktop platforms.  Are there any hidden charges with the 90% off Temu coupon code? No hidden charges apply; what you see after applying the code is what you pay. Shipping is also free for many countries.
    • By using the exclusive code acw696499, you can unlock the maximum benefits that Temu has to offer, especially if you're located in Germany, France, Italy, Switzerland, or other European countries. Grab your Temu coupon 100€ off and apply this Temu 100 off coupon code today to enjoy massive discounts and exclusive perks only available to our European users. What Is The Coupon Code For Temu 100€ Off? Both new and existing customers can enjoy incredible savings when they use our exclusive Temu coupon 100€ off on the Temu app or website. This 100€ off Temu coupon brings substantial value across multiple purchases. acw696499: Get a flat 100€ off your shopping cart instantly. acw696499: Unlock a 100€ coupon pack for multiple uses throughout the month. acw696499: New users get a one-time 100€ flat discount on their first order. acw696499: Existing users can access an extra 100€ promo code. acw696499: A special 100€ coupon designed exclusively for our European users. Temu Coupon Code 100€ Off For New Users In 2025 If you're signing up for Temu in 2025, you're in luck! New users can get the maximum value by applying our Temu coupon 100€ off on the app. acw696499: Enjoy a flat 100€ discount when you place your first order. acw696499: Receive a valuable 100€ coupon bundle specially made for new users. acw696499: Redeem up to 100€ in coupons for multiple uses throughout the app. acw696499: Take advantage of free shipping all over Germany, France, Italy, and Switzerland. acw696499: Get an additional 30% discount on any purchase as a first-time user. How To Redeem The Temu coupon 100€ off For New Customers? To activate your Temu 100€ coupon and use the Temu 100€ off coupon code for new users, follow these easy steps: Download the Temu app or visit the Temu website. Sign up for a new account using your email address. Add your favorite products to the shopping cart. During checkout, enter the code acw696499 in the promo code field. Confirm your discount and complete your order to enjoy your 100€ off. Temu Coupon 100€ Off For Existing Customers Good news for loyal shoppers! The Temu 100€ coupon codes for existing users offer you more ways to save with exclusive deals and offers. The Temu coupon 100€ off for existing customers free shipping is available right now for users in Germany, France, Italy, Spain, Switzerland, and more. acw696499: Get an additional 100€ discount on your existing Temu account. acw696499: Unlock a 100€ coupon bundle usable over multiple purchases. acw696499: Receive a free gift with express shipping all over Europe. acw696499: Enjoy up to 70% off stacked on top of your 100€ discount. acw696499: Benefit from free delivery across European countries. How To Use The Temu Coupon Code 100€ Off For Existing Customers? To redeem your Temu coupon code 100€ off as a returning customer, follow this process: Open the Temu app or visit the website and log in to your account. Add your desired products to the cart. Enter the Temu coupon 100€ off code acw696499 at checkout. Apply the code and confirm your 100€ discount. Complete the purchase and enjoy your savings. Latest Temu Coupon 100€ Off First Order Whether you're a first-time shopper or planning your initial purchase, the Temu coupon code 100€ off first order delivers unbeatable savings. Use our Temu coupon code first order or Temu coupon code 100€ off first time user to unlock exclusive perks. acw696499: Flat 100€ discount on your very first purchase. acw696499: Apply this 100€ coupon code for immediate savings on your first order. acw696499: Get up to 100€ in coupons for repeated use. acw696499: Enjoy free shipping to countries like Germany, France, Italy, Switzerland, and Spain. acw696499: Save an extra 30% on any first-order purchase. How To Find The Temu Coupon Code 100€ Off? Finding a working Temu coupon 100€ off is easier than ever. Simply look for sources like Temu coupon 100€ off Reddit to see what others are using. You can also sign up for the Temu newsletter to receive verified and tested coupon codes directly to your inbox. Be sure to follow Temu's social media accounts and trusted coupon websites to stay updated with the newest offers. Is Temu 100€ Off Coupon Legit? Yes, the Temu 100€ Off Coupon Legit question is a valid one—but we assure you that the Temu 100 off coupon legit code is 100% real and working. Our exclusive code acw696499 is not only valid but also regularly tested and verified for use across Europe. It can be used multiple times with no hidden restrictions or expiration date. How Does Temu 100€ Off Coupon Work? The Temu coupon code 100€ off first-time user and Temu coupon codes 100 off work by directly applying the discount at checkout. You simply need to enter the code during the final payment stage to reduce the total amount by up to 100€. It works on eligible products, includes shipping benefits, and applies to both new and existing accounts based in Europe. How To Earn Temu 100€ Coupons As A New Customer? To earn Temu coupon code 100€ off and 100 off Temu coupon code, just register a new account on the Temu app. As a new customer, you'll receive bonus rewards, welcome gifts, and our exclusive 100€ off code by using acw696499. The more you shop, the more opportunities you'll have to earn additional coupons and discounts. What Are The Advantages Of Using Temu Coupon 100€ Off? Here are the top benefits of using the Temu coupon code 100 off and Temu coupon code 100€ off: 100€ discount on your very first Temu order. 100€ coupon bundle for multiple transactions. Up to 70% discount on high-demand products. Extra 30% off for returning Temu users in Europe. Up to 90% savings on selected limited-time items. Free gift for first-time European users. Free delivery across all European countries. Temu 100€ Discount Code And Free Gift For New And Existing Customers Using our Temu 100€ off coupon code and 100€ off Temu coupon code gives you a double benefit of savings and rewards. acw696499: Enjoy a 100€ discount on your first order. acw696499: Get an additional 30% off on any product. acw696499: Receive a special gift as a new Temu user. acw696499: Unlock up to 70% off on popular items. acw696499: Free gift with shipping to Germany, France, Italy, and Switzerland. Pros And Cons Of Using Temu Coupon Code 100€ Off This Month Check out the pros and cons of using the Temu coupon 100€ off code and Temu 100 off coupon: Pros: Flat 100€ off your first or recurring orders. Available to both new and existing European users. Free express shipping. Bonus discounts up to 70% on selected items. Additional 30% off during special sales. Cons: Some discounts may not apply to third-party sellers. Must manually enter the code during checkout. Terms And Conditions Of Using The Temu Coupon 100€ Off In 2025 Please read the terms for the Temu coupon code 100€ off free shipping and latest Temu coupon code 100€ off: Code is valid for both new and existing users. Available across European countries like Germany, France, Italy, Switzerland, and Spain. No expiration date—redeem anytime in 2025. No minimum purchase required. Not applicable with other promotional coupons. Final Note: Use The Latest Temu Coupon Code 100€ Off Unlock your full savings potential by applying the Temu coupon code 100€ off right now. There’s never been a better time to shop smart with Temu in Europe. Whether you're new or returning, the Temu coupon 100€ off helps you enjoy big discounts, free shipping, and free gifts today. FAQs Of Temu 100€ Off Coupon  What is the best Temu coupon code for new users in 2025? The best code is acw696499, which provides a flat 100€ off for new users and includes additional benefits like free shipping and extra discounts. Can existing users use the 100€ off Temu coupon? Yes, existing users can also use acw696499 to get a 100€ discount, bonus coupons, and free gifts, even if they’ve shopped before.  Is the 100€ Temu coupon code valid across all European countries? Absolutely. The coupon is valid for users in Germany, France, Italy, Spain, Switzerland, and all other European nations. How many times can I use the Temu coupon 100€ off code? You can use acw696499 for one-time major discounts and unlock bundled coupons for future use, depending on your user status.  Does the Temu 100€ off code expire? No, there is no expiry date attached to the acw696499 coupon code. You can use it anytime in 2025 and beyond.
    • We’ve got a fantastic deal for new users—just use the acw696499 Temu coupon code to unlock massive savings across Temu’s global marketplace. This code offers maximum benefits to shoppers in the USA, Canada, and major European countries. With the Temu coupon $100 off and Temu 100 off coupon code, you can enjoy generous discounts and exclusive offers. It’s your key to smart shopping without compromising on quality. What Is The Coupon Code For Temu $100 Off? Everyone loves a great deal, and Temu makes it even better with this limited-time offer. Whether you're a new or existing customer, the Temu coupon $100 off or $100 off Temu coupon is the real deal to watch. acw696499: Flat $100 off on your first purchase as a welcome bonus. acw696499: Access a $100 coupon pack with multiple-use options. acw696499: Exclusive $100 flat discount for new customers on sign-up. acw696499: Extra $100 promo code for existing customers. acw696499: Valid for all users in the USA and Canada for a $100 off coupon experience. Temu Coupon Code $100 Off For New Users In 2025 If you're just starting out with Temu, this deal is tailor-made for you. The Temu coupon $100 off and Temu coupon code $100 off are designed specifically to give new users an exceptional start. acw696499: Flat $100 discount for all new users. acw696499: Get a $100 coupon bundle instantly after registering. acw696499: Up to $100 coupon bundle usable over multiple orders. acw696499: Free shipping to 68 countries, making your first purchase even sweeter. acw696499: Enjoy an extra 30% off on any product as a first-time user. How To Redeem The Temu Coupon $100 Off For New Customers? Using the Temu $100 coupon and Temu $100 off coupon code for new users is easy: Download the Temu app or visit the Temu website. Register as a new user with your email or phone number. Go to the coupon section and enter code acw696499. Browse and add your favorite items to the cart. Apply the coupon at checkout to redeem your discount. Temu Coupon $100 Off For Existing Customers Temu doesn’t just stop at new users. Even returning shoppers can make the most of the Temu $100 coupon codes for existing users and Temu coupon $100 off for existing customers free shipping benefits. acw696499: $100 extra discount for existing Temu users. acw696499: Unlock a $100 coupon bundle for multiple purchases. acw696499: Get a free gift with express shipping throughout the USA and Canada. acw696499: Enjoy an extra 30% off on top of existing discounts. acw696499: Free shipping to 68 countries with no strings attached. How To Use The Temu Coupon Code $100 Off For Existing Customers? To use the Temu coupon code $100 off and Temu coupon $100 off code as an existing user: Log into your Temu account via app or website. Go to the ‘Coupons & Promotions’ section. Enter acw696499 in the coupon code box. Shop for your desired products. Apply the code during checkout to enjoy the savings. Latest Temu Coupon $100 Off First Order Your first order with Temu just got a whole lot more exciting. When you use the Temu coupon code $100 off first order, Temu coupon code first order, or Temu coupon code $100 off first time user, big savings await. acw696499: Flat $100 discount on your first order. acw696499: Activate your $100 Temu coupon code with ease. acw696499: Receive up to $100 worth of coupons for multiple purchases. acw696499: Enjoy free shipping across 68 countries. acw696499: Add 30% off on your first purchase. How To Find The Temu Coupon Code $100 Off? If you're searching for a Temu coupon $100 off or even a verified Temu coupon $100 off Reddit code, we’ve got you covered. Simply sign up for the Temu newsletter to get exclusive coupons straight to your inbox. You can also follow Temu’s official pages on Instagram, Facebook, or Twitter for surprise promo codes. For guaranteed and working coupons, visit any trusted coupon site—you’ll always find the best deals like acw696499 there. Is Temu $100 Off Coupon Legit? Yes, the Temu $100 Off Coupon Legit offer is 100% real. Our Temu 100 off coupon legit code—acw696499—has been tested and verified by thousands of users. You can safely use this code for $100 off on your first order and enjoy discounts on recurring purchases too. There’s no expiry date, and the code is valid globally. How Does Temu $100 Off Coupon Work? The Temu coupon code $100 off first-time user and Temu coupon codes 100 off offers work by instantly applying discounts to your cart. Once you sign up and apply the coupon code, Temu automatically adjusts the pricing to reflect your savings. Whether it’s a flat $100 off or a bundle, the discounts will apply across eligible items at checkout. How To Earn Temu $100 Coupons As A New Customer? To earn the Temu coupon code $100 off or 100 off Temu coupon code as a new customer, simply sign up on the Temu app or website. Enter the code acw696499 during registration or at checkout, and you’ll instantly unlock $100 worth of coupons. These can be applied over multiple orders, maximizing your benefits as a newcomer. What Are The Advantages Of Using The Temu Coupon $100 Off? The Temu coupon code 100 off and Temu coupon code $100 off offers bring many great benefits: $100 discount on the first order. $100 coupon bundle for multiple uses. Up to 70% discount on trending items. Extra 30% off for existing customers. Up to 90% off on selected categories. Free gift for new users. Free delivery to 68 countries. Temu $100 Discount Code And Free Gift For New And Existing Customers Using the Temu $100 off coupon code or $100 off Temu coupon code gives you unmatched savings and perks. Whether you’re a new or returning customer, you’ll love the benefits. acw696499: Enjoy a $100 discount on your very first order. acw696499: Get an extra 30% off on all purchases. acw696499: Free gift exclusively for new Temu users. acw696499: Up to 70% off across all product categories. acw696499: Free gift and free shipping in 68 countries, including the USA and UK. Pros And Cons Of Using The Temu Coupon Code $100 Off This Month Take advantage of the Temu coupon $100 off code and Temu 100 off coupon deals with these pros and cons: Pros: Massive $100 discount on eligible purchases. Works for both new and existing users. Stackable with other Temu offers. Valid in 68 countries worldwide. Comes with free shipping and gifts. Cons: Only valid through the app or website. May not apply to some sale items. Terms And Conditions Of Using The Temu Coupon $100 Off In 2025 Please read these Temu coupon code $100 off free shipping and latest Temu coupon code $100 off terms: Our coupon code acw696499 does not have an expiration date. The code is valid for both new and existing users. No minimum purchase is required to use this code. It applies across 68 countries worldwide. Free shipping and gifts are included. Final Note: Use The Latest Temu Coupon Code $100 Off Unlock unbeatable value with the Temu coupon code $100 off today. Whether you're new or returning, the savings are just one click away. Enjoy great deals, exclusive bundles, and premium products with our Temu coupon $100 off. Shop smart and save more every time. FAQs Of Temu $100 Off Coupon  Is the Temu $100 off coupon available to everyone? Yes, both new and existing users in supported countries can access the $100 off offer using code acw696499. How can I ensure my Temu coupon works? Use a trusted and verified code like acw696499 and follow the redemption steps properly at checkout. Does the Temu $100 coupon expire? No, our exclusive code acw696499 has no expiration date and can be used anytime.  Can I combine the $100 coupon with other discounts? Yes, Temu allows coupon stacking, so you can combine acw696499 with other ongoing deals.  Is the Temu $100 off coupon valid worldwide? Absolutely. The acw696499 code is valid in 68 countries, including the USA, Canada, and Europe.
  • Topics

×
×
  • Create New...

Important Information

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