Messed a bit with how the entry opening works, seems stable now. Probably fixes #371

This commit is contained in:
Lizbeth Rika committed 2014-11-15 20:02:01 +00:00
1 parent 26aa2ab0ae
commit a846ed071d
2 files changed
+4 -3

No files matched your search

@@ -39,7 +39,7 @@ public class CommandOpen extends CommandBase {
ItemStack stack = player.getCurrentEquippedItem();
if(stack != null && stack.getItem() instanceof ItemLexicon) {
ItemLexicon.setForcedPage(stack, args[0]);
ItemLexicon.setQueueTicks(stack, 3);
ItemLexicon.setQueueTicks(stack, 5);
} else sender.addChatMessage(new ChatComponentTranslation("botaniamisc.noLexicon").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
}
}
@@ -147,8 +147,9 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
public void onUpdate(ItemStack stack, World world, Entity entity, int idk, boolean something) {
int ticks = getQueueTicks(stack);
if(ticks > 0 && entity instanceof EntityPlayer) {
skipSound = ticks < 3;
onItemRightClick(stack, world, (EntityPlayer) entity);
skipSound = ticks < 5;
if(ticks == 1)
onItemRightClick(stack, world, (EntityPlayer) entity);
setQueueTicks(stack, ticks - 1);
}