• 0

    posted a message on onBlockActivated error with Proxys

    Thank you very much! I called the World with "tileEntityTableOfAges.getWorld()" now, everything ist working.

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    And how do I fix that? :D

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    I fixed the problem by adding the @SideOnly(SIDE.client) annotation to the onCraftMatrixChanged Method.


    But on the server I can't take the crafting result out of the table, every time I try to put it into my Inventory it jumps back to the result slot.


    You know where the problem could be?

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    This code ist for the crafting recipe, so I think yes. Where do I have to create the new method exactly?

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    You can look at my Code on Github (https://github.com/stevexg/AgeOfWeapons).


    I have the ClientProxy.java, but where should I put my code in there??

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    Really simple but I don't get it, sorry...


    How can I call a method from the SidedProxy?

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    I never call something from the container...

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    But I have to call the Container Server-side... Please give me a Sample, I do not get what you want to tell me.

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys
    Quote from ItzDennisz»

    Thats not how you're supposed to do this.

    Create the methods in your client proxy and the class it extends and call them via wherever your SidedProxy annotation is



    Can you give me a Code example? I do not get what do put inside of the Server-side method...

    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys
    Quote from ItzDennisz»

    Simple. Call your client-side code using the client proxy.


    Using @SidedProxy(client) above the method cause the Method to do nothing, so I do not even get an error.
    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    ContainerTableOfAges contains client only code. Do not run client code on the server.



    Thank you, but I already found that out by myself. I would be very thankful if you could give me a tip what I have to change.


    Posted in: Modification Development
  • 0

    posted a message on onBlockActivated error with Proxys

    Hey,


    I have a Problem with my Mod "Age Of Weapons" right now. When Playing in Multiplayer and try to open the GUI of a Block, nothing happens but I get an error.


    The Error:


    [18:57:05] [Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
    java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient
    	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_111]
    	at net.minecraft.util.Util.runTask(Util.java:30) [Util.class:?]
    	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:754) [MinecraftServer.class:?]
    	at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:402) [DedicatedServer.class:?]
    	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:699) [MinecraftServer.class:?]
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [MinecraftServer.class:?]
    	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient
    	at magmasrc.ageofweapons.util.GuiHandlerTOA.getServerGuiElement(GuiHandlerTOA.java:29) ~[GuiHandlerTOA.class:?]
    	at magmasrc.ageofweapons.util.GuiHandlerRegistry.getServerGuiElement(GuiHandlerRegistry.java:25) ~[GuiHandlerRegistry.class:?]
    	at net.minecraftforge.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:254) ~[NetworkRegistry.class:?]
    	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:89) ~[FMLNetworkHandler.class:?]
    	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2734) ~[EntityPlayer.class:?]
    	at magmasrc.ageofweapons.blocks.BlockTableOfAges.onBlockActivated(BlockTableOfAges.java:59) ~[BlockTableOfAges.class:?]
    	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:474) ~[PlayerInteractionManager.class:?]
    	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:712) ~[NetHandlerPlayServer.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    	at java.util.concurrent.Executors$RunnableAdapter.call$capture(Executors.java:511) ~[?:1.8.0_111]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run$capture(FutureTask.java:266) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_111]
    	at net.minecraft.util.Util.runTask(Util.java:29) ~[Util.class:?]
    	... 5 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient
    	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_111]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_111]
    	at magmasrc.ageofweapons.util.GuiHandlerTOA.getServerGuiElement(GuiHandlerTOA.java:29) ~[GuiHandlerTOA.class:?]
    	at magmasrc.ageofweapons.util.GuiHandlerRegistry.getServerGuiElement(GuiHandlerRegistry.java:25) ~[GuiHandlerRegistry.class:?]
    	at net.minecraftforge.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:254) ~[NetworkRegistry.class:?]
    	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:89) ~[FMLNetworkHandler.class:?]
    	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2734) ~[EntityPlayer.class:?]
    	at magmasrc.ageofweapons.blocks.BlockTableOfAges.onBlockActivated(BlockTableOfAges.java:59) ~[BlockTableOfAges.class:?]
    	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:474) ~[PlayerInteractionManager.class:?]
    	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:712) ~[NetHandlerPlayServer.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    	at java.util.concurrent.Executors$RunnableAdapter.call$capture(Executors.java:511) ~[?:1.8.0_111]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run$capture(FutureTask.java:266) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_111]
    	at net.minecraft.util.Util.runTask(Util.java:29) ~[Util.class:?]
    	... 5 more
    Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@3c6aa04a from coremod FMLCorePlugin
    	at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:257) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?]
    	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
    	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_111]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_111]
    	at magmasrc.ageofweapons.util.GuiHandlerTOA.getServerGuiElement(GuiHandlerTOA.java:29) ~[GuiHandlerTOA.class:?]
    	at magmasrc.ageofweapons.util.GuiHandlerRegistry.getServerGuiElement(GuiHandlerRegistry.java:25) ~[GuiHandlerRegistry.class:?]
    	at net.minecraftforge.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:254) ~[NetworkRegistry.class:?]
    	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:89) ~[FMLNetworkHandler.class:?]
    	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2734) ~[EntityPlayer.class:?]
    	at magmasrc.ageofweapons.blocks.BlockTableOfAges.onBlockActivated(BlockTableOfAges.java:59) ~[BlockTableOfAges.class:?]
    	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:474) ~[PlayerInteractionManager.class:?]
    	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:712) ~[NetHandlerPlayServer.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    	at java.util.concurrent.Executors$RunnableAdapter.call$capture(Executors.java:511) ~[?:1.8.0_111]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run$capture(FutureTask.java:266) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_111]
    	at net.minecraft.util.Util.runTask(Util.java:29) ~[Util.class:?]
    	... 5 more
    Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER
    	at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:56) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?]
    	at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?]
    	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
    	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_111]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_111]
    	at magmasrc.ageofweapons.util.GuiHandlerTOA.getServerGuiElement(GuiHandlerTOA.java:29) ~[GuiHandlerTOA.class:?]
    	at magmasrc.ageofweapons.util.GuiHandlerRegistry.getServerGuiElement(GuiHandlerRegistry.java:25) ~[GuiHandlerRegistry.class:?]
    	at net.minecraftforge.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:254) ~[NetworkRegistry.class:?]
    	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:89) ~[FMLNetworkHandler.class:?]
    	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2734) ~[EntityPlayer.class:?]
    	at magmasrc.ageofweapons.blocks.BlockTableOfAges.onBlockActivated(BlockTableOfAges.java:59) ~[BlockTableOfAges.class:?]
    	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:474) ~[PlayerInteractionManager.class:?]
    	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:712) ~[NetHandlerPlayServer.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    	at java.util.concurrent.Executors$RunnableAdapter.call$capture(Executors.java:511) ~[?:1.8.0_111]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run$capture(FutureTask.java:266) ~[?:1.8.0_111]
    	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_111]
    	at net.minecraft.util.Util.runTask(Util.java:29) ~[Util.class:?]
    	... 5 more



    Code of Block class:


    public class BlockTableOfAges extends BlockContainer  {


    private static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);


    public BlockTableOfAges() {
    super(Material.IRON);
    this.setCreativeTab(ModTabs.generalTab);
    this.setHardness(2.5F);
    this.setResistance(5.0F);
    this.setSoundType(SoundType.STONE);
    this.setLightOpacity(0);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));

    }

    @Override
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
    EnumFacing side, float hitX, float hitY, float hitZ) {
    if (worldIn.isRemote) {
    return true;
    } else {
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityTableOfAges) {
    playerIn.openGui(AgeOfWeapons.instance, GuiHandlerTOA.getGuiID(), worldIn, pos.getX(), pos.getY(), pos.getZ());
    playerIn.addStat(StatList.CRAFTING_TABLE_INTERACTION);
    }

    return true;
    }
    }
    etc.


    The GUI handler:

    package magmasrc.ageofweapons.util;
    
    import magmasrc.ageofweapons.client.gui.GuiTableOfAges;
    import magmasrc.ageofweapons.containers.ContainerTableOfAges;
    import magmasrc.ageofweapons.tileentitys.TileEntityTableOfAges;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.World;
    import net.minecraftforge.fml.common.network.IGuiHandler;
    
    public class GuiHandlerTOA implements IGuiHandler {
    
     private static final int GUIID_tableofages = 0;
     public static int getGuiID() {
     return GUIID_tableofages;
     }
    
     @Override
     public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
     if (ID != getGuiID()) {
     System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID);
     }
    
     BlockPos xyz = new BlockPos(x, y, z);
     TileEntity tileEntity = world.getTileEntity(xyz);
     if (tileEntity instanceof TileEntityTableOfAges) {
     TileEntityTableOfAges tileEntityTableOfAges = (TileEntityTableOfAges) tileEntity;
     return new ContainerTableOfAges(player.inventory, tileEntityTableOfAges);
     }
     return null;
     }
    
     @Override
     public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
     if (ID != getGuiID()) {
     System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID);
     }
    
     BlockPos xyz = new BlockPos(x, y, z);
     TileEntity tileEntity = world.getTileEntity(xyz);
     if (tileEntity instanceof TileEntityTableOfAges) {
     TileEntityTableOfAges tileEntityTableOfAges = (TileEntityTableOfAges) tileEntity;
     return new GuiTableOfAges(player.inventory, tileEntityTableOfAges);
     }
     return null;
     }
    
    }

    HandlerRegistry:

    package magmasrc.ageofweapons.util;
    
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.world.World;
    import net.minecraftforge.fml.common.network.IGuiHandler;
    
    import java.util.HashMap;
    
    public class GuiHandlerRegistry implements IGuiHandler {
    
     public void registerGuiHandler(IGuiHandler handler, int guiID)
     {
     registeredHandlers.put(guiID, handler);
     }
    
     public static GuiHandlerRegistry getInstance() {return guiHandlerRegistry;}
    
     private HashMap<Integer, IGuiHandler> registeredHandlers = new HashMap<Integer, IGuiHandler>();
     private static GuiHandlerRegistry guiHandlerRegistry = new GuiHandlerRegistry();
    
     @Override
     public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
     IGuiHandler handler = registeredHandlers.get(ID);
     if (handler != null) {
     return handler.getServerGuiElement(ID, player, world, x, y, z);
     } else {
     return null;
     }
     }
    
     @Override
     public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
     IGuiHandler handler = registeredHandlers.get(ID);
     if (handler != null) {
     return handler.getClientGuiElement(ID, player, world, x, y, z);
     } else {
     return null;
     }
     }
    
    }
    

    I'm am very thankful for help.

    Posted in: Modification Development
  • 0

    posted a message on JEI Integration - Crash when hover over the Recipe

    Thank you, I fixed the problem by returning an empty list.

    Posted in: Modification Development
  • 0

    posted a message on JEI Integration - Crash when hover over the Recipe

    Hi,


    I'm trying to add an JEI Integration to my mod. I have coded an own Workbench and the recipes gets shown well, but if I hover over the background area, the Game crashes.


    MC Version: 1.11.2

    JEI Version: 4.5.0.294


    Crash Report:


    ---- Minecraft Crash Report ----
    // Oops.
    
    Time: 8/1/17 11:35 AM
    Description: Rendering screen
    
    java.lang.NullPointerException: Rendering screen
    	at java.util.ArrayList.addAll(ArrayList.java:577)
    	at mezz.jei.gui.recipes.RecipeLayout.draw(RecipeLayout.java:166)
    	at mezz.jei.gui.recipes.RecipesGui.drawScreen(RecipesGui.java:225)
    	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382)
    	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1164)
    	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1140)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:407)
    	at net.minecraft.client.main.Main.main(Main.java:118)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    	at GradleStart.main(GradleStart.java:26)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    	at java.util.ArrayList.addAll(ArrayList.java:577)
    	at mezz.jei.gui.recipes.RecipeLayout.draw(RecipeLayout.java:166)
    	at mezz.jei.gui.recipes.RecipesGui.drawScreen(RecipesGui.java:225)
    	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:382)
    
    -- Screen render details --
    Details:
    	Screen name: mezz.jei.gui.recipes.RecipesGui
    	Mouse location: Scaled: (186, 155). Absolute: (558, 370)
    	Screen size: Scaled: (534, 279). Absolute: (1600, 837). Scale factor of 3
    
    -- Affected level --
    Details:
    	Level name: MpServer
    	All players: 1 total; [EntityPlayerSP['Player586'/381, l='MpServer', x=-205.81, y=85.29, z=171.56]]
    	Chunk stats: MultiplayerChunkCache: 578, 578
    	Level seed: 0
    	Level generator: ID 00 - default, ver 1. Features enabled: false
    	Level generator options: 
    	Level spawn location: World: (-204,64,256), Chunk: (at 4,4,0 in -13,16; contains blocks -208,0,256 to -193,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    	Level time: 24513 game time, 24513 day time
    	Level dimension: 0
    	Level storage version: 0x00000 - Unknown?
    	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    	Forced entities: 94 total; [EntitySquid['Squid'/257, l='MpServer', x=-151.69, y=47.60, z=194.75], EntityItem['item.item.arrow'/129, l='MpServer', x=-242.92, y=83.00, z=108.88], EntityPig['Pig'/258, l='MpServer', x=-155.50, y=69.00, z=192.68], EntityItem['item.item.bone'/130, l='MpServer', x=-242.15, y=83.00, z=108.65], EntityPig['Pig'/131, l='MpServer', x=-253.77, y=79.00, z=122.28], EntityZombie['Zombie'/132, l='MpServer', x=-252.50, y=22.00, z=167.50], EntityBat['Bat'/133, l='MpServer', x=-253.12, y=44.83, z=174.43], EntityMinecartChest['Minecart with Chest'/134, l='MpServer', x=-248.50, y=29.06, z=204.50], EntityCreeper['Creeper'/135, l='MpServer', x=-248.50, y=29.00, z=205.50], EntityCreeper['Creeper'/136, l='MpServer', x=-247.62, y=29.00, z=208.81], EntityCreeper['Creeper'/137, l='MpServer', x=-253.16, y=30.00, z=210.48], EntityPig['Pig'/138, l='MpServer', x=-241.81, y=101.00, z=215.37], EntityPig['Pig'/266, l='MpServer', x=-131.51, y=73.00, z=139.25], EntityPig['Pig'/139, l='MpServer', x=-241.44, y=101.00, z=216.35], EntityPig['Pig'/140, l='MpServer', x=-247.50, y=102.00, z=211.25], EntityBat['Bat'/141, l='MpServer', x=-248.31, y=28.34, z=241.48], EntityZombie['Zombie'/269, l='MpServer', x=-137.72, y=25.00, z=232.50], EntityPig['Pig'/142, l='MpServer', x=-236.66, y=100.00, z=220.78], EntityBat['Bat'/143, l='MpServer', x=-247.43, y=30.10, z=235.25], EntityCow['Cow'/149, l='MpServer', x=-235.17, y=83.00, z=106.75], EntityCow['Cow'/150, l='MpServer', x=-229.41, y=78.00, z=107.71], EntityPig['Pig'/151, l='MpServer', x=-234.96, y=84.00, z=102.50], EntityPig['Pig'/152, l='MpServer', x=-229.50, y=85.00, z=101.75], EntityPig['Pig'/153, l='MpServer', x=-230.53, y=70.00, z=128.25], EntityCow['Cow'/154, l='MpServer', x=-230.42, y=68.00, z=126.55], EntityCow['Cow'/155, l='MpServer', x=-228.46, y=73.00, z=114.81], EntityItem['item.item.rottenFlesh'/156, l='MpServer', x=-226.68, y=83.00, z=153.77], EntityWitch['Witch'/284, l='MpServer', x=-129.37, y=66.00, z=240.55], EntityCow['Cow'/157, l='MpServer', x=-230.48, y=76.00, z=185.98], EntityCow['Cow'/158, l='MpServer', x=-223.55, y=69.00, z=194.27], EntityItem['item.item.arrow'/159, l='MpServer', x=-236.87, y=99.00, z=221.76], EntityItem['item.item.bone'/160, l='MpServer', x=-235.68, y=99.00, z=221.47], EntitySquid['Squid'/544, l='MpServer', x=-153.67, y=45.15, z=196.60], EntityItem['item.item.dyePowder.black'/546, l='MpServer', x=-221.13, y=43.92, z=134.43], EntityChicken['Chicken'/169, l='MpServer', x=-218.12, y=75.00, z=92.79], EntitySquid['Squid'/170, l='MpServer', x=-221.50, y=45.00, z=133.51], EntityPig['Pig'/171, l='MpServer', x=-225.33, y=70.00, z=190.51], EntityPig['Pig'/172, l='MpServer', x=-221.49, y=71.00, z=202.33], EntityCow['Cow'/173, l='MpServer', x=-217.86, y=69.00, z=197.49], EntityPig['Pig'/174, l='MpServer', x=-212.24, y=72.00, z=202.50], EntityPig['Pig'/175, l='MpServer', x=-211.30, y=72.00, z=202.50], EntityPig['Pig'/176, l='MpServer', x=-221.49, y=74.00, z=210.25], EntityPlayerSP['Player586'/381, l='MpServer', x=-205.81, y=85.29, z=171.56], EntityChicken['Chicken'/187, l='MpServer', x=-193.93, y=76.00, z=94.87], EntityPig['Pig'/190, l='MpServer', x=-214.28, y=64.00, z=119.49], EntitySkeleton['Skeleton'/191, l='MpServer', x=-202.25, y=83.00, z=151.49], EntitySpider['Spider'/192, l='MpServer', x=-198.00, y=82.00, z=149.98], EntitySkeleton['Skeleton'/193, l='MpServer', x=-197.50, y=24.00, z=172.50], EntityPig['Pig'/194, l='MpServer', x=-197.28, y=74.00, z=167.54], EntityCow['Cow'/195, l='MpServer', x=-207.77, y=68.00, z=187.45], EntityZombie['Zombie'/196, l='MpServer', x=-193.50, y=77.00, z=222.50], EntitySpider['Spider'/197, l='MpServer', x=-209.03, y=84.00, z=239.00], EntitySkeleton['Skeleton'/208, l='MpServer', x=-191.11, y=67.00, z=106.50], EntitySkeleton['Skeleton'/209, l='MpServer', x=-190.04, y=70.00, z=103.50], EntityPig['Pig'/210, l='MpServer', x=-183.73, y=68.00, z=126.49], EntityPig['Pig'/211, l='MpServer', x=-180.68, y=64.00, z=122.50], EntityCreeper['Creeper'/212, l='MpServer', x=-183.50, y=78.00, z=140.27], EntityCreeper['Creeper'/213, l='MpServer', x=-186.80, y=79.00, z=139.57], EntityPig['Pig'/214, l='MpServer', x=-190.24, y=81.00, z=143.50], EntityPig['Pig'/215, l='MpServer', x=-184.73, y=64.00, z=179.61], EntityCreeper['Creeper'/216, l='MpServer', x=-188.50, y=24.00, z=199.50], EntityPig['Pig'/217, l='MpServer', x=-188.25, y=66.00, z=193.50], EntityZombie['Zombie'/218, l='MpServer', x=-177.50, y=27.00, z=226.50], EntityCreeper['Creeper'/102, l='MpServer', x=-281.50, y=66.00, z=156.84], EntityCreeper['Creeper'/103, l='MpServer', x=-273.30, y=61.00, z=170.89], EntityZombie['Zombie'/231, l='MpServer', x=-170.19, y=73.00, z=148.50], EntityZombie['Zombie'/104, l='MpServer', x=-273.30, y=61.00, z=169.19], EntityZombie['Zombie'/232, l='MpServer', x=-161.20, y=68.00, z=147.70], EntityBat['Bat'/105, l='MpServer', x=-265.21, y=22.33, z=180.26], EntityBat['Bat'/233, l='MpServer', x=-167.23, y=46.10, z=176.75], EntityCreeper['Creeper'/106, l='MpServer', x=-273.50, y=42.00, z=191.50], EntityBat['Bat'/234, l='MpServer', x=-175.82, y=32.08, z=190.22], EntityPig['Pig'/107, l='MpServer', x=-274.72, y=76.00, z=183.51], EntityPig['Pig'/235, l='MpServer', x=-170.26, y=69.00, z=194.19], EntityPig['Pig'/108, l='MpServer', x=-281.65, y=78.00, z=180.76], EntityPig['Pig'/236, l='MpServer', x=-178.51, y=69.00, z=216.97], EntityBat['Bat'/109, l='MpServer', x=-280.67, y=36.74, z=192.69], EntityZombie['Zombie'/237, l='MpServer', x=-175.50, y=27.00, z=226.50], EntitySpider['Spider'/238, l='MpServer', x=-164.30, y=68.00, z=237.30], EntityZombie['Zombie'/113, l='MpServer', x=-277.06, y=29.00, z=215.50], EntityItem['item.item.rottenFlesh'/116, l='MpServer', x=-257.45, y=83.00, z=110.47], EntityZombie['Zombie'/117, l='MpServer', x=-267.79, y=69.00, z=142.25], EntityZombie['Zombie'/118, l='MpServer', x=-264.50, y=69.00, z=151.50], EntityZombie['Zombie'/119, l='MpServer', x=-263.50, y=20.00, z=162.50], EntityCreeper['Creeper'/120, l='MpServer', x=-258.50, y=28.00, z=189.50], EntitySpider['Spider'/121, l='MpServer', x=-260.93, y=76.00, z=191.58], EntitySkeleton['Skeleton'/122, l='MpServer', x=-267.50, y=39.00, z=198.50], EntityCreeper['Creeper'/123, l='MpServer', x=-256.50, y=44.00, z=211.50], EntitySkeleton['Skeleton'/252, l='MpServer', x=-157.27, y=64.00, z=121.73], EntitySkeleton['Skeleton'/124, l='MpServer', x=-264.50, y=33.00, z=228.71], EntitySkeleton['Skeleton'/253, l='MpServer', x=-156.52, y=47.00, z=167.24], EntitySkeleton['Skeleton'/125, l='MpServer', x=-256.19, y=72.00, z=249.23], EntitySkeleton['Skeleton'/254, l='MpServer', x=-154.73, y=46.00, z=161.54], EntityBat['Bat'/255, l='MpServer', x=-158.35, y=47.07, z=176.67]]
    	Retry entities: 0 total; []
    	Server brand: fml,forge
    	Server type: Integrated singleplayer server
    Stacktrace:
    	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:456)
    	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2774)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:428)
    	at net.minecraft.client.main.Main.main(Main.java:118)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    	at GradleStart.main(GradleStart.java:26)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.11.2
    	Operating System: Windows 10 (amd64) version 10.0
    	Java Version: 1.8.0_111, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 949233112 bytes (905 MB) / 1632108544 bytes (1556 MB) up to 3806855168 bytes (3630 MB)
    	JVM Flags: 0 total; 
    	IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    	FML: MCP 9.38 Powered by Forge 13.20.0.2228 6 mods loaded, 6 mods active
    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    	UCHIJAAAA	minecraft{1.11.2} [Minecraft] (minecraft.jar) 
    	UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    	UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11.2-13.20.0.2228.jar) 
    	UCHIJAAAA	forge{13.20.0.2228} [Minecraft Forge] (forgeSrc-1.11.2-13.20.0.2228.jar) 
    	UCHIJAAAA	ageofweapons{0.9.2} [Age of Weapons] (AoW) 
    	UCHIJAAAA	jei{4.5.0.294} [Just Enough Items] (jei_1.11.2-4.5.0.294.jar) 
    	Loaded coremods (and transformers): 
    	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.05' Renderer: 'GeForce GTX 970/PCIe/SSE2'
    	Launched Version: 1.11.2
    	LWJGL: 2.9.4
    	OpenGL: GeForce GTX 970/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.05, NVIDIA Corporation
    	GL Caps: Using GL 1.3 multitexturing.
    Using GL 1.3 texture combiners.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Shaders are available because OpenGL 2.1 is supported.
    VBOs are available because OpenGL 1.5 is supported.
    
    	Using VBOs: Yes
    	Is Modded: Definitely; Client brand changed to 'fml,forge'
    	Type: Client (map_client.txt)
    	Resource Packs: 
    	Current Language: English (US)
    	Profiler Position: N/A (disabled)
    	CPU: 8x Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz





    Plugin class:

    package magmasrc.ageofweapons.jei;
    
    import magmasrc.ageofweapons.client.gui.GuiTableOfAges;
    import magmasrc.ageofweapons.crafting.CraftingManagerTableOfAges;
    import magmasrc.ageofweapons.jei.ToA.ToACraftingCategory;
    import magmasrc.ageofweapons.jei.ToA.ToACraftingHandler;
    import magmasrc.ageofweapons.main.ModBlocks;
    import mezz.jei.api.BlankModPlugin;
    import mezz.jei.api.IJeiHelpers;
    import mezz.jei.api.IModRegistry;
    import mezz.jei.api.JEIPlugin;
    import net.minecraft.item.ItemStack;
    
    import javax.annotation.Nonnull;
    
    @JEIPlugin
    public class ToAPlugin extends BlankModPlugin {
    
     public static IJeiHelpers jeiHelper;
    
     @Override
     public void register(@Nonnull IModRegistry registry) {
    
     jeiHelper = registry.getJeiHelpers();
    
     registry.addRecipeCategories(new ToACraftingCategory(jeiHelper.getGuiHelper()));
     registry.addRecipeHandlers(new ToACraftingHandler());
    
     registry.addRecipes(CraftingManagerTableOfAges.getInstance().getRecipeList());
    
     registry.addRecipeClickArea(GuiTableOfAges.class, 111, 69, 26, 19, "aow.tableofages");
     registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.tableOfAges), "aow.tableofages");
    
     }
    
    
    
    
    
    }
    

    Category class:

    package magmasrc.ageofweapons.jei.ToA;
    
    import magmasrc.ageofweapons.main.AgeOfWeapons;
    import mezz.jei.api.IGuiHelper;
    import mezz.jei.api.gui.IDrawable;
    import mezz.jei.api.gui.IGuiItemStackGroup;
    import mezz.jei.api.gui.IRecipeLayout;
    import mezz.jei.api.ingredients.IIngredients;
    import mezz.jei.api.recipe.IRecipeCategory;
    import mezz.jei.api.recipe.IRecipeWrapper;
    import net.minecraft.client.Minecraft;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.ResourceLocation;
    
    import javax.annotation.Nullable;
    
    import java.util.List;
    
    public class ToACraftingCategory implements IRecipeCategory {
    
     private final String locTitle;
     private final IDrawable background;
    
     public ToACraftingCategory(IGuiHelper guiHelper) {
    
     locTitle = "Table Of Ages";
    
     background = guiHelper.createDrawable(new ResourceLocation(AgeOfWeapons.MODID, "textures/gui/table_of_ages_jei_gui.png"), 0, 0, 166, 122);
    
     }
    
     @Override
     public String getUid() {
     return "aow.tableofages";
     }
    
     @Override
     public String getTitle() {
     return locTitle;
     }
    
     @Override
     public String getModName() {
     return "Age Of Weapons";
     }
    
     @Override
     public IDrawable getBackground() {
     return background;
     }
    
     @Nullable
     @Override
     public IDrawable getIcon() {
     return null;
     }
    
     @Override
     public void drawExtras(Minecraft minecraft) {
    
     }
    
     @Override
     public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
    
     if (!(recipeWrapper instanceof ToACraftingWrapper)) return;
    
     ToACraftingWrapper wrapper = (ToACraftingWrapper) recipeWrapper;
     IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();
    
     int slotId = 0;
    
     // Input Slots
     List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
     for (List<ItemStack> itemList : inputs) {
    
     int y = (int) Math.floor(slotId / 3);
     int x = slotId - (y * 3);
     guiStacks.init(slotId, true, 7 + x * 18, 2 + y * 18);
     guiStacks.set(slotId, itemList);
     slotId++;
     }
    
    
     // Output Slot
     guiStacks.init(slotId, false, 137, 56);
     guiStacks.set(slotId, ingredients.getOutputs(ItemStack.class).get(0));
     }
    
     @Override
     public List<String> getTooltipStrings(int mouseX, int mouseY) {
     return null;
     }
    }
    

    Handler class:

    package magmasrc.ageofweapons.jei.ToA;
    
    import magmasrc.ageofweapons.crafting.ShapedRecipesTableOfAges;
    import mezz.jei.api.recipe.IRecipeHandler;
    import mezz.jei.api.recipe.IRecipeWrapper;
    
    import javax.annotation.Nonnull;
    
    
    public class ToACraftingHandler implements IRecipeHandler<ShapedRecipesTableOfAges> {
    
    
     @Nonnull
     @Override
     public Class<ShapedRecipesTableOfAges> getRecipeClass() {
     return ShapedRecipesTableOfAges.class;
     }
    
     @Nonnull
     @Override
     public String getRecipeCategoryUid(ShapedRecipesTableOfAges recipe) {
     return "aow.tableofages";
     }
    
    
     @Nonnull
     @Override
     public IRecipeWrapper getRecipeWrapper(ShapedRecipesTableOfAges recipe) {
     return new ToACraftingWrapper(recipe);
     }
    
     @Override
     public boolean isRecipeValid(ShapedRecipesTableOfAges recipe) {
     return true;
     }
    }
    

    Wrapper class:

    package magmasrc.ageofweapons.jei.ToA;
    
    import magmasrc.ageofweapons.crafting.ShapedRecipesTableOfAges;
    import magmasrc.ageofweapons.jei.ToAPlugin;
    import mezz.jei.api.ingredients.IIngredients;
    import mezz.jei.api.recipe.BlankRecipeWrapper;
    import mezz.jei.api.recipe.IStackHelper;
    import net.minecraft.item.ItemStack;
    
    import java.util.Arrays;
    import java.util.List;
    
    
    public class ToACraftingWrapper extends BlankRecipeWrapper {
    
     private List<List<ItemStack>> input;
     private ItemStack output;
    
     public ToACraftingWrapper(ShapedRecipesTableOfAges recipe) {
    
     IStackHelper stackHelper = ToAPlugin.jeiHelper.getStackHelper();
     input = stackHelper.expandRecipeItemStackInputs(Arrays.asList(recipe.getInput()));
     output = recipe.getRecipeOutput();
    
     }
    
     @Override
     public void getIngredients(IIngredients ingredients) {
     ingredients.setInputLists(ItemStack.class, input);
     ingredients.setOutput(ItemStack.class, output);
     }
    }
    
    Posted in: Modification Development
  • 1

    posted a message on KeyEffects Mod

    Hey Max,

    Thank you very much for your reply. So.. In Singleplayer cheats don't have to be turned on, but it is recommended (later, when the GUI is added it would be necessary). On Servers the mod have to be installed, too, because the effects you give to yourself should be server side (other players have to see the effects too). There are some options that could work without a server sided mod, but for them you need OP rights.


    When I add the GUI, there will no server-side mod be necessary, because you just type in the commands and the client executes them, like when you type "/time set" or something. Accordingly, if you don't have OP not every command will be executed. (If you type "/gamemode 1", nearly every server would tell you that you do not have permission. So, when you press the key with the command "/gamemode 1" the server would tell you the same.)


    So, now the mod is very useful for mapmaking (You can give you Commandblocks very fast, change gamemode to test the Map and things like that) but in Survival or on Servers it is very useless. Later you can use it as a simple marcro-mod, where you can bind commands to Keys.


    I hope I could help you out :)


    Steve


    (I know my english is bad and sorry for that.)

    Posted in: Minecraft Mods
  • To post a comment, please .