Jump to content

Recommended Posts

Posted

Hello guys!

 

If I remember it's the first or second time I ask for help here.

 

Well, I need some confirmations about two things that are annoying me in the MC 1.8.x:

 

 

1 - Totally random player inventory desync

 

I've tested some details and interactions of my mod to reproduce this but it's really very random. Is this a Minecraft issue or some common actions can produce this (nbt manipulation, etc)? (I observed this since the first 1.8 versions, of course with Forge, but maybe in Minecraft Vanilla too).

 

All the things of my mod are running very well, but this issue is annoying me.

 

While I was recording a test video, I captured one of these random desyncs; after I reload the map all the things return to it's real state and no more desyncs occurred:

 

 

These are the inventory interactions calls of the gun class in the video:

 


public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
    {
    	int load = stack.getTagCompound().getInteger("mag");
    	
    	if(load > -1)
        {
        if (player.capabilities.isCreativeMode || load > 0)
        {
        	this.setEmptyAnimation(false);
        	player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
        }
        else
        {
        	this.setEmptyAnimation(true);
        	if(player.inventory.hasItem(ammo))
        		player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
        }
        }
        
        return stack;
    }

 

private ItemStack checkLoad(EntityPlayer player, ItemStack stackIn, World world)
    {
    	ItemStack stack = stackIn;
    	
    	if(!world.isRemote && player.inventory.hasItem(ammo))
    	{
    		player.inventory.consumeInventoryItem(ammo);
    		stack.getTagCompound().setInteger("mag", this.maxmag);
    		player.worldObj.playSoundAtEntity(player, "tile.piston.in", 0.1F, 0.9F);
    	}
    	
    	return stack;
}

 

Older versions of my mod and Minecraft 1.8.x also shows the same random issue, and It occurs with vanilla objects too.

 

 

2 - FoV update bug

 

It's very simple and ever in vanilla I observed this. When you drastically change the FoV and not move the mouse things are showing not rendered (maybe caused by a native routine to reduce resource consuption).

 

There is a method to force a render update (same thing when I move the mouse, but instant after I return to the normal FoV)?

 

Here an example:

 

 

// These two things are what prevents me to release my mod for open tests.  :-\

 

Thanks for the attention.

// BSc CIS, hardcore gamer and a big fan of Minecraft.

 

TmzOS ::..

Posted

The FOV bug is from Minecraft itself. In vanilla this also happens sometimes. (Very often in Caves)

catch(Exception e)

{

 

}

Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).

Posted

Thanks MCenderdragon..

 

--

 

Anyone knows anything about the desync issue?

 

 

// BSc CIS, hardcore gamer and a big fan of Minecraft.

 

TmzOS ::..

Posted

Aparently I fixed the problem... the checkreload() call needs to be called in server and client side (the function is triggered inside of "onPlayerStoppedUsing()").

 

 

But, anyone knows any way to refresh the render to avoid this strange "fov change render bug"?

// BSc CIS, hardcore gamer and a big fan of Minecraft.

 

TmzOS ::..

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



×
×
  • Create New...

Important Information

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