Failender
Forge Modder-
Posts
1091 -
Joined
-
Last visited
Everything posted by Failender
-
if u have the index of the iron ingot access the player inventory and decrement the iron ingot stack. after that call player.inventory.addItemStack
-
create a super class like "MyMessageForAllMyTiles", write all the data that EVERY of ur tiles have ( let it implement IMessage ofc) after that you can inherit from that class and have much less effort. or you make one big message that supports all your tileentites and send one number for the "id" of each tileentity for switch case issues
-
Hey everyone, I made a knife that looses durability when cutting stuff. The problem is I need the recipe to work with the damage knife. I think there was a wildcare value you could add to make it accept damaged items, but I cant remember nor find it GameRegistry.addShapedRecipe(new ItemStack(SurvivalItems.slicedChicken, 4), "KC", 'K', new ItemStack(SurvivalItems.knife,1,WILDCARDVALUE), 'C', SurvivalItems.slicedChicken);
-
-
dude I meant you should define what you mean with location -.- drawTexturedModalRect(x, y, textureX, textureY, width, height);
-
define location
-
[1.8.9] Merge itemstacks with different nbt
Failender replied to Failender's topic in Modder Support
Well I did some research. Im gonna bet ten bucks its this public static boolean areItemStackTagsEqual(ItemStack stackA, ItemStack stackB) { return stackA == null && stackB == null ? true : (stackA != null && stackB != null ? (stackA.stackTagCompound == null && stackB.stackTagCompound != null ? false : stackA.stackTagCompound == null || stackA.stackTagCompound.equals(stackB.stackTagCompound)) : false); } So. If you say stackA.compound=stackB.compound you should be able to merge them no problem. But if you do that you could also create your own routine that checks every item inside a player inventory, compare the tagCompounds, and if they are "nearly equal" set the slot of the first stack to null and increment the second one stacksize. Maybe ill do some research tomorrow -
[1.8.9] Merge itemstacks with different nbt
Failender replied to Failender's topic in Modder Support
Well. How about we leave everything how it is :'D Thank you very much sir! -
[1.8] Custom Item Inventory, don't save the Items. (SOLVED)
Failender replied to YoungErtu's topic in Modder Support
I think the diamond is there because you are adding it everytime you create a new inventory..? new InventoryKeyring(player.getHeldItem()).setInventorySlotContents(0, new ItemStack(Items.diamond, 4)); -
Hey everyone, I have some data written to the nbt of every ItemFood. That works fine. What I want is to be able to merge itemstacks, even if the nbt is different. I have an value written to the stacks nbt called "creationdate", and I would be fine merging the stack everytime the creationdates difference isnt more then 20. Is there a way to do that? Greetz Fail
-
[1.8] Custom Item Inventory, don't save the Items. (SOLVED)
Failender replied to YoungErtu's topic in Modder Support
Well you are never saving your data to the itemstacks'nbt. override onContainerClosed and save your inventory to the itemstacks nbt there -
The class of your block should be for your block only. The registration of renderer should be in the clientproxy. The registration of the block itself should be in your main mod class or a class that collects all your blocks sorted There is no reason to keep a public static Block alloy_furnace in your class Look up naming conventions for java, your class name is malformed
-
I dont know which tutorial you watched for modding. But this is truely NOT the way. Please watch a basic tutorial for setting up your mod and registering blocks and then come back.
-
Well I know nothing about that, sorry
-
Simulate a right click on a specific block?
Failender replied to Anon10W1z's topic in Modder Support
-
You would need a separate class for that. You will need taht anyway if ur furnace should cook anything
-
[1.8] Gui Container is closing instantly (SOLVED)
Failender replied to YoungErtu's topic in Modder Support
ur welcome. -
[1.8] Gui Container is closing instantly (SOLVED)
Failender replied to YoungErtu's topic in Modder Support
you still shouldnt compare itemstacks via == -
[1.8] Gui Container is closing instantly (SOLVED)
Failender replied to YoungErtu's topic in Modder Support
What the hell is invStack? Please dont tell me that you are comparing an itemsack and an item and expect it to be equals -
well you need to make your block orientable. package de.busybeever.survivaloverhaul.blocks; import de.busybeever.survivaloverhaul.SurvivalOverhaul; import de.busybeever.survivaloverhaul.tileentity.TileEntitySaltCooker; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockState; 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.init.Items; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; public class SaltCooker extends Block{ public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); public SaltCooker() { super(Material.rock); setCreativeTab(SurvivalOverhaul.survivalTab); setUnlocalizedName("saltcooker"); this.setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); } @Override public IBlockState getStateForEntityRender(IBlockState state) { return getDefaultState().withProperty(FACING, EnumFacing.SOUTH); } @Override public IBlockState getStateFromMeta(int meta) { EnumFacing facing = EnumFacing.getFront(meta); if(facing.getAxis()==EnumFacing.Axis.Y) { facing=EnumFacing.NORTH; } return getDefaultState().withProperty(FACING, facing); } @Override public int getMetaFromState(IBlockState state) { return ((EnumFacing) state.getValue(FACING)).getIndex(); } @Override protected BlockState createBlockState() { return new BlockState(this, new IProperty[]{FACING}); } @Override public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } } [nobbc] [/nobbc]
-
Use spoiler/code tags PLEASE. this is my blockstate. You are never defining thbe variants And my models/block
-
Simulate a right click on a specific block?
Failender replied to Anon10W1z's topic in Modder Support
Hmm im not sure. Could you specifiy "not properly? Is it a lot a bit? You are not taking the players eye position, but that shouldnt make that much of a difference -
[1.7.10] Crash in Creative Tab, item Rendering error.
Failender replied to xxWhatsherfacex's topic in Modder Support
Well. You shouldnt be copy pasting code without knowing what its doing -
[1.7.10] Crash in Creative Tab, item Rendering error.
Failender replied to xxWhatsherfacex's topic in Modder Support
Show the crash please x)