Jump to content

charsmud

Members
  • Posts

    89
  • Joined

  • Last visited

Posts posted by charsmud

  1. Recently I've been getting back into modding, and I've been trying to get my coremod to be detected alongside my other mod.  In my development environment inside of Eclipse, it's detected and works fine, but when I compile using "gradlew build" and put the jar into the mods folder, minecraft only recognizes the main mod, and not the coremod. 

     

    FMLLoadingPlugin:

    package timeTraveler.core;
    
    import java.util.Map;
    
    import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
    import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
    
    @MCVersion(value = "1.7.10")
    public class TimeTravelerFMLLoadingPlugin implements IFMLLoadingPlugin
    {
        public String[] getLibraryRequestClass()
        {
            // TODO Auto-generated method stub
            return null;
        }
    
        @Override
        public String[] getASMTransformerClass()
        {
            // TODO Auto-generated method stub
            return new String[] {TimeTravelerClassTransformer.class.getName()};
        }
        @Override
        public String getModContainerClass()
        {
            // TODO Auto-generated method stub
            return TimeTravelerCoreModContainer.class.getName();
        }
    
        @Override
        public String getSetupClass()
        {
            // TODO Auto-generated method stub
            return null;
        }
    
        @Override
        public void injectData(Map<String, Object> data)
        {
            // TODO Auto-generated method stub
        }
    
    @Override
    public String getAccessTransformerClass() {
    	// TODO Auto-generated method stub
    	return TimeTravelerAccessTransformer.class.getName();
    }
    }
    

     

    ModContainer:

    package timeTraveler.core;
    
    import java.util.Arrays;
    
    
    import com.google.common.eventbus.EventBus;
    import com.google.common.eventbus.Subscribe;
    
    import cpw.mods.fml.common.DummyModContainer;
    import cpw.mods.fml.common.LoadController;
    import cpw.mods.fml.common.ModMetadata;
    import cpw.mods.fml.common.event.FMLConstructionEvent;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
    
    public class TimeTravelerCoreModContainer extends DummyModContainer
    {
        public TimeTravelerCoreModContainer()
        {
            super(new ModMetadata());
            ModMetadata meta = getMetadata();
            meta.modId = "TimeTraveler-core";
            meta.name = "TimeTraveler (Core)";
            meta.version = "1.0";
            meta.credits = "By Charsmud";
            meta.authorList = Arrays.asList("Charsmud");
            meta.description = "Core ASM hooks for TimeTraveler ";
            meta.url = "http://www.minecraftforum.net/topic/1211757-timetraveler-real-time-travel-inside-of-minecraft-go-to-your-past/";
            meta.updateUrl = "";
            meta.screenshots = new String[0];
            meta.logoFile = "";
        }
    
        @Override
        public boolean registerBus(EventBus bus, LoadController controller)
        {
            bus.register(this);
            return true;
        }
    
        @Subscribe
        public void modConstruction(FMLConstructionEvent evt)
        {
        }
    
        @Subscribe
        public void init(FMLInitializationEvent evt)
        {
        }
    
        @Subscribe
        public void preInit(FMLPreInitializationEvent evt)
        {
        }
    
        @Subscribe
        public void postInit(FMLPostInitializationEvent evt)
        {
        }
    }
    

     

    I should get an output to the log as well that looks something like this:

     

    [21:18:45] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:<init>:29]: ** TIMETRAVELER - Changing Access Levels!
    [21:18:46] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:transform:43]: ** TIMETRAVELER TRANS : net.minecraft.block.Block
    [21:18:46] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:patchClassASM:101]: ** TIMETRAVELER - Patching onBlockPlacedBy
    

    But this is not present in the logfile on live. 

  2. After some research, I believe that the AccessTransformer is not actually being applied.  When I run gradlew install, it recognizes that I have an AccessTransformer, but I don't believe it is actually applying the patch.  I'm using the Eclipse IDE if that is of any help. 

  3. I am attempting to use an access transformer to access a private field.  The console output states that the patch is being applied, yet I get an error saying the field is private and I crash.  Here is the crash, console output, etc:

     

    [14:24:42] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
    [14:24:42] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading
    [14:24:42] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_67, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
    [14:24:42] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [14:24:42] [main/INFO] [FML]: Found a command line coremod : timeTraveler.core.TimeTravelerFMLLoadingPlugin
    [14:24:42] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [14:24:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [14:24:42] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [14:24:44] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [14:24:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [14:24:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [14:24:44] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:<init>:29]: ** TIMETRAVELER - Changing Access Levels!
    [14:24:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [14:24:44] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
    [14:24:44] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
    [14:24:44] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [14:24:45] [main/INFO]: Setting user: Player862
    [14:24:45] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:transform:43]: ** TIMETRAVELER TRANS : net.minecraft.block.Block
    [14:24:45] [main/INFO] [sTDOUT]: [timeTraveler.core.TimeTravelerClassTransformer:patchClassASM:101]: ** TIMETRAVELER - Patching onBlockPlacedBy
    -1
    -1
    177
    -1
    [14:24:46] [Client thread/INFO]: LWJGL Version: 2.9.1
    [14:24:47] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
    [14:24:47] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized
    [14:24:47] [Client thread/INFO] [FML]: Replaced 182 ore recipies
    [14:24:47] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
    [14:24:48] [Client thread/INFO] [FML]: Searching E:\GameDev\Java\forge-1.7.10-10.13.2.1230-src\mods for mods
    [14:24:50] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [14:24:50] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, TimeTraveler-core, charsmud_timetraveler] at CLIENT
    [14:24:50] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, TimeTraveler-core, charsmud_timetraveler] at SERVER
    [14:24:51] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Time Traveler
    [14:24:51] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [14:24:51] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
    [14:24:51] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [14:24:51] [Client thread/INFO] [FML]: Applying holder lookups
    [14:24:51] [Client thread/INFO] [FML]: Holder lookups applied
    [14:24:51] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:51] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
    [14:24:51] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
    [14:24:51] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [14:24:51] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
    [14:24:52] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
    [14:24:52] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:52] [sound Library Loader/INFO]: Sound engine started
    [14:24:52] [Client thread/INFO]: Created: 256x256 textures/items-atlas
    [14:24:52] [Client thread/WARN] [FML]: The mod charsmud_timetraveler tried to register the entity class class timeTraveler.entities.EntityPlayerPast which was already registered - if you wish to override default naming for FML mod entities, register it here first
    [14:24:52] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
    [14:24:52] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Time Traveler
    [14:24:52] [Client thread/INFO]: Created: 256x256 textures/items-atlas
    [14:24:52] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_177_BlockTimeDistorter.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_177_BlockTimeDistorter.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    [14:24:52] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_166_BlockParadoxCondenser.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_166_BlockParadoxCondenser.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    [14:24:52] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_176_BlockMarker.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_176_BlockMarker.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    [14:24:52] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_169_TimeTravel.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_169_TimeTravel.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    [14:24:52] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
    [14:24:52] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:52] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
    [14:24:53] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
    [14:24:53] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:53] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:53] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
    [14:24:53] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
    [14:24:53] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [14:24:53] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
    [14:24:53] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [14:24:53] [sound Library Loader/INFO]: Sound engine started
    

     

    [14:25:34] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel charsmud_timetraveler
    java.lang.Error: Unresolved compilation problem: 
    The field World.activeChunkSet is not visible
    
    at timeTraveler.futuretravel.FutureTravelMechanics.expandOres(FutureTravelMechanics.java:171) ~[FutureTravelMechanics.class:?]
    at timeTraveler.network.TimeTravelerPacketHandler.onMessage(TimeTravelerPacketHandler.java:98) ~[TimeTravelerPacketHandler.class:?]
    at timeTraveler.network.TimeTravelerPacketHandler.onMessage(TimeTravelerPacketHandler.java:1) ~[TimeTravelerPacketHandler.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[simpleChannelHandlerWrapper.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[simpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
    at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
    at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1682) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    

     

    # EntityXPOrb
    
    public oa.e # FD:EntityXPOrb/xpValue
    public net.minecraft.entity.item.EntityXPOrb xpValue
    #World
    public abw.G # FD:World/activeChunkSet
    public net.minecraft.world.World activeChunkSet

  4. You want to know if the player has moved while the spell is being cast, correct?  Because checking for a change in your X, Y and Z coordinates greater than k units is how you can do that, just take the initial position during spell cast and compare.  Otherwise, please elaborate, because you stated that you want casting to stop if movement occurs. 

  5. I used TickType.CLIENT.  And whether or not the code is correctly optimized, it was never designed for a multiplayer experience, so I didn't bother trying to make it one (Plus this project has been going on for a few years and I haven't gotten around to renovating the old code, which most of this is). 

  6. TTEventTicker is now working, but Ticker is not.  Ticker is as follows:

     

    package timeTraveler.ticker;
    
    import java.io.File;
    import java.util.EnumSet;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.entity.EntityPlayerSP;
    import net.minecraft.client.gui.GuiScreen;
    import net.minecraft.potion.Potion;
    import timeTraveler.core.TimeTraveler;
    import timeTraveler.gui.GuiTimeTravel;
    import timeTraveler.mechanics.CopyFile;
    import timeTraveler.pasttravel.PastMechanics;
    import cpw.mods.fml.client.FMLClientHandler;
    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.TickEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
    
    /**
    * Ticker
    * @author Charsmud
    *
    */
    public class Ticker 
    {
    public int ctr;
    public int ct;
    public int count;
    
    public static int paradoxLevel;
    
    
    public static int seconds = 1;
    public static int minutes = 5;
    
    public int invisPotTime = 0;
    public int sneakTime = 0;
    
    private int timeNumber = 1;
    private int pathFileLine = 0;
    private int hunterSpawn = 0;
    
    String text;
    
    CopyFile copyFile = new CopyFile();
    
    public boolean hasInitRun = false;
    public boolean hasInitMobs = false;
    
    private boolean mobsInitSpawned = false; 
    private boolean isInPast;
    private boolean hasRun = false;
    
    @SubscribeEvent
    public void onPlayerTick(PlayerTickEvent event)
    {
    	paradoxLevel = TimeTraveler.vars.getParadoxAmt();
    }
    
    @SubscribeEvent
    private void onWorldTick(WorldTickEvent event)
    {
    	System.out.println("TICK");
    	Minecraft mc = Minecraft.getMinecraft();
    	ctr++;
    	ct++;
    
    	hasInitRun = (new File(mc.mcDataDir + "/mods/TimeMod/past/" + FMLClientHandler.instance().getServer().getWorldName())).exists();
    
    
    	PastMechanics mechanics = new PastMechanics();
    
        text  = "Time Remaining: " + minutes + " Minute, " + seconds + " Seconds";
    
    	isInPast = GuiTimeTravel.isInPast;		
    	if(!isInPast && !TimeTraveler.vars.getIsInFuture())
    	{
    		TimeTraveler.vars.setIsSpawnedPastPlayer(false);
    		if(mc.thePlayer.isSneaking())
    		{
    		}
    		if(paradoxLevel >= 30)
    		{
    			hunterSpawn++;
    			if(hunterSpawn == 150)
    			{
    				mechanics.spawnParadoxHunter(mc.getIntegratedServer(), mc);
    				System.out.println("Spawned Paradox Hunter!");
    				hunterSpawn = 0;
    			}
    		}
    	}
    
    	if(ct == 20)
    	{
    		if(!isInPast && !TimeTraveler.vars.getIsInFuture())
    		{				
    			ct = 0;
    		}
    	}
    
    	if(ctr == 5140)
    	{
    		if(!isInPast && !TimeTraveler.vars.getIsInFuture())
    		{
    			mechanics.saveTime(mc.getIntegratedServer(), mc, copyFile);
    			mechanics.beginPastRecording(FMLClientHandler.instance().getClient().thePlayer, FMLClientHandler.instance().getClient().thePlayer.getDisplayName());
    			mechanics.beginPastRecording(FMLClientHandler.instance().getClient().thePlayer, FMLClientHandler.instance().getClient().thePlayer.getDisplayName());
    
    		}
    		ctr = 0;
    	}
    	if(!hasInitRun)
    	{
    		hasInitRun = true;
    		mechanics.firstTime(mc.getIntegratedServer(), mc);
    		mechanics.saveTime(mc.getIntegratedServer(), mc, copyFile);
    	}
    	if(!hasRun)
    	{
    		hasRun = true;
    		mechanics.beginPastRecording(FMLClientHandler.instance().getClient().thePlayer, FMLClientHandler.instance().getClient().thePlayer.getDisplayName());
    
    	}
    	if(isInPast)
    	{	
    		if(!TimeTraveler.vars.getIsSpawnedPastPlayer())
    		{
    			mechanics.replayPast(mc.thePlayer);
    			TimeTraveler.vars.setIsSpawnedPastPlayer(true);
    		}
    		if(TimeTraveler.vars.getNextSet())
    		{
    
    		}
    		count++;
    		if(paradoxLevel < 0)
    		{
    			paradoxLevel = 0;
    		}
    		if(paradoxLevel <= 128)
    		{
    			EntityPlayerSP eps = mc.thePlayer;
    			if(eps.isPotionActive(Potion.invisibility))
    			{
    				invisPotTime++;
    				if(invisPotTime == 10)
    				{
    					paradoxLevel = paradoxLevel - 5;
    					invisPotTime = 0;
    				}
    			}
    			if(eps.isSneaking())
    			{
    				sneakTime++;
    				if(sneakTime == 30)
    				{
    					paradoxLevel = paradoxLevel - 2;
    					sneakTime = 0;
    				}
    			}
    		}
    		else
    		{
    			mechanics.returnToPresent(mc, paradoxLevel, mc.getIntegratedServer());
    			mobsInitSpawned = false;
    			isInPast = false;
    			TimeTraveler.vars.setNextSet(true);
    		}
    	}
    	if(isInPast)
    	{
    		if(count == 20)
    		{
    			seconds--;
    			count = 0;
    		}
    		if(seconds == 0)
    		{
    			minutes--;
    			seconds = 60;
    		}
    		if(minutes == 0)
    		{
    			text = "Time Remaining: " + seconds + " Seconds";
    		}
    		if(minutes <= 0 && seconds <= 1)
    		{
    			mechanics.outOfTime(mc, mc.getIntegratedServer(), text);
    			mobsInitSpawned = false;
    			isInPast = false;
    			TimeTraveler.vars.setNextSet(true);
    
    		}
    	}	
    	TimeTraveler.vars.setParadoxAmt(paradoxLevel);
    }
    @SubscribeEvent
    private void onRenderTick(TickEvent.RenderTickEvent event)
    {
    	Minecraft mc = FMLClientHandler.instance().getClient();
    	PastMechanics mechanics = new PastMechanics();
    
            if(mc.currentScreen == null)
            {
            	if(isInPast)
            	{
    			mechanics.drawTimeTicker(mc, text);
            	}
        		mechanics.updateParadoxBar(mc, paradoxLevel);
            }
    
    }
    }
    

  7. I am attempting to update my event handlers to 1.7.10, but for some reason, they are not being called.  Here are the main file and event handler files (Edited for relevancy):

     

    	@EventHandler
    public void preLoad(FMLPreInitializationEvent event)
    {
    	snw = NetworkRegistry.INSTANCE.newSimpleChannel(modid);
    	snw.registerMessage(TimeTravelerPacketHandler.class, Message.class, 0, Side.CLIENT);
    
    	FMLCommonHandler.instance().bus().register(new TTEventHandler());
    	FMLCommonHandler.instance().bus().register(new Ticker());
    
    	MinecraftForge.EVENT_BUS.register(new TTEventHandler());
    	MinecraftForge.EVENT_BUS.register(new Ticker());
    
    
    }

     

    	@SubscribeEvent
    public void onItemTossEvent(ItemTossEvent ev) throws IOException 
    {
    	System.out.println("EVENTS WORKING");
    
    	List<PastAction> aList = TimeTraveler.instance.getActionListForPlayer(ev.player);
    	if (aList != null) 
    	{
    		PastAction ma = new PastAction(PastActionTypes.DROP);
    
    		ev.entityItem.getEntityItem().writeToNBT(ma.itemData);
    
    		aList.add(ma);
    	}
    }
    

     

    I have tried moving the FMLCommon lines to both the PreInit and Init to no avail. 

  8. I am trying to keep all entities within a certain bounds from moving.  Currently, this is working for mobs only, and all other entities (Item drops, falling sand/gravel, prime TNT, etc) keep falling at a slower rate than normal.

     

    public void updateEntity()
    {
    	World world = this.worldObj;
    	int x = this.xCoord;
    	int y = this.yCoord;
    	int z = this.zCoord;
    
    	updateWalls(world, x, y, z);
    
    	if(world.isBlockIndirectlyGettingPowered(x, y, z))
    	{
    		List<Entity> entitiesToFreeze = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(this.xCoord,  0, this.zCoord, xcoord, 128, zcoord));
    		if(entitiesToFreeze.size() > 0)
    		{
    			for(int i = 0; i < entitiesToFreeze.size(); i++)
    			{
    				Entity e = entitiesToFreeze.get(i);
    				System.out.println(e);
    				if(e instanceof EntityPlayer)
    				{
    
    				}
    				else
    				{
    					e.motionX = 0.0D;
    					e.motionY = 0.0D;
    					e.motionZ = 0.0D;
    					e.setPosition(e.posX, e.posY, e.posZ);
    				}
    			}
    		}
    	}
    }
    

     

    Any ideas why this might be happening or how to fix it?

×
×
  • Create New...

Important Information

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