Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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 ::..

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).

  • Author

Thanks MCenderdragon..

 

--

 

Anyone knows anything about the desync issue?

 

 

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

 

TmzOS ::..

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.