mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Fix the first achievement that's needed for all other achievements not being called serverside #1317
This commit is contained in:
1 parent
f634389c9f
commit
dd56e0dd02
1 file changed
+11
-4
@@ -8,6 +8,7 @@ import mantle.books.BookData;
|
||||
import mantle.client.gui.GuiManual;
|
||||
import mantle.items.abstracts.CraftingItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -29,17 +30,23 @@ public class Manual extends CraftingItem
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
TAchievements.triggerAchievement(player, "tconstruct.beginner");
|
||||
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
player.openGui(TConstruct.instance, mantle.client.MProxyClient.manualGuiID, world, 0, 0, 0);
|
||||
FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(stack, getData(stack)));
|
||||
if(world.isRemote) {
|
||||
openBook(stack, world, player);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void openBook(ItemStack stack, World world, EntityPlayer player) {
|
||||
player.openGui(TConstruct.instance, mantle.client.MProxyClient.manualGuiID, world, 0, 0, 0);
|
||||
FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(stack, getData(stack)));
|
||||
}
|
||||
|
||||
|
||||
private BookData getData (ItemStack stack)
|
||||
{
|
||||
switch (stack.getItemDamage())
|
||||
|
||||
Reference in new issue
Block a user