Everything posted by Failender
-
[1.7.10] Change Items to another Item
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
-
[1.7.10] How to make a modular IMessage?
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
-
[1.8.9] Crafting with damaged items
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);
-
[1.7.10] How to make the Slots and the GUI
- [1.7.10] How to make the Slots and the GUI
dude I meant you should define what you mean with location -.- drawTexturedModalRect(x, y, textureX, textureY, width, height);- [1.7.10] How to make the Slots and the GUI
define location- [1.8.9] Merge itemstacks with different nbt
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
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)
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));- [1.8.9] Merge itemstacks with different nbt
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)
Well you are never saving your data to the itemstacks'nbt. override onContainerClosed and save your inventory to the itemstacks nbt there- [1.8] Rotate block model?
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- [1.8] Rotate block model?
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.- [1.8] Rotate block model?
Well I know nothing about that, sorry- Simulate a right click on a specific block?
- [1.8] Rotate block model?
- [1.8] Rotate block model?
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)
ur welcome.- [1.8] Gui Container is closing instantly (SOLVED)
you still shouldnt compare itemstacks via ==- [1.8] Gui Container is closing instantly (SOLVED)
What the hell is invStack? Please dont tell me that you are comparing an itemsack and an item and expect it to be equals- [1.8] Rotate block model?
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]- [1.8] Rotate block model?
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?
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.
Well. You shouldnt be copy pasting code without knowing what its doing- [1.7.10] Crash in Creative Tab, item Rendering error.
Show the crash please x) - [1.7.10] How to make the Slots and the GUI
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.