-
Posts
235 -
Joined
-
Last visited
Everything posted by abused_master
-
[Solved] [1.11] GUI Drawing confusion
abused_master replied to abused_master's topic in Modder Support
Looks correct except for this int xCoord = this.pos.getX(); int yCoord = this.pos.getY(); int zCoord = this.pos.getZ(); They serve no purpose. Removed, it still doesnt fix the problem though -
[Solved] [1.11] GUI Drawing confusion
abused_master replied to abused_master's topic in Modder Support
I have absolutely no idea if i did it right or not but was helped by TheCodedOne @Nullable @Override public SPacketUpdateTileEntity getUpdatePacket() { NBTTagCompound data = new NBTTagCompound(); writeToNBT(data); return new SPacketUpdateTileEntity(this.pos, 1, data); } @Override @SideOnly(Side.CLIENT) public void onDataPacket(NetworkManager networkManager, SPacketUpdateTileEntity s35PacketUpdateTileEntity) { readFromNBT(s35PacketUpdateTileEntity.getNbtCompound()); worldObj.markBlockRangeForRenderUpdate(this.pos, this.pos); markForUpdate(); } public void markForUpdate() { if (this.worldObj != null) { Block block = worldObj.getBlockState(this.pos).getBlock(); this.worldObj.notifyBlockUpdate(this.pos, worldObj.getBlockState(this.pos), worldObj.getBlockState(this.pos), 3); int xCoord = this.pos.getX(); int yCoord = this.pos.getY(); int zCoord = this.pos.getZ(); } } -
[Solved] [1.11] GUI Drawing confusion
abused_master replied to abused_master's topic in Modder Support
also Creative Energy Cell: public class TileCreativeEnergyCell extends TileEntity implements IEnergyReceiver, IEnergyProvider, ITickable { protected EnergyStorage storage = new EnergyStorage(1000000000); public static int SENDPERTICK = 6000; @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); return storage.writeToNBT(nbt); } @Override public boolean canConnectEnergy(EnumFacing from) { return true; } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } @Override public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { return storage.extractEnergy(maxExtract = 1000000, simulate); } @Override public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public int getMaxEnergyStored(EnumFacing from) { return storage.getMaxEnergyStored(); } public static boolean isEnergyTE(TileEntity te) { return te instanceof IEnergyHandler || (te != null && te.hasCapability(CapabilityEnergy.ENERGY, null)); } public static int receiveEnergy(TileEntity tileEntity, EnumFacing from, int maxReceive) { if (tileEntity instanceof IEnergyReceiver) { return ((IEnergyReceiver) tileEntity).receiveEnergy(from, maxReceive, false); } else if (tileEntity != null && tileEntity.hasCapability(CapabilityEnergy.ENERGY, from)) { IEnergyStorage capability = tileEntity.getCapability(CapabilityEnergy.ENERGY, from); if (capability.canReceive()) { return capability.receiveEnergy(maxReceive, false); } } return 0; } @Override public void update() { storage.setEnergyStored(1000000000); int energyStored = getEnergyStored(EnumFacing.DOWN); for (EnumFacing facing : EnumFacing.values()) { BlockPos pos = getPos().offset(facing); TileEntity te = worldObj.getTileEntity(pos); if (isEnergyTE(te)) { EnumFacing opposite = facing.getOpposite(); int rfToGive = SENDPERTICK <= energyStored ? SENDPERTICK : energyStored; int received; if (te instanceof IEnergyConnection) { IEnergyConnection connection = (IEnergyConnection) te; if (connection.canConnectEnergy(opposite)) { received = receiveEnergy(te, opposite, rfToGive); } else { received = 0; } } else { received = receiveEnergy(te, opposite, rfToGive); } energyStored -= storage.extractEnergy(received, false); if (energyStored <= 0) { break; } } } } } -
[Solved] [1.11] GUI Drawing confusion
abused_master replied to abused_master's topic in Modder Support
well the way i know it gained power is JAPTA has an item where you can right click blocks with and it will show you power stored / output "this block cannot store RF" -
Hey guys, back again with another problem So basically i created a Creative Energy Cell to test my blocks with, and made my gui check if my pulverizer has power to draw a certain section on the gui, now when i place my Energy Cell next to it, it gains power and draws the GUI, however, when i placed a generator from another mods (JAPTA) the pulverizer gained power, but didnt draw. I have no idea whats the cause of this or if im implementing the energy methods wrong in my TE GUI Code: package abused_master.JATMA.gui.machine; import abused_master.JATMA.Info; import abused_master.JATMA.tileentities.container.machine.PulverizerContainer; import abused_master.JATMA.tileentities.machine.TilePulverizer; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class GuiPulverizer extends GuiContainer { private static final ResourceLocation Pulverizer = new ResourceLocation(Info.MODID, "textures/gui/pulverizer_gui.png"); public static final int WIDTH = 176; public static final int HEIGHT = 166; TilePulverizer pulverizer; public GuiPulverizer(TilePulverizer tileEntity, PulverizerContainer container, TileEntity te) { super(container); xSize = WIDTH; ySize = HEIGHT; pulverizer = (TilePulverizer) tileEntity; } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { mc.getTextureManager().bindTexture(Pulverizer); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); if (pulverizer.powerStored > 0) { drawTexturedModalRect(guiLeft + 9, guiTop + 8, 177, 3, 14, 42); System.out.println("EnergyBar is being drawn!"); } } } TilePulverizer: public class TilePulverizer extends TileEnergyHandler implements ITickable { public EnergyStorage storage = new EnergyStorage(50000); public boolean hasPower; public int powerStored; @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); return storage.writeToNBT(nbt); } @Override public boolean canConnectEnergy(EnumFacing from) { return true; } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } @Override public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public int getMaxEnergyStored(EnumFacing from) { return storage.getMaxEnergyStored(); } @Override public void update() { if (storage.getEnergyStored() > 0) { powerStored = storage.getEnergyStored(); } } }
-
ahh i see, thanks for the explanation i guess ill be back once i read up on and try to use the capabilities system if i encounter any problems
-
The way i used to set my recipes in 1.10.2 was basically the way the Furnace did it, updating to 1.11 i used the furnace again for reference to that. pulverizerItemStacks is: private NonNullList<ItemStack> pulverizerItemStacks = NonNullList.<ItemStack>func_191197_a(2, ItemStack.field_190927_a);
-
Seems you were right, after changing them to ItemStack.field_190927_a, i ended up with this: @Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = ItemStack.field_190927_a; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 38, true)) { return ItemStack.field_190927_a; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (RecipePulverizer.instance().getPulverizingResult(itemstack1).func_190926_b()) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return ItemStack.field_190927_a; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 38, false)) { return ItemStack.field_190927_a; } } else if (index >= 30 && index < 38 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return ItemStack.field_190927_a; } } else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { return ItemStack.field_190927_a; } if (itemstack1.func_190926_b()) { slot.putStack((ItemStack)ItemStack.field_190927_a); } else { slot.onSlotChanged(); } if (itemstack1.func_190916_E() == itemstack.func_190916_E()) { return ItemStack.field_190927_a; } slot.func_190901_a(playerIn, itemstack1); } return itemstack; } } Shift clicking fixed, but placing an item in a slot still is not, How im setting my recipes \/ \/ \/ public boolean canPulverize() { if (((ItemStack)this.pulverizerItemStacks.get(0)).func_190926_b()) { return false; } else { return true; } } @Override public void update() { if (this.canPulverize()) { ItemStack itemstack = (ItemStack)this.pulverizerItemStacks.get(0); ItemStack itemstack1 = RecipePulverizer.instance().getPulverizingResult(itemstack); ItemStack itemstack2 = (ItemStack)this.pulverizerItemStacks.get(1); if (itemstack2.func_190926_b()) { this.pulverizerItemStacks.set(2, itemstack1.copy()); } else if (itemstack2.getItem() == itemstack1.getItem()) { itemstack2.func_190917_f(itemstack1.func_190916_E()); } itemstack.func_190918_g(1); }else { } }
-
[1.11] Changes on how to register entities?
abused_master replied to American2050's topic in Modder Support
How are you registering it? -
Hey guys, today i went about attempting to update my wip mod to 1.11, and have successfully done so for the most part, but am running into a few issues while updating my Pulverizer. Issue #1, The GUI, in 1.10.2 it was all working just fine, upon updating, i ran into a few errors with my transferStacInSlot 1.10.2: @Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 38, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (RecipePulverizer.instance().getPulverizingResult(itemstack1) != null) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return null; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 38, false)) { return null; } } else if (index >= 30 && index < 38 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(playerIn, itemstack1); } return itemstack; } so i tried looking at the furnace container and the method it was using was such: public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = ItemStack.field_190927_a; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return ItemStack.field_190927_a; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (!RecipePulverizer.instance().getPulverizingResult(itemstack1).func_190926_b()) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return ItemStack.field_190927_a; } } else if (TileEntityFurnace.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { return ItemStack.field_190927_a; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return ItemStack.field_190927_a; } } else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return ItemStack.field_190927_a; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return ItemStack.field_190927_a; } if (itemstack1.func_190926_b()) { slot.putStack(ItemStack.field_190927_a); } else { slot.onSlotChanged(); } if (itemstack1.func_190916_E() == itemstack.func_190916_E()) { return ItemStack.field_190927_a; } slot.func_190901_a(playerIn, itemstack1); } return itemstack; } i tried implementing this into my container thinking i would have the same result, but no #1 shift click give me: [14:18:56] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. #2 placing an item in the slot also results in the same error the second issue was opening the gui, when i right click my Pulverizer it seems as though its placing a second one in front of it, which is really weird, cant seem to figure out whats the cause of that. Another issue is simply breaking it. Once broken it appears to have broken but right clicking that area opens up its gui and you have to break it again for it to be removed. Block: package abused_master.JATMA.blocks; import abused_master.JATMA.JATMA; import abused_master.JATMA.tileentities.TilePulverizer; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockHorizontal; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; public class Pulverizer extends BlockContainer { public static final PropertyDirection FACING = BlockHorizontal.FACING; public Pulverizer(Material material) { super(material); this.setCreativeTab(JATMA.JATMA); this.setUnlocalizedName("pulverizer"); this.setHardness(2.0F); this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); } @Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TilePulverizer(); } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY) { if (!world.isRemote) { player.openGui(JATMA.instance, 0, world, pos.getX(), pos.getY(), pos.getZ()); } return true; } public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2); if (stack.hasDisplayName()) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityFurnace) { ((TileEntityFurnace)tileentity).setCustomInventoryName(stack.getDisplayName()); } } } public IBlockState getStateFromMeta(int meta) { EnumFacing enumfacing = EnumFacing.getFront(meta); if (enumfacing.getAxis() == EnumFacing.Axis.Y) { enumfacing = EnumFacing.NORTH; } return this.getDefaultState().withProperty(FACING, enumfacing); } public int getMetaFromState(IBlockState state) { return ((EnumFacing)state.getValue(FACING)).getIndex(); } public IBlockState withRotation(IBlockState state, Rotation rot) { return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING))); } public IBlockState withMirror(IBlockState state, Mirror mirrorIn) { return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); } protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {FACING}); } } Container: package abused_master.JATMA.tileentities.container; import javax.annotation.Nullable; import abused_master.JATMA.tileentities.craftinghandlers.RecipePulverizer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.inventory.SlotFurnaceOutput; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.SlotItemHandler; public class PulverizerContainer extends Container { IInventory TilePulverizer; public PulverizerContainer(InventoryPlayer playerInv, IInventory pulvInv) { super(); TilePulverizer = pulvInv; addSlotToContainer(new Slot(TilePulverizer, 0, 56, 26)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, TilePulverizer, 1, 116, 26)); for (int y = 0; y < 3; ++y) { for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x, 8 + x * 18, 142)); } } @Override public boolean canInteractWith(EntityPlayer playerIn) { return this.TilePulverizer.isUseableByPlayer(playerIn); } @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = ItemStack.field_190927_a; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return ItemStack.field_190927_a; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (!RecipePulverizer.instance().getPulverizingResult(itemstack1).func_190926_b()) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return ItemStack.field_190927_a; } } else if (TileEntityFurnace.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { return ItemStack.field_190927_a; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return ItemStack.field_190927_a; } } else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return ItemStack.field_190927_a; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return ItemStack.field_190927_a; } if (itemstack1.func_190926_b()) { slot.putStack(ItemStack.field_190927_a); } else { slot.onSlotChanged(); } if (itemstack1.func_190916_E() == itemstack.func_190916_E()) { return ItemStack.field_190927_a; } slot.func_190901_a(playerIn, itemstack1); } return itemstack; } }
-
[1.10.2] Issue Drawing Gui to Screen
abused_master replied to abused_master's topic in Modder Support
I dont believe i need packets as i remember a mod i was making as a test in the beginning when 1.10.2 came out, i had it set to get the amount of energy stored and do stuff based on how much is stored. Now to clarify thing up a bit, the issue im seeing is its not reading the amount of power stored, i know it IS storing power as i have done some tests to make sure of that. in the GUI class im telling it to check how much power is stored, max power storage is 50k, if the power stored is greater than 0 then draw the part of the image im telling it to. -
[1.10.2] Issue Drawing Gui to Screen
abused_master replied to abused_master's topic in Modder Support
No i do not -
Block texture not shown in hand, but on ground.
abused_master replied to gmod622's topic in Modder Support
dont make it all into 1 json file, make 1 json file for the blockstate and 1 for the block model, make sure you put the blockstate json into the correct folder and the block model json in the correct one aswell -
[1.10.2] Issue Drawing Gui to Screen
abused_master replied to abused_master's topic in Modder Support
Huh, silly me, i forgot to initialize the variable Thats that, but now to the draw method, im inputting energy from ender io CapacitorBanks so it has the energy, i have tested that earlier, but its almost as if this isnt reading the energy stored: if (pulverizer.storage.getEnergyStored() > 0) { drawTexturedModalRect(guiLeft + 9, guiTop + 8, 177, 3, 14, 42); } -
Hey guys, me again Iv pretty much fixed almost all my problems except this 1 that just keeps bugging me. In my gui I have this method: @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { mc.getTextureManager().bindTexture(Pulverizer); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); if (pulverizer.storage.getEnergyStored() > 0) { drawTexturedModalRect(guiLeft + 9, guiTop + 8, 177, 3, 14, 42); } } } Basically I'm checking my TE if the power stored is greater than 0, and if it is to draw a part of the gui on the screen that is not being drawn by the method above it. The problem im getting though is it crashes when i right click my block in game with the crash: http://pastebin.com/mZ74ADVC When i trace the crash it takes me to the if (pulverizer.storage.getEnergyStored() > 0) line im not sure how that has anything to do with it
-
[Solved] [1.10.2] Trouble Binding Recipes
abused_master replied to abused_master's topic in Modder Support
The problem is, you've overlapped two different ways of handling containers (the old way and the new way) and the two don't talk to each other. At all. You just kind of float along hoping Magic will solve it, but it won't. Ahh, did not know there was an old and a new way to do it. I have fixed my problem, Ty diesieben07, had not realized what you said since i had not looked at it closely enough. -
Hey everyone, so iv finally got down to making a recipe class and a few recipes for my pulverizer, but the problem im running into is binding it to my TE, i have looked at the vanilla furnace container and TE for doing this. as you can see in the code below i have tried doing it just like the furnace did it, but no luck. TE Code: package abused_master.JATMA.TE; import javax.annotation.Nullable; import abused_master.JATMA.GUI.GuiPulverizer; import abused_master.JATMA.Registry.ModBlocks; import abused_master.JATMA.TE.CraftingHandlers.RecipePulverizer; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; import cofh.api.energy.TileEnergyHandler; import net.minecraft.block.BlockFurnace; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.InventoryHelper; import net.minecraft.inventory.ItemStackHelper; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.ItemStackHandler; import scala.xml.persistent.SetStorage; public class TilePulverizer extends TileEntity implements ISidedInventory, IEnergyReceiver { protected EnergyStorage storage = new EnergyStorage(50000); public static final int SIZE = 2; private ItemStack[] pulverizerItemStacks = new ItemStack[2]; public TilePulverizer() { super(); } @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); if (nbt.hasKey("items")) { itemStackHandler.deserializeNBT((NBTTagCompound) nbt.getTag("items")); } } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setTag("items", itemStackHandler.serializeNBT()); return storage.writeToNBT(nbt); } @Override public boolean canConnectEnergy(EnumFacing from) { return true; } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } @Override public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public int getMaxEnergyStored(EnumFacing from) { return storage.getMaxEnergyStored(); } private ItemStackHandler itemStackHandler = new ItemStackHandler(SIZE) { @Override protected void onContentsChanged(int slot) { TilePulverizer.this.markDirty(); } }; public boolean canInteractWith(EntityPlayer playerIn) { return !isInvalid() && playerIn.getDistanceSq(pos.add(0.5D, 0.5D, 0.5D)) <= 64D; } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return true; } return super.hasCapability(capability, facing); } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return (T) itemStackHandler; } return super.getCapability(capability, facing); } @Override public int getSizeInventory() { return this.pulverizerItemStacks.length; } @Override public ItemStack getStackInSlot(int index) { return this.pulverizerItemStacks[index]; } @Override public ItemStack decrStackSize(int index, int count) { return ItemStackHelper.getAndSplit(this.pulverizerItemStacks, index, count); } @Override public ItemStack removeStackFromSlot(int index) { return ItemStackHelper.getAndRemove(this.pulverizerItemStacks, index); } @Override public void setInventorySlotContents(int index, ItemStack stack) { boolean flag = stack != null && stack.isItemEqual(this.pulverizerItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.pulverizerItemStacks[index]); this.pulverizerItemStacks[index] = stack; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) { stack.stackSize = this.getInventoryStackLimit(); } if (index == 0 && !flag) { this.markDirty(); } } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D; } @Override public void openInventory(EntityPlayer player) { } @Override public void closeInventory(EntityPlayer player) { } @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return false; } @Override public int getField(int id) { return 0; } @Override public void setField(int id, int value) { } @Override public int getFieldCount() { return 0; } @Override public void clear() { for (int i = 0; i < this.pulverizerItemStacks.length; ++i) { this.pulverizerItemStacks[i] = null; } } @Override public String getName() { return ModBlocks.Pulverizer.getUnlocalizedName(); } @Override public boolean hasCustomName() { return false; } @Override public int[] getSlotsForFace(EnumFacing side) { return null; } @Override public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) { return this.isItemValidForSlot(index, itemStackIn); } @Override public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { return true; } @Override public void markDirty() { } @Override public ITextComponent getDisplayName() { return null; } private boolean canPulverize() { if (this.pulverizerItemStacks[0] == null) { return false; } else { ItemStack itemstack = RecipePulverizer.instance().getPulverizingResult(this.pulverizerItemStacks[0]); if (itemstack == null) return false; if (this.pulverizerItemStacks[1] == null) return true; if (!this.pulverizerItemStacks[1].isItemEqual(itemstack)) return false; int result = pulverizerItemStacks[1].stackSize + itemstack.stackSize; return result <= getInventoryStackLimit() && result <= this.pulverizerItemStacks[2].getMaxStackSize(); } } public void PulverizeItemItem() { if (this.canPulverize()) { ItemStack itemstack = RecipePulverizer.instance().getPulverizingResult(this.pulverizerItemStacks[0]); if (this.pulverizerItemStacks[1] == null) { this.pulverizerItemStacks[1] = itemstack.copy(); } else if (this.pulverizerItemStacks[1].getItem() == itemstack.getItem()) { this.pulverizerItemStacks[1].stackSize += itemstack.stackSize; } --this.pulverizerItemStacks[0].stackSize; if (this.pulverizerItemStacks[0].stackSize <= 0) { this.pulverizerItemStacks[0] = null; } } } } Container Code: package abused_master.JATMA.TE.Container; import javax.annotation.Nullable; import abused_master.JATMA.GUI.SlotPulverizerOutput; import abused_master.JATMA.TE.TilePulverizer; import abused_master.JATMA.TE.CraftingHandlers.PulverizerRecipes; import abused_master.JATMA.TE.CraftingHandlers.RecipePulverizer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.inventory.SlotFurnaceOutput; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.SlotItemHandler; public class PulverizerContainer extends Container { IInventory TilePulverizer; public PulverizerContainer(InventoryPlayer playerInv, IInventory pulvInv, TileEntity tile) { super(); TilePulverizer = pulvInv; addSlotToContainer(new Slot(TilePulverizer, 0, 56, 26)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, TilePulverizer, 1, 116, 26)); for (int y = 0; y < 3; ++y) { for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(playerInv, x, 8 + x * 18, 142)); } } @Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 38, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (RecipePulverizer.instance().getPulverizingResult(itemstack1) != null) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return null; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 38, false)) { return null; } } else if (index >= 30 && index < 38 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(playerIn, itemstack1); } return itemstack; } @Override public boolean canInteractWith(EntityPlayer playerIn) { return this.TilePulverizer.isUseableByPlayer(playerIn); } } RecipeClass: package abused_master.JATMA.TE.CraftingHandlers; import java.util.Map; import java.util.Map.Entry; import javax.annotation.Nullable; import com.google.common.collect.Maps; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class RecipePulverizer { private static final RecipePulverizer PULVERIZING_BASE = new RecipePulverizer(); private final Map<ItemStack, ItemStack> pulvList = Maps.<ItemStack, ItemStack>newHashMap(); private final Map<ItemStack, Float> experienceList = Maps.<ItemStack, Float>newHashMap(); public static RecipePulverizer instance() { return PULVERIZING_BASE; } private RecipePulverizer() { this.addPulverizingRecipeForBlock(Blocks.COBBLESTONE, new ItemStack(Blocks.GRAVEL), 1.0F); this.addPulverizingRecipeForBlock(Blocks.GRAVEL, new ItemStack(Blocks.SAND), 1.0F); this.addPulverizingRecipeForBlock(Blocks.STONE, new ItemStack(Blocks.GRAVEL), 1.0F); } public void addPulverizingRecipeForBlock(Block input, ItemStack stack, float experience) { this.addPulverizingRecipeForItem(Item.getItemFromBlock(input), stack, experience); } public void addPulverizingRecipeForItem(Item input, ItemStack stack, float experience) { this.addSmeltingRecipe(new ItemStack(input, 1, 32767), stack, experience); } public void addSmeltingRecipe(ItemStack input, ItemStack stack, float experience) { if (getPulverizingResult(input) != null) { net.minecraftforge.fml.common.FMLLog.info("Ignored pulverizing recipe with conflicting input: " + input + " = " + stack); return; } this.pulvList.put(input, stack); this.experienceList.put(stack, Float.valueOf(experience)); } @Nullable public ItemStack getPulverizingResult(ItemStack stack) { for (Entry<ItemStack, ItemStack> entry : this.pulvList.entrySet()) { if (this.compareItemStacks(stack, (ItemStack)entry.getKey())) { return (ItemStack)entry.getValue(); } } return null; } private boolean compareItemStacks(ItemStack stack1, ItemStack stack2) { return stack2.getItem() == stack1.getItem() && (stack2.getMetadata() == 32767 || stack2.getMetadata() == stack1.getMetadata()); } public Map<ItemStack, ItemStack> getSmeltingList() { return this.pulvList; } public float getPulverizingExperience(ItemStack stack) { float ret = stack.getItem().getSmeltingExperience(stack); if (ret != -1) return ret; for (Entry<ItemStack, Float> entry : this.experienceList.entrySet()) { if (this.compareItemStacks(stack, (ItemStack)entry.getKey())) { return ((Float)entry.getValue()).floatValue(); } } return 0.0F; } }
-
[Solved] [1.10.2] Container Slots eat up items
abused_master replied to abused_master's topic in Modder Support
Ty guys, fixed my problem, was really easy actually -
[Solved] [1.10.2] Container Slots eat up items
abused_master replied to abused_master's topic in Modder Support
Nope, added it but that one doesnt even have shift click so i cant get it out at all Show your Gui code. as requested package abused_master.JATMA.GUI; import abused_master.JATMA.Info; import abused_master.JATMA.TE.TilePulverizer; import abused_master.JATMA.TE.Container.PulverizerContainer; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ContainerFurnace; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.translation.I18n; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class GuiPulverizer extends GuiContainer { private static final ResourceLocation Pulverizer = new ResourceLocation(Info.MODID, "textures/gui/Pulverizer.png"); public static final int WIDTH = 176; public static final int HEIGHT = 166; public GuiPulverizer(TilePulverizer tileEntity, PulverizerContainer container) { super(container); xSize = WIDTH; ySize = HEIGHT; } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { mc.getTextureManager().bindTexture(Pulverizer); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); } } -
[Solved] [1.10.2] Container Slots eat up items
abused_master replied to abused_master's topic in Modder Support
Nope, added it but that one doesnt even have shift click so i cant get it out at all -
[Solved] [1.10.2] Container Slots eat up items
abused_master replied to abused_master's topic in Modder Support
tried looking at the Container furnace class and copied their transferStackInSlot but still have the same problem -
[Solved] [1.10.2] Container Slots eat up items
abused_master replied to abused_master's topic in Modder Support
so i seem to have fixed the problem, but have ended up with 2 more #1 whenever a block/item is inserted it stays there, i cant click it out without shift clicking it #2 when i place just 1 item/block in and shift click it dupes it Updated TE Code: package abused_master.JATMA.TE; import javax.annotation.Nullable; import abused_master.JATMA.GUI.GuiPulverizer; import abused_master.JATMA.Registry.ModBlocks; import abused_master.JATMA.TE.CraftingHandlers.RecipePulverizer; import cofh.api.energy.EnergyStorage; import cofh.api.energy.TileEnergyHandler; import net.minecraft.block.BlockFurnace; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryHelper; import net.minecraft.inventory.ItemStackHelper; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.MathHelper; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.ItemStackHandler; import scala.xml.persistent.SetStorage; public class TilePulverizer extends TileEnergyHandler implements IInventory { protected EnergyStorage storage = new EnergyStorage(50000); public static final int SIZE = 2; private ItemStack[] pulverizerItemStacks = new ItemStack[3]; public TilePulverizer() { super(); } @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); if (nbt.hasKey("items")) { itemStackHandler.deserializeNBT((NBTTagCompound) nbt.getTag("items")); } } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setTag("items", itemStackHandler.serializeNBT()); return storage.writeToNBT(nbt); } @Override public boolean canConnectEnergy(EnumFacing from) { return true; } @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return storage.receiveEnergy(maxReceive, simulate); } @Override public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { return 0; } @Override public int getEnergyStored(EnumFacing from) { return storage.getEnergyStored(); } @Override public int getMaxEnergyStored(EnumFacing from) { return storage.getMaxEnergyStored(); } private ItemStackHandler itemStackHandler = new ItemStackHandler(SIZE) { @Override protected void onContentsChanged(int slot) { TilePulverizer.this.markDirty(); } }; public boolean canInteractWith(EntityPlayer playerIn) { return !isInvalid() && playerIn.getDistanceSq(pos.add(0.5D, 0.5D, 0.5D)) <= 64D; } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return true; } return super.hasCapability(capability, facing); } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return (T) itemStackHandler; } return super.getCapability(capability, facing); } @Override public String getName() { return ModBlocks.Pulverizer.getUnlocalizedName(); } @Override public boolean hasCustomName() { return false; } @Override public int getSizeInventory() { return 0; } @Override public ItemStack getStackInSlot(int index) { return this.pulverizerItemStacks[index]; } @Override public ItemStack decrStackSize(int index, int count) { return null; } @Override public ItemStack removeStackFromSlot(int index) { return null; } @Override public void setInventorySlotContents(int index, ItemStack stack) { boolean flag = stack != null && stack.isItemEqual(this.pulverizerItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.pulverizerItemStacks[index]); this.pulverizerItemStacks[index] = stack; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) { stack.stackSize = this.getInventoryStackLimit(); } if (index == 0 && !flag) { this.markDirty(); } } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return false; } @Override public void openInventory(EntityPlayer player) { } @Override public void closeInventory(EntityPlayer player) { } @Override public int getField(int id) { return 0; } @Override public void setField(int id, int value) { } @Override public int getFieldCount() { return 0; } @Override public void clear() { } @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; } public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) { return this.isItemValidForSlot(index, itemStackIn); } public void update() { boolean flag1 = false; if (!this.worldObj.isRemote) { if (this.pulverizerItemStacks[1] != null && this.pulverizerItemStacks[0] != null) { if (!this.canPulverize()) { } if (this.canPulverize()) { flag1 = true; } } else { } } if (flag1) { this.markDirty(); } } private boolean canPulverize() { if (this.pulverizerItemStacks[0] == null) { return false; } else { ItemStack itemstack = RecipePulverizer.instance().getPulverizingResult(this.pulverizerItemStacks[0]); if (itemstack == null) return false; if (this.pulverizerItemStacks[2] == null) return true; if (!this.pulverizerItemStacks[2].isItemEqual(itemstack)) return false; int result = pulverizerItemStacks[2].stackSize + itemstack.stackSize; return result <= getInventoryStackLimit() && result <= this.pulverizerItemStacks[2].getMaxStackSize(); } } public void pulverizeItem() { if (this.canPulverize()) { ItemStack itemstack = RecipePulverizer.instance().getPulverizingResult(this.pulverizerItemStacks[0]); if (this.pulverizerItemStacks[2] == null) { this.pulverizerItemStacks[2] = itemstack.copy(); } else if (this.pulverizerItemStacks[2].getItem() == itemstack.getItem()) { this.pulverizerItemStacks[2].stackSize += itemstack.stackSize; } --this.pulverizerItemStacks[0].stackSize; if (this.pulverizerItemStacks[0].stackSize <= 0) { this.pulverizerItemStacks[0] = null; } } } } -
Hey guys, so i was working on my recipemanager for my pulverizer today, and setup my slots using the vanilla slot, but whenever i try to put an item in it just eats it up, as soon as you click 1 or a stack in the slot it disappears. I have tried to create my own Slot and extend Slot but i just get the same problem Container: package abused_master.JATMA.TE.Container; import javax.annotation.Nullable; import abused_master.JATMA.GUI.RemoveOnlySlot; import abused_master.JATMA.GUI.SlotValidated; import abused_master.JATMA.GUI.SlotValidator; import abused_master.JATMA.TE.TilePulverizer; import abused_master.JATMA.TE.CraftingHandlers.PulverizerRecipes; import abused_master.JATMA.TE.CraftingHandlers.RecipePulverizer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.inventory.SlotFurnaceOutput; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.SlotItemHandler; public class PulverizerContainer extends Container { TilePulverizer TP; public PulverizerContainer(InventoryPlayer playerInv, TileEntity tile) { super(); TP = (TilePulverizer) tile; addSlotToContainer(new Slot(TP, 0, 56, 26)); addSlotToContainer(new Slot(TP, 1, 116, 26)); for (int y = 0; y < 3; ++y) { for (int x = 0; x < 9; ++x) { addSlotToContainer(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } for (int x = 0; x < 9; ++x) { addSlotToContainer(new Slot(playerInv, x, 8 + x * 18, 142)); } } @Override public boolean canInteractWith(EntityPlayer playerIn) { return TP.canInteractWith(playerIn); } @Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (RecipePulverizer.instance().getPulverizingResult(itemstack1) != null) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return null; } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return null; } } else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(playerIn, itemstack1); } return itemstack; } }
-
Custom Item JSON File Can't Be Found... D:
abused_master replied to Jimmeh's topic in Modder Support
Literally just did. haha. Have fun .-. https://github.com/Jimmeh94/TestMod 2 things, #1 i have created a pull request check out what i changed, #2 you made a very silly mistake with your resource folders, https://gyazo.com/7b4c4f63e490ad6b307c72dd448a090a it isnt supposed to be assets.test, its supposed to be a folder named assets, and another folder in that named test.