Everything posted by GotoLink
- 
	
		
		Error in crafting a block
		
		You are giving a null in your recipe. That is all i can tell without the code.
 - 
	
		
		Saving data w/ items [Solved]
		
		I stand corrected, I didn't read all of your code. This should work : @Override public void openChest() { if(bagpack.hasTagCompound()) { readFromNBT(bagpack.getTagCompound());//Bag pack has some info for the inventory } else { bagpack.setTagCompound(writeToNBT(new NBTTagCompound()));//this is a "new" bagpack } } @Override public void closeChest() { if(! bagpack.hasTagCompound()) { //Should never be reached, since done when opening the first time bagpack.setTagCompound(writeToNBT(new NBTTagCompound())); } else {//We made changes to the inventory, save them bagpack.setTagCompound(writeToNBT(bagpack.getTagCompound())); } }
 - 
	
		
		Block Break Event/api for 1.6.2?
		
		I never tried to canceled it...but this doesn't sound good indeed. I store the info and use a TickHandler to run checks, yes. Obviously, it is limited to one block break per player per tick, but i doubt it make any difference for players.
 - 
	
		
		Adding and playing custom sounds
		
		event.manager.soundPoolSounds.addSound("flintstonetools:stonestrike.ogg"); par3World.playSoundAtEntity(par2EntityPlayer, "flintstonetools:stonestrike", 1.0F, 1.0F);
 - 
	
		
		[New Question] [1.5.2] Sand that Falls Up
		
		Yes, there are tutorials. First step is checking if entity and renderer are registered properly.
 - 
	
		
		Saving data w/ items [Solved]
		
		No, those methods don't give you the ItemStack as a variable. Use your code inside a method which gives you the player or item in your container class or item. If necessary, send packets from your gui.
 - 
	
		
		Checking and/or preventing grass spread
		
		No hook, grass spreading is hardcoded in BlockGrass.
 - 
	
		
		Saving data w/ items [Solved]
		
		@Guff It doesn't matter where you implement IInventory. TileEntity is only one of the possible implementation. @Lua You only need to call writeToNBT(stack.getTagCompound());//To save readFromNBT(stack.getTagCompound());//To load
 - 
	
		
		Block Break Event/api for 1.6.2?
		
		https://github.com/MinecraftForge/MinecraftForge/pull/623 The PR is still open, but Lex discussed it last week. It could include a BlockDropXP event too. @hydroflame We already have PlayerInteractEvent and Action.RIGHT_CLICK_X handling most Block placed events
 - 
	
		
		Couple of questions for my upcoming mod.
		
		1. Look at Minecart and Boat code. Vehicle are simply entities that the player can ride 2.&3. Look at the Gui & Textures tutorial.
 - 
	
		
		Trying to make a mob, what am I missing?
		
		If you are on 1.6, those are useless: public int getMaxHealth() { return 15; } public String getTexture() { return "textures/bee.png"; }
 - 
	
		
		How to preserve TileEntity info when a block is picked up?
		
		You could use an IItemRenderer and use renderblocks i suppose...or use an ItemBlock.
 - 
	
		
		Block Break Event/api for 1.6.2?
		
		lol an ugly hack you say ? It has no effect on performance so I am too lazy to edit that private boolean value.
 - 
	
		
		Help with telling if a swing is in progress
		
		I was thinking about sending a packet and rendering the animation yourself.
 - 
	
		
		Help with telling if a swing is in progress
		
		Only one swing can happen at a time, this is hardcoded in the swing behaviour. So, you want to cancel the first swing. Since you know player.swingItem() ; the rest is your code. No Forge nor Minecraft can help you.
 - 
	
		
		[1.6.2] PlayerTick on other player
		
		All you need is isJumping set to true at some point. The rest you can handle with packets if needed. Edit: You can use LivingJumpEvent instead of a TickHandler, too.
 - 
	
		
		Odd text color code problem
		
		Actually, I think this is due to addChatMessage(String), as it uses ChatMessageComponent system now.
 - 
	
		
		Help with telling if a swing is in progress
		
		Yes, as a side effect, the animation packet isn't sent. You wanted to cancel the swing, here it is.
 - 
	
		
		Block Break Event/api for 1.6.2?
		
		Personally, I use PlayerInteractEvent, Action.LEFT_CLICK_BLOCK and some reflection to get the block break status.
 - 
	
		
		[1.6.2] PlayerTick on other player
		
		You know you can register ticks on client side too, don't you ?
 - 
	
		
		Odd text color code problem
		
		Why not using translateToLocalFormatted(string, object[]) ?
 - 
	
		
		How to preserve TileEntity info when a block is picked up?
		
		You said you had an item. The easy way is certainly to use an item to place the block. Which means you want noone to get the actual block, only the item. Then when block is broken, spawn an EntityItem which contains the item (again, not the block).
 - 
	
		
		Packet24MobSpawn - HandleSpawn crash (NPE)
		
		Forge EntityRegistry registers mobs in maps. There is no limitation, provided you don't "registerGlobalEntityId".
 - 
	
		
		Help with telling if a swing is in progress
		
		That wouldn't work at all since you changed the method args and calling swingItem() when the swing is in progress doesn't do anything (see swingItem() method) public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) { if(entity instanceof EntityPlayer && isCurrentItem) { EntityPlayer player = (EntityPlayer)entity; if(player.isSwingInProgress) { player.isSwingInProgress = false; } } } This might work.
 - 
	
		
		Help with telling if a swing is in progress
		
		Yes, "Open call hierarchy" (other language ), then you can follow the calls by clicking again on the line You are already doing the click check with if(entityLiving.isSwingInProgress)
 
IPS spam blocked by CleanTalk.