Jump to content

Gess1t

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Gess1t

  1. i've found the issue, one day, i came across this minecraft wiki, oh dear, i hate myself for not checking it first : Do you all see the issue? i feel like my brain is melting, with the all the time i spent when the mistake i've done was 3 click away from me and the most obvious sh*t still, why is it returning s=36 in my InvChk method? some kind of shenanigans? checking for slots that doesn't exist? other than this, i need to check if everything work on servers and others. coming back soon.
  2. got a System.out.println(event.getEntityPlayer().world.isRemote) before the isRemote check, it's return false but then with if(!event.getEntityPlayer().world.isRemote == true) ofc it's return true, still the same issue, it stop at the 35th slot and not msg ofc cause it didn't hit the 36th one (it doesn't got higher than 35 anyway) on SinglePlayer and server once again. i'm just mad, and loosing time for an issue you probably fixed yourself in 3s while i'm here just trying every possible thing in the hope of making it work, cause there is no errors or thing that indicate where i've f*cked up. and instead of just working, it work 1/1000th of the time. I love EDIT: even with s>35 the if(s >34) doesn't work lmao
  3. if i remove it, it doesn't work at all' like not output, ect... i think it was even the cause for the time where my InvChk event triggered every tick and sendin the msg every ticks too, ignoring the Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L even if it's isn't the same method at all, it's still strange that this happened when i've reverted isRemote EDIT: well at least that last issue i talked you about isn't here anymore, anyway, as i said, it still doesn't work, and it doesn't trigger the check in InvChk at all log in case : 2019-09-16 19:14:17,322 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2019-09-16 19:14:17,327 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [19:14:18] [main/INFO] [GradleStart]: Extra: [] [19:14:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/[User]/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.1, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [19:14:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [19:14:18] [main/INFO] [FML]: Forge Mod Loader version 14.22.1.2478 for Minecraft 1.12.1 loading [19:14:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_212 [19:14:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [19:14:18] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [19:14:18] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [19:14:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [19:14:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [19:14:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [19:14:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [19:14:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper 2019-09-16 19:14:19,747 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2019-09-16 19:14:20,857 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2019-09-16 19:14:20,860 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [19:14:23] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [19:14:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [19:14:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [19:14:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [19:14:24] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [19:14:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [19:14:24] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [19:14:25] [main/INFO]: Setting user: Player279 [19:14:31] [main/WARN]: Skipping bad option: lastServer: [19:14:31] [main/INFO]: LWJGL Version: 2.9.4 [19:14:33] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.1 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 732270128 bytes (698 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' [19:14:33] [main/INFO] [FML]: MinecraftForge v14.22.1.2478 Initialized [19:14:33] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [19:14:33] [main/INFO] [FML]: Replaced 1036 ore ingredients [19:14:34] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [19:14:34] [main/INFO] [FML]: Searching D:\Modding\Minecraft\fullinventorychecker\run\mods for mods [19:14:36] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [19:14:36] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at CLIENT [19:14:36] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at SERVER [19:14:37] [Thread-3/INFO] [FML]: Using alternative sync timing : 200 frames of Display.update took 3596594301 nanos [19:14:37] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Full Inventory Checker [19:14:37] [main/INFO] [FML]: Processing ObjectHolder annotations [19:14:37] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [19:14:37] [main/INFO] [FML]: Identifying ItemStackHolder annotations [19:14:37] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [19:14:37] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [19:14:37] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [19:14:37] [main/INFO] [FML]: Applying holder lookups [19:14:37] [main/INFO] [FML]: Holder lookups applied [19:14:37] [main/INFO] [FML]: Applying holder lookups [19:14:37] [main/INFO] [FML]: Holder lookups applied [19:14:37] [main/INFO] [FML]: Applying holder lookups [19:14:37] [main/INFO] [FML]: Holder lookups applied [19:14:37] [main/INFO] [FML]: Applying holder lookups [19:14:37] [main/INFO] [FML]: Holder lookups applied [19:14:37] [main/INFO] [FML]: Injecting itemstacks [19:14:37] [main/INFO] [FML]: Itemstack injection complete [19:14:38] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null [19:14:43] [Sound Library Loader/INFO]: Starting up SoundSystem... [19:14:43] [Thread-5/INFO]: Initializing LWJGL OpenAL [19:14:43] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [19:14:43] [Thread-5/INFO]: OpenAL initialized. [19:14:43] [Sound Library Loader/INFO]: Sound engine started [19:14:51] [main/INFO] [FML]: Max texture size: 16384 [19:14:51] [main/INFO]: Created: 512x512 textures-atlas [19:14:54] [main/INFO] [FML]: Applying holder lookups [19:14:54] [main/INFO] [FML]: Holder lookups applied [19:14:54] [main/INFO] [FML]: Injecting itemstacks [19:14:54] [main/INFO] [FML]: Itemstack injection complete [19:14:54] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [19:14:54] [main/WARN]: Skipping bad option: lastServer: [19:14:54] [main/INFO]: Narrator library for x64 successfully loaded [19:14:56] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [19:15:00] [Server thread/INFO]: Starting integrated minecraft server version 1.12.1 [19:15:00] [Server thread/INFO]: Generating keypair [19:15:01] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance [19:15:01] [Server thread/INFO] [FML]: Applying holder lookups [19:15:01] [Server thread/INFO] [FML]: Holder lookups applied [19:15:01] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@6e65b1e8) [19:15:02] [Server thread/INFO]: Loaded 488 advancements [19:15:02] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@6e65b1e8) [19:15:02] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@6e65b1e8) [19:15:02] [Server thread/INFO]: Preparing start region for level 0 [19:15:06] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [19:15:06] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [19:15:06] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected] - Compatible in 1.12.1 & 1.12.2 [19:15:06] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [19:15:06] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [19:15:06] [Server thread/INFO]: Player279[local:E:2d78e81a] logged in with entity id 66 at (-328.66578901685057, 4.0, -1580.3676219127362) [19:15:06] [Server thread/INFO]: Player279 joined the game [19:15:08] [Server thread/INFO]: Saving and pausing game... [19:15:08] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [19:15:08] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [19:15:08] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [19:15:09] [main/INFO]: Loaded 6 advancements [19:15:09] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@39fa5780[id=5c6d79ca-db3a-3a0a-8d04-9e811bde5c64,name=Player279,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3170) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_212] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_212] at java.lang.Thread.run(Unknown Source) [?:1.8.0_212] [19:15:18] [Server thread/INFO]: Saving and pausing game... [19:15:18] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [19:15:18] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [19:15:18] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [19:15:26] [main/INFO]: [CHAT] Your inventory is full [19:15:26] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:15:36] [main/INFO]: [CHAT] Your inventory is full [19:15:36] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:15:46] [main/INFO]: [CHAT] Your inventory is full [19:15:46] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:15:56] [main/INFO]: [CHAT] Your inventory is full [19:15:56] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:16:06] [main/INFO]: [CHAT] Your inventory is full [19:16:06] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:16:16] [main/INFO]: [CHAT] Your inventory is full [19:16:16] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:16:26] [main/INFO]: [CHAT] Your inventory is full [19:16:26] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:16:36] [main/INFO]: [CHAT] Your inventory is full [19:16:36] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:16:46] [main/INFO]: [CHAT] Your inventory is full [19:16:46] [main/INFO] [STDOUT]: [Gess.mod.Main:chkInv:89]: chkInv: Triggerred with s = 36 [19:17:00] [main/INFO]: Loaded 25 advancements [19:17:02] [Server thread/INFO]: Saving and pausing game... [19:17:02] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [19:17:02] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [19:17:02] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [19:17:03] [main/INFO]: Stopping! [19:17:03] [Server thread/INFO]: Stopping server [19:17:03] [Server thread/INFO]: Saving players [19:17:03] [Server thread/INFO]: Saving worlds [19:17:03] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [19:17:03] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [19:17:03] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [19:17:03] [Server thread/INFO] [FML]: Unloading dimension 0 [19:17:03] [Server thread/INFO] [FML]: Unloading dimension -1 [19:17:03] [Server thread/INFO] [FML]: Unloading dimension 1 [19:17:03] [main/INFO]: SoundSystem shutting down... [19:17:04] [Server thread/INFO] [FML]: Applying holder lookups [19:17:04] [Server thread/INFO] [FML]: Holder lookups applied [19:17:04] [main/WARN]: Author: Paul Lamb, www.paulscode.com Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
  4. coming in 30s, Here is the code rn package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; float lastMessageTime = 0; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent event){} @EventHandler public void postInit(FMLPostInitializationEvent event){ // if (config.hasChanged()) { // config.save(); //} } public Main() { } @SubscribeEvent public static void PckUpItm(EntityItemPickupEvent event) { if(!event.getEntityPlayer().world.isRemote) { int g = 0; for(int e=0; e < 37; e++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(e).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(e).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(e).getMaxStackSize()) { g++; System.out.println("output2 = " + g); if(g > 35) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("PckUpItem: Trigerred with g = " + g); return; } } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } //else { //for(int t=0; i < 37; t++) { //if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft().player.inventory.getStackInSlot(t).getItem() == ) { //} //} //} } } return; } } } //@SideOnly(Side.CLIENT) //public void TickhHandler(TickEvent.ClientTickEvent event) throws InterruptedException { //wait(200); //}
  5. i was wandering i could build the mod with one method, and then another mod with the other one, will i still reach across logical sides? or it's just something else, like i need to send packets?
  6. so, is there any way to fix this issue? just adding event.getEntityPlayer().world.isRemote didn't helped in any way as far as i know and tested, on server and single player, i'm repeating myself i know. i've seen that the using Minecraft.getMinecraft() is client-side code or something like that. what should i use then?
  7. anyway, it started working again, i guess things want to work whenever they want, like my method for example, it worked for like 30 min and stopped working again after relaunching. Still don't know how to fix it nothing special at all in the logs, when compared with other logs. another edit cause why not: i wonder if the issue is forge or minecraft itself at this point, all this make no sense to me and probably you, am i right?
  8. should had edited it, it freeze and crash the game on the ms the game windows show up,
  9. tried to use the eclipse's debugger; bug it crash the game so... nope added the line of code as an if statement like you told me, but as far as i know, this line of code alone won't help right?
  10. my last try for today : event.getEntityPlayer().world.isRemote there is world, but i can't find World
  11. then it is if(Minecraft.getMinecraft().player.world.isRemote) EDIT: well nope, no need to tell me and again, as i said in my previous message, no i didn't, cause i didn't needed one yet. i guess now you ask that, that i need one?
  12. EDIT cause i'm retarded : if(Minecraft.getMinecraft().world.isRemote) yup, in solo, worked with 64 in each of 36 inv slots, and same in multiplayer ans hypixel when i had the exception, didn't used any debugger.
  13. mostly, but i learned you can't make all things client side. tried it while farming sugar canes on skyblock servers, worked flawlessly. EDIT: i also had potentially found a way to add minecraft: IDs as exception for the check (for the nether star and the head cause backpacks and the menu aren't stackable items), but deleted it in the process of trying to fix it, will have to re-write all that later.
  14. so i need to learn how to use packets now just because it refuse to work? even hypixel accepted it
  15. i'm using 1.12.1 cause it's also compatible with 1.12.2 So i'm reaching across logicals sides now? why not before? like when the code was working flawlessly? even on servers!
  16. forge recommended (1.12.1 - 14.22.1.2478) so one of my 2 methods that check the inventory and send the message suddenly stopped working completely without editing it, copy pasting code from a known working method doesn't fix it, redoing the method does not fix it, create the method under another name doesn't work, logs show nothing, it's just forge shenanigans at this point for me. the method : @SubscribeEvent public static void PckUpItm(EntityItemPickupEvent event) { System.out.println("output1"); int g = 0; for(int e=0; e < 37; e++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(e).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(e).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(e).getMaxStackSize()) { g++; System.out.println("output2"); if(g > 35) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("output3"); return; } } } } so i've added 3 output to console the "output1" appear, the "output2" appear 35 times? it should appear 36 times so wtf. the "output3" does not appear at all obviously. EDIT: last time i tried it, i started the game, and it was working, so i just closed the game, and i closed eclipse. and when i came back to test it today, it wasn't working anymore EDIT2: Added System.out.println(g) instead, it doesn't go higher than 35, even when editing the value to e < 38 Even More EDIT cause why not: it worked for one try, and now, value don't go higher than 35 when the other method goes to 36 flawlessly
  17. well @SideOnly(Side.CLIENT) public void TickhHandler(TickEvent.ClientTickEvent event) throws InterruptedException { wait(200); } well, this isn't static so i suppose i failed once again?
  18. well, fuck. so i need to make a world based tick delay of 200, let's go. so i finally need An event handler class?
  19. well you're right, when i get a full inv, the game freeze, but the console still output the text lol package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Main instance; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){} @EventHandler public void init(FMLInitializationEvent event){} @EventHandler public void postInit(FMLPostInitializationEvent event){} public Main() { } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int d = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty()) { d++; if(d > 35) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); Thread.sleep(10000); return; } } } return; } } } so now i need to fix the freezes lul with no possible way to debug cause no errors pops in chat
  20. tell me if i'm correct, but i could add +1 to a variable every time a slot is filled with a certain stack and so return false until it get to 36 and then the message send
  21. a resume of it would be, "i only checked for a single slot to have an item and i assume the inventory is full" so i assume this .isEmpty return only true or false, not what i want, but that's what other told me to use
  22. had to add it before public class Main to work, now i get the "you're ingame" message spamming every ticks, but when i take a single item, it also say : "your inventory is full" which is also spamming every ticks, thing i would like to avoid may i use the wait function of something? EDIT: i know understand what you were talking about Draco18s
  23. done that, still no msg, not even the "you're ingame" one which should appear every game ticks
×
×
  • Create New...

Important Information

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