
Pingun114
Members-
Posts
27 -
Joined
-
Last visited
Everything posted by Pingun114
-
[1.16.5] startOpen() in LockableLootTileEntity not called
Pingun114 posted a topic in Modder Support
So, I've been working on adding a few kitchen blocks, and just completed adding all 16 different variants of the counter. I have a model + textures for both the closed and open blockstates, but the startOpen function that handles the change in texture and tick scheduling isn't being called. From reading both the barrel block and tileentity classes, there's no reason it shouldn't be called, does anyone have any idea on what the issue might be? -
[1.16.5] Help with Mixin crash Dev Environment
Pingun114 replied to Pingun114's topic in Modder Support
Fix linked: -
I'm working on a Farmer's Delight addon, and so went to install it. With it, I also added spongepowered.mixin, as it was required. Unfortunately, When attempting to start the client, to test things, It would crash on the first @Inject from FD. Now, I have no previous experience with mixins of any ki nd, and the log doesn't tell me much, though it looks like a reference map issue of some kind? Some help would be much appreciated. build.gradle debug.log
-
So, I'm working on a FD addon, and, as such I added it to my project using my build.gradle file. I used Abnormal's Delight's build.gradle to check what they're using to add it to their project, and added both FD and Mixin. However, when atempting to launch the game, it would crash when mixin tried to inject some FD code. Here's the crash and the build.gradle. I know it's something with my setup, but this is the first time I've ever touched mixins, although the actual code you'd write seems easy to understand. latest.log build.gradle
-
[1.16.5] Get and set face solid/sturdy on Block
Pingun114 replied to Pingun114's topic in Modder Support
Yes, I found that when looking through its calls. I usually do that for just these kinds. -
[1.16.5] Get and set face solid/sturdy on Block
Pingun114 replied to Pingun114's topic in Modder Support
Now the only thing I have left is to make its top side solid, without making the other sides solid. Edit: Seeing as my top side was full, I'm guessing it already counted as solid, due to being able to place torches on it, but not on the side. -
[1.16.5] Get and set face solid/sturdy on Block
Pingun114 replied to Pingun114's topic in Modder Support
Actually, RailBlock actually came in handy for this. -
[1.16.5] Get and set face solid/sturdy on Block
Pingun114 replied to Pingun114's topic in Modder Support
Ah, does it work on North,West, etc, too? I'm specifically looking for having the sides support it. -
Hello, I'm creating a block which is supposed to require a solid (sturdy?) horizontal support (North, West, South, or East), or else it should pop off. The block itself should have the top side be solid. I've done things like this in 1.12, but the system has changed since then. I already have a VoxelShape, which is being used by getShape and getCollisionShape.
-
Well, I removed it, completely cleared my workspace, and updated to latest stable forge version. Can't really check currently since there's been a lot of mapping changes, to my code. Actually, is there somewhere I can see the new mapping changes? It would not only be useful for this, but in the future, too.
-
Specifically, like I mentioned before, things like io.netty.util and net.minecraftforge.x.eventbus will sometimes disappear when I start up the IDE again, so I downloaded Netty and imported if as an external library. Now, I've since last checked, and the missing function does exist. As for the stacktrace, while I doubt it will help in this case, here: -- Head -- Thread: Render thread Stacktrace: at io.netty.channel.nio.NioEventLoop$5.run(NioEventLoop.java:219) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161] {} at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:212) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:151) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:127) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:36) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84) ~[patchy-1.1.jar:?] {} at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58) ~[patchy-1.1.jar:?] {} at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47) ~[patchy-1.1.jar:?] {} at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:77) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:59) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {} at net.minecraft.network.NetworkSystem.lambda$static$0(NetworkSystem.java:46) ~[?:?] {re:classloading} at net.minecraft.util.LazyValue.getValue(LazyValue.java:16) ~[?:?] {re:classloading} at net.minecraft.network.NetworkSystem.addLocalEndpoint(NetworkSystem.java:115) ~[?:?] {re:classloading} at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:1832) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:1728) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.func_214443_e(WorldSelectionList.java:364) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.func_214438_a(WorldSelectionList.java:273) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.mouseClicked(WorldSelectionList.java:225) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.widget.list.AbstractList.mouseClicked(AbstractList.java:309) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.INestedGuiEventHandler.mouseClicked(INestedGuiEventHandler.java:31) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:92) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} -- Affected screen -- Details: Screen name: net.minecraft.client.gui.screen.WorldSelectionScreen Stacktrace: at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:427) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.mouseButtonCallback(MouseHelper.java:90) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:185) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B} at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:184) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {} at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {} at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) ~[lwjgl-glfw-3.2.2.jar:build 10] {} at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:112) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1025) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.36_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
-
[1.16] Enable slots only under certain conditions
Pingun114 replied to Zemelua's topic in Modder Support
I believe this has to do with ho GUIs doesn't update like you'd think they'd do. A friend of mine mentioned this when I asked him a similar question. My best bet would be to look into that. -
So, I'm currently running into a major issue where I can't open a world in my IDE. The crash happens once the world has been loaded up, and the client world screen is about to launch. When this happens, mouseClicked event handler reports: Caused by: java.lang.NoSuchMethodError: io.netty.util.internal.ReflectionUtil.trySetAccessible(Ljava/lang/reflect/AccessibleObject;Z)Ljava/lang/Throwable; I've had to reinstall netty, as files such as these sometimes just disappears, with no known cause. The version I installed was netty-all:4.1.25.Final. Since then I've also used : gradlew --stop gradlew clean Note that I haven't had these issues before this, so it has nothing to do with forge version.
-
Running gradlew --stop then gradlew clear worked for me! I've had this issue quite a few times, in the past I've simply downloaded a new mdk, removed everything, reinstall it, then insert my old src folder and build file, but this is much easier.
-
So, a lot of mods use various blocks as heat sources to work, everything from fire, lava, magma blocks, and campfires, to their own modded blocks. And they all basically use their own tags, or simply check for specific blocks, to determine if the block is hot. My proposal is to add an universal tag for this, allowing for cross mod compatibility without explicitly adding support to the mod. This would also reduce the amount of tags blocks would be given, as every mod would not require to create their own tag. Edit: Active Furnaces should also be given the tag, I believe:
-
- 1
-
-
CommonProxy Edit: Moved it to main, no errors.
-
Hmm, I've gotten it to stop crashing, though I've run into a different problem. FMLIndexedMessageCodec exception caught io.netty.handler.codec.EncoderException: java.lang.RuntimeException: Undefined discriminator for message type crimson_twilight.simplerpgtools.common.util.MessageExtendedReachAttack in channel simplerpgtools Does it have to do with: public void init() { int packetId = 0; SimpleRpgTools.network.registerMessage(MessageExtendedReachAttack.Handler.class, MessageExtendedReachAttack.class, packetId++, Side.SERVER); }
-
Line 58: SimpleRpgTools.network.sendToServer(new MessageExtendedReachAttack(res.entityHit.getEntityId()));
-
It's mostly a redundancy check, if for some reason it is null
-
@Mod.EventBusSubscriber(modid = SimpleRpgTools.MODID) public class EventHandler { @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public void onEvent(MouseEvent event) { if(event.getButton() == 0 & event.isButtonstate()) { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.player; if(player != null) { ItemStack stack = player.getHeldItemMainhand(); IExtendedReach ieri; if(stack != null) { if(stack.getItem() instanceof IExtendedReach) { ieri = (IExtendedReach)stack.getItem(); } else { ieri = null; } if(ieri != null) { float reach = ieri.getReach(); RayTraceResult res = getMouseOverExtended(reach); if(res != null) { if(res.entityHit != null && (res.entityHit.hurtResistantTime == 0 || ieri.unblockable())) { if(res.entityHit != player) { SimpleRpgTools.network.sendToServer(new MessageExtendedReachAttack(res.entityHit.getEntityId())); } } } } } } } } // This is mostly copied from the EntityRenderer#getMouseOver() method public static RayTraceResult getMouseOverExtended(float dist) { Minecraft mc = FMLClientHandler.instance().getClient(); Entity theRenderViewEntity = mc.getRenderViewEntity(); AxisAlignedBB theViewBoundingBox = new AxisAlignedBB( theRenderViewEntity.posX-0.5D, theRenderViewEntity.posY-0.0D, theRenderViewEntity.posZ-0.5D, theRenderViewEntity.posX+0.5D, theRenderViewEntity.posY+1.5D, theRenderViewEntity.posZ+0.5D ); RayTraceResult returnMOP = null; if (mc.world != null) { double var2 = dist; returnMOP = theRenderViewEntity.rayTrace(var2, 0); double calcdist = var2; Vec3d pos = theRenderViewEntity.getPositionEyes(0); var2 = calcdist; if (returnMOP != null) { calcdist = returnMOP.hitVec.distanceTo(pos); } Vec3d lookvec = theRenderViewEntity.getLook(0); Vec3d var8 = pos.addVector(lookvec.x * var2, lookvec.y * var2, lookvec.z * var2); Entity pointedEntity = null; float var9 = 1.0F; @SuppressWarnings("unchecked") List<Entity> list = mc.world.getEntitiesWithinAABBExcludingEntity( theRenderViewEntity, theViewBoundingBox.grow( lookvec.x * var2, lookvec.y * var2, lookvec.z * var2).expand(var9, var9, var9)); double d = calcdist; for (Entity entity : list) { if (entity.canBeCollidedWith()) { float bordersize = entity.getCollisionBorderSize(); AxisAlignedBB aabb = new AxisAlignedBB( entity.posX-entity.width/2, entity.posY, entity.posZ-entity.width/2, entity.posX+entity.width/2, entity.posY+entity.height, entity.posZ+entity.width/2); aabb.expand(bordersize, bordersize, bordersize); RayTraceResult mop0 = aabb.calculateIntercept(pos, var8); if (aabb.contains(pos)) { if (0.0D < d || d == 0.0D) { pointedEntity = entity; d = 0.0D; System.out.println(entity); } } else if (mop0 != null) { double d1 = pos.distanceTo(mop0.hitVec); if (d1 < d || d == 0.0D) { pointedEntity = entity; d = d1; } } } } if (pointedEntity != null && (d < calcdist || returnMOP == null)) { returnMOP = new RayTraceResult(pointedEntity); } } return returnMOP; } }
-
Hello, I've been working on a weapon with extended reach, and have mostly gotten it to work. However, once I send the info to the server, the game crashes. Quote ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 10/6/19 11:42 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error at crimson_twilight.simplerpgtools.common.util.EventHandler.onEvent(EventHandler.java:58) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_28_EventHandler_onEvent_MouseEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.client.ForgeHooksClient.postMouseEvent(ForgeHooksClient.java:273) at net.minecraft.client.Minecraft.runTickMouse(Minecraft.java:2402) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1927) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1188) at net.minecraft.client.Minecraft.run(Minecraft.java:442) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at crimson_twilight.simplerpgtools.common.util.EventHandler.onEvent(EventHandler.java:58) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_28_EventHandler_onEvent_MouseEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.client.ForgeHooksClient.postMouseEvent(ForgeHooksClient.java:273) at net.minecraft.client.Minecraft.runTickMouse(Minecraft.java:2402) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player510'/389, l='MpServer', x=-271.56, y=76.76, z=211.07]] Chunk stats: MultiplayerChunkCache: 621, 621 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-244,64,248), Chunk: (at 12,4,8 in -16,15; contains blocks -256,0,240 to -241,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 28243 game time, 574 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: 83 total; [EntityZombie['Zombie'/128, l='MpServer', x=-278.50, y=25.00, z=134.29], EntityZombie['Zombie'/769, l='MpServer', x=-233.50, y=16.00, z=221.50], EntityPig['Pig'/130, l='MpServer', x=-279.28, y=70.00, z=153.52], EntityZombie['Zombie'/770, l='MpServer', x=-233.50, y=16.00, z=220.50], EntityItem['item.item.porkchopRaw'/131, l='MpServer', x=-273.52, y=70.00, z=189.29], EntityPig['Pig'/132, l='MpServer', x=-281.70, y=71.00, z=202.47], EntityPig['Pig'/133, l='MpServer', x=-275.29, y=71.00, z=231.23], EntityZombie['Zombie'/773, l='MpServer', x=-325.50, y=42.00, z=217.50], EntityPig['Pig'/134, l='MpServer', x=-279.69, y=72.00, z=228.38], EntityPig['Pig'/135, l='MpServer', x=-282.72, y=72.00, z=227.20], EntityCow['Cow'/136, l='MpServer', x=-279.46, y=74.00, z=278.78], EntityCow['Cow'/137, l='MpServer', x=-275.28, y=74.00, z=289.83], EntitySkeleton['Skeleton'/266, l='MpServer', x=-189.79, y=28.00, z=181.40], EntityZombie['Zombie'/270, l='MpServer', x=-191.48, y=37.00, z=190.79], EntityZombie['Zombie'/654, l='MpServer', x=-215.50, y=22.00, z=215.50], EntityItem['item.item.porkchopRaw'/149, l='MpServer', x=-264.64, y=69.00, z=186.30], EntityItem['item.item.porkchopRaw'/150, l='MpServer', x=-270.48, y=70.00, z=193.86], EntityItem['item.item.porkchopRaw'/151, l='MpServer', x=-261.99, y=67.00, z=204.74], EntityBat['Bat'/154, l='MpServer', x=-257.85, y=25.29, z=209.32], EntityCow['Cow'/155, l='MpServer', x=-265.56, y=69.00, z=280.21], EntityPlayerSP['Player510'/389, l='MpServer', x=-271.56, y=76.76, z=211.07], EntityBat['Bat'/802, l='MpServer', x=-249.50, y=22.00, z=242.50], EntityBat['Bat'/164, l='MpServer', x=-244.45, y=20.10, z=140.25], EntityZombie['Zombie'/165, l='MpServer', x=-247.19, y=38.00, z=165.49], EntityBat['Bat'/166, l='MpServer', x=-245.40, y=40.90, z=163.60], EntitySkeleton['Skeleton'/167, l='MpServer', x=-252.23, y=15.00, z=208.48], EntitySkeleton['Skeleton'/168, l='MpServer', x=-253.56, y=23.00, z=215.15], EntitySkeleton['Skeleton'/169, l='MpServer', x=-253.50, y=28.00, z=251.50], EntitySkeleton['Skeleton'/170, l='MpServer', x=-254.29, y=23.00, z=243.36], EntityCreeper['Creeper'/171, l='MpServer', x=-249.50, y=23.00, z=240.50], EntitySkeleton['Skeleton'/172, l='MpServer', x=-240.49, y=19.00, z=287.23], EntitySkeleton['Skeleton'/692, l='MpServer', x=-235.50, y=37.00, z=151.50], EntityBat['Bat'/187, l='MpServer', x=-235.25, y=25.10, z=134.04], EntitySkeleton['Skeleton'/188, l='MpServer', x=-236.23, y=20.00, z=136.48], EntitySkeleton['Skeleton'/189, l='MpServer', x=-239.78, y=27.00, z=143.49], EntityCreeper['Creeper'/190, l='MpServer', x=-231.50, y=23.00, z=131.63], EntityBat['Bat'/191, l='MpServer', x=-235.25, y=23.10, z=158.57], EntityZombie['Zombie'/192, l='MpServer', x=-235.76, y=31.00, z=152.48], EntitySkeleton['Skeleton'/193, l='MpServer', x=-224.77, y=33.00, z=153.52], EntityEnderman['Enderman'/194, l='MpServer', x=-231.69, y=23.00, z=170.50], EntitySkeleton['Skeleton'/195, l='MpServer', x=-226.29, y=34.00, z=163.50], EntityCreeper['Creeper'/196, l='MpServer', x=-236.78, y=37.00, z=164.40], EntityItem['item.item.porkchopRaw'/197, l='MpServer', x=-227.85, y=68.00, z=171.98], EntityCreeper['Creeper'/198, l='MpServer', x=-237.03, y=36.00, z=190.50], EntityZombie['Zombie'/199, l='MpServer', x=-239.56, y=27.00, z=219.75], EntityBat['Bat'/200, l='MpServer', x=-235.36, y=21.40, z=224.77], EntitySkeleton['Skeleton'/201, l='MpServer', x=-225.51, y=21.00, z=280.73], EntityBat['Bat'/202, l='MpServer', x=-220.30, y=22.63, z=282.30], EntityPig['Pig'/81, l='MpServer', x=-336.36, y=69.00, z=133.75], EntityBat['Bat'/83, l='MpServer', x=-345.48, y=45.10, z=205.22], EntityPig['Pig'/88, l='MpServer', x=-322.67, y=69.00, z=133.75], EntityZombie['Zombie'/216, l='MpServer', x=-220.30, y=11.03, z=139.30], EntityPig['Pig'/89, l='MpServer', x=-321.82, y=71.00, z=266.21], EntityCreeper['Creeper'/217, l='MpServer', x=-211.39, y=18.00, z=136.21], EntityPig['Pig'/90, l='MpServer', x=-323.75, y=71.00, z=263.35], EntityCreeper['Creeper'/218, l='MpServer', x=-208.50, y=15.00, z=220.50], EntityPig['Pig'/91, l='MpServer', x=-326.67, y=70.00, z=278.49], EntityPig['Pig'/221, l='MpServer', x=-208.49, y=71.00, z=288.28], EntityPig['Pig'/100, l='MpServer', x=-307.75, y=72.00, z=136.51], EntitySkeleton['Skeleton'/101, l='MpServer', x=-316.50, y=13.00, z=215.30], EntityPig['Pig'/102, l='MpServer', x=-317.52, y=70.00, z=230.98], EntityCreeper['Creeper'/234, l='MpServer', x=-198.30, y=15.00, z=135.27], EntitySkeleton['Skeleton'/235, l='MpServer', x=-197.48, y=15.00, z=146.52], EntityBat['Bat'/236, l='MpServer', x=-195.25, y=19.10, z=141.52], EntityZombie['Zombie'/237, l='MpServer', x=-208.61, y=18.00, z=138.22], EntityPig['Pig'/239, l='MpServer', x=-204.69, y=70.00, z=141.59], EntityZombie['Zombie'/240, l='MpServer', x=-204.48, y=21.00, z=148.18], EntityPig['Pig'/241, l='MpServer', x=-201.26, y=68.00, z=149.49], EntitySkeleton['Skeleton'/242, l='MpServer', x=-192.43, y=28.00, z=175.24], EntityCreeper['Creeper'/114, l='MpServer', x=-303.88, y=32.25, z=132.50], EntitySkeleton['Skeleton'/243, l='MpServer', x=-196.27, y=29.00, z=177.51], EntityPig['Pig'/115, l='MpServer', x=-291.62, y=72.00, z=131.72], EntityPig['Pig'/116, l='MpServer', x=-295.74, y=70.00, z=202.35], EntityPig['Pig'/244, l='MpServer', x=-209.26, y=68.00, z=243.60], EntityPig['Pig'/117, l='MpServer', x=-293.31, y=72.00, z=224.78], EntityPig['Pig'/245, l='MpServer', x=-191.03, y=71.00, z=259.52], EntityPig['Pig'/118, l='MpServer', x=-301.42, y=72.00, z=246.48], EntityPig['Pig'/246, l='MpServer', x=-195.51, y=70.00, z=264.03], EntityPig['Pig'/247, l='MpServer', x=-213.22, y=67.00, z=263.40], EntitySheep['Sheep'/119, l='MpServer', x=-308.26, y=71.00, z=285.49], EntityPig['Pig'/120, l='MpServer', x=-300.75, y=72.00, z=277.50], EntityPig['Pig'/248, l='MpServer', x=-195.60, y=73.00, z=275.74], EntityPig['Pig'/249, l='MpServer', x=-201.78, y=71.00, z=272.65]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2889) at net.minecraft.client.Minecraft.run(Minecraft.java:471) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_201, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 616081552 bytes (587 MB) / 922222592 bytes (879 MB) up to 3817865216 bytes (3641 MB) JVM Flags: 1 total; -Xmx4096m IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP 9.42 Powered by Forge 14.23.5.2847 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 | State | ID | Version | Source | Signature | |:------ |:-------------- |:------------ |:-------------------------------- |:--------- | | LCHIJA | minecraft | 1.12.2 | minecraft.jar | None | | LCHIJA | mcp | 9.42 | minecraft.jar | None | | LCHIJA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2847.jar | None | | LCHIJA | forge | 14.23.5.2847 | forgeSrc-1.12.2-14.23.5.2847.jar | None | | LCHIJA | simplerpgtools | 0.1.0 | bin | None | | LCHIJA | jei | 4.15.0.289 | jei_1.12.2-4.15.0.289.jar | None | Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 389.04' Renderer: 'GeForce GTX 1050 Ti/PCIe/SSE2' Launched Version: 1.12.2 LWJGL: 2.9.4 OpenGL: GeForce GTX 1050 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 389.04, 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) i5-8300H CPU @ 2.30GHz ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 10/6/19 11:42 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error at crimson_twilight.simplerpgtools.common.util.EventHandler.onEvent(EventHandler.java:58) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_28_EventHandler_onEvent_MouseEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.client.ForgeHooksClient.postMouseEvent(ForgeHooksClient.java:273) at net.minecraft.client.Minecraft.runTickMouse(Minecraft.java:2402) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1927) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1188) at net.minecraft.client.Minecraft.run(Minecraft.java:442) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at crimson_twilight.simplerpgtools.common.util.EventHandler.onEvent(EventHandler.java:58) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_28_EventHandler_onEvent_MouseEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.client.ForgeHooksClient.postMouseEvent(ForgeHooksClient.java:273) at net.minecraft.client.Minecraft.runTickMouse(Minecraft.java:2402) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player510'/389, l='MpServer', x=-271.56, y=76.76, z=211.07]] Chunk stats: MultiplayerChunkCache: 621, 621 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-244,64,248), Chunk: (at 12,4,8 in -16,15; contains blocks -256,0,240 to -241,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 28243 game time, 574 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: 83 total; [EntityZombie['Zombie'/128, l='MpServer', x=-278.50, y=25.00, z=134.29], EntityZombie['Zombie'/769, l='MpServer', x=-233.50, y=16.00, z=221.50], EntityPig['Pig'/130, l='MpServer', x=-279.28, y=70.00, z=153.52], EntityZombie['Zombie'/770, l='MpServer', x=-233.50, y=16.00, z=220.50], EntityItem['item.item.porkchopRaw'/131, l='MpServer', x=-273.52, y=70.00, z=189.29], EntityPig['Pig'/132, l='MpServer', x=-281.70, y=71.00, z=202.47], EntityPig['Pig'/133, l='MpServer', x=-275.29, y=71.00, z=231.23], EntityZombie['Zombie'/773, l='MpServer', x=-325.50, y=42.00, z=217.50], EntityPig['Pig'/134, l='MpServer', x=-279.69, y=72.00, z=228.38], EntityPig['Pig'/135, l='MpServer', x=-282.72, y=72.00, z=227.20], EntityCow['Cow'/136, l='MpServer', x=-279.46, y=74.00, z=278.78], EntityCow['Cow'/137, l='MpServer', x=-275.28, y=74.00, z=289.83], EntitySkeleton['Skeleton'/266, l='MpServer', x=-189.79, y=28.00, z=181.40], EntityZombie['Zombie'/270, l='MpServer', x=-191.48, y=37.00, z=190.79], EntityZombie['Zombie'/654, l='MpServer', x=-215.50, y=22.00, z=215.50], EntityItem['item.item.porkchopRaw'/149, l='MpServer', x=-264.64, y=69.00, z=186.30], EntityItem['item.item.porkchopRaw'/150, l='MpServer', x=-270.48, y=70.00, z=193.86], EntityItem['item.item.porkchopRaw'/151, l='MpServer', x=-261.99, y=67.00, z=204.74], EntityBat['Bat'/154, l='MpServer', x=-257.85, y=25.29, z=209.32], EntityCow['Cow'/155, l='MpServer', x=-265.56, y=69.00, z=280.21], EntityPlayerSP['Player510'/389, l='MpServer', x=-271.56, y=76.76, z=211.07], EntityBat['Bat'/802, l='MpServer', x=-249.50, y=22.00, z=242.50], EntityBat['Bat'/164, l='MpServer', x=-244.45, y=20.10, z=140.25], EntityZombie['Zombie'/165, l='MpServer', x=-247.19, y=38.00, z=165.49], EntityBat['Bat'/166, l='MpServer', x=-245.40, y=40.90, z=163.60], EntitySkeleton['Skeleton'/167, l='MpServer', x=-252.23, y=15.00, z=208.48], EntitySkeleton['Skeleton'/168, l='MpServer', x=-253.56, y=23.00, z=215.15], EntitySkeleton['Skeleton'/169, l='MpServer', x=-253.50, y=28.00, z=251.50], EntitySkeleton['Skeleton'/170, l='MpServer', x=-254.29, y=23.00, z=243.36], EntityCreeper['Creeper'/171, l='MpServer', x=-249.50, y=23.00, z=240.50], EntitySkeleton['Skeleton'/172, l='MpServer', x=-240.49, y=19.00, z=287.23], EntitySkeleton['Skeleton'/692, l='MpServer', x=-235.50, y=37.00, z=151.50], EntityBat['Bat'/187, l='MpServer', x=-235.25, y=25.10, z=134.04], EntitySkeleton['Skeleton'/188, l='MpServer', x=-236.23, y=20.00, z=136.48], EntitySkeleton['Skeleton'/189, l='MpServer', x=-239.78, y=27.00, z=143.49], EntityCreeper['Creeper'/190, l='MpServer', x=-231.50, y=23.00, z=131.63], EntityBat['Bat'/191, l='MpServer', x=-235.25, y=23.10, z=158.57], EntityZombie['Zombie'/192, l='MpServer', x=-235.76, y=31.00, z=152.48], EntitySkeleton['Skeleton'/193, l='MpServer', x=-224.77, y=33.00, z=153.52], EntityEnderman['Enderman'/194, l='MpServer', x=-231.69, y=23.00, z=170.50], EntitySkeleton['Skeleton'/195, l='MpServer', x=-226.29, y=34.00, z=163.50], EntityCreeper['Creeper'/196, l='MpServer', x=-236.78, y=37.00, z=164.40], EntityItem['item.item.porkchopRaw'/197, l='MpServer', x=-227.85, y=68.00, z=171.98], EntityCreeper['Creeper'/198, l='MpServer', x=-237.03, y=36.00, z=190.50], EntityZombie['Zombie'/199, l='MpServer', x=-239.56, y=27.00, z=219.75], EntityBat['Bat'/200, l='MpServer', x=-235.36, y=21.40, z=224.77], EntitySkeleton['Skeleton'/201, l='MpServer', x=-225.51, y=21.00, z=280.73], EntityBat['Bat'/202, l='MpServer', x=-220.30, y=22.63, z=282.30], EntityPig['Pig'/81, l='MpServer', x=-336.36, y=69.00, z=133.75], EntityBat['Bat'/83, l='MpServer', x=-345.48, y=45.10, z=205.22], EntityPig['Pig'/88, l='MpServer', x=-322.67, y=69.00, z=133.75], EntityZombie['Zombie'/216, l='MpServer', x=-220.30, y=11.03, z=139.30], EntityPig['Pig'/89, l='MpServer', x=-321.82, y=71.00, z=266.21], EntityCreeper['Creeper'/217, l='MpServer', x=-211.39, y=18.00, z=136.21], EntityPig['Pig'/90, l='MpServer', x=-323.75, y=71.00, z=263.35], EntityCreeper['Creeper'/218, l='MpServer', x=-208.50, y=15.00, z=220.50], EntityPig['Pig'/91, l='MpServer', x=-326.67, y=70.00, z=278.49], EntityPig['Pig'/221, l='MpServer', x=-208.49, y=71.00, z=288.28], EntityPig['Pig'/100, l='MpServer', x=-307.75, y=72.00, z=136.51], EntitySkeleton['Skeleton'/101, l='MpServer', x=-316.50, y=13.00, z=215.30], EntityPig['Pig'/102, l='MpServer', x=-317.52, y=70.00, z=230.98], EntityCreeper['Creeper'/234, l='MpServer', x=-198.30, y=15.00, z=135.27], EntitySkeleton['Skeleton'/235, l='MpServer', x=-197.48, y=15.00, z=146.52], EntityBat['Bat'/236, l='MpServer', x=-195.25, y=19.10, z=141.52], EntityZombie['Zombie'/237, l='MpServer', x=-208.61, y=18.00, z=138.22], EntityPig['Pig'/239, l='MpServer', x=-204.69, y=70.00, z=141.59], EntityZombie['Zombie'/240, l='MpServer', x=-204.48, y=21.00, z=148.18], EntityPig['Pig'/241, l='MpServer', x=-201.26, y=68.00, z=149.49], EntitySkeleton['Skeleton'/242, l='MpServer', x=-192.43, y=28.00, z=175.24], EntityCreeper['Creeper'/114, l='MpServer', x=-303.88, y=32.25, z=132.50], EntitySkeleton['Skeleton'/243, l='MpServer', x=-196.27, y=29.00, z=177.51], EntityPig['Pig'/115, l='MpServer', x=-291.62, y=72.00, z=131.72], EntityPig['Pig'/116, l='MpServer', x=-295.74, y=70.00, z=202.35], EntityPig['Pig'/244, l='MpServer', x=-209.26, y=68.00, z=243.60], EntityPig['Pig'/117, l='MpServer', x=-293.31, y=72.00, z=224.78], EntityPig['Pig'/245, l='MpServer', x=-191.03, y=71.00, z=259.52], EntityPig['Pig'/118, l='MpServer', x=-301.42, y=72.00, z=246.48], EntityPig['Pig'/246, l='MpServer', x=-195.51, y=70.00, z=264.03], EntityPig['Pig'/247, l='MpServer', x=-213.22, y=67.00, z=263.40], EntitySheep['Sheep'/119, l='MpServer', x=-308.26, y=71.00, z=285.49], EntityPig['Pig'/120, l='MpServer', x=-300.75, y=72.00, z=277.50], EntityPig['Pig'/248, l='MpServer', x=-195.60, y=73.00, z=275.74], EntityPig['Pig'/249, l='MpServer', x=-201.78, y=71.00, z=272.65]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2889) at net.minecraft.client.Minecraft.run(Minecraft.java:471) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_201, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 616081552 bytes (587 MB) / 922222592 bytes (879 MB) up to 3817865216 bytes (3641 MB) JVM Flags: 1 total; -Xmx4096m IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP 9.42 Powered by Forge 14.23.5.2847 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 | State | ID | Version | Source | Signature | |:------ |:-------------- |:------------ |:-------------------------------- |:--------- | | LCHIJA | minecraft | 1.12.2 | minecraft.jar | None | | LCHIJA | mcp | 9.42 | minecraft.jar | None | | LCHIJA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2847.jar | None | | LCHIJA | forge | 14.23.5.2847 | forgeSrc-1.12.2-14.23.5.2847.jar | None | | LCHIJA | simplerpgtools | 0.1.0 | bin | None | | LCHIJA | jei | 4.15.0.289 | jei_1.12.2-4.15.0.289.jar | None | Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 389.04' Renderer: 'GeForce GTX 1050 Ti/PCIe/SSE2' Launched Version: 1.12.2 LWJGL: 2.9.4 OpenGL: GeForce GTX 1050 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 389.04, 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) i5-8300H CPU @ 2.30GHz I've checked that the information I'm trying to send isn't null, which it isn't. And it runs through the constructor before crashing, but that's about it. Here's the message class: package crimson_twilight.simplerpgtools.common.util; import crimson_twilight.simplerpgtools.SimpleRpgTools; import crimson_twilight.simplerpgtools.common.util.interfaces.IExtendedReach; import io.netty.buffer.ByteBuf; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.fml.common.network.ByteBufUtils; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class MessageExtendedReachAttack implements IMessage { private int entityId ; public MessageExtendedReachAttack(int parEntityId) { entityId = parEntityId; // DEBUG System.out.println("Constructor "+entityId); } @Override public void fromBytes(ByteBuf buf) { // DEBUG System.out.println("fromBytes"); entityId = ByteBufUtils.readVarInt(buf, 4); } @Override public void toBytes(ByteBuf buf) { // DEBUG System.out.println("toBytes encoded"); ByteBufUtils.writeVarInt(buf, entityId, 4); } public static class Handler implements IMessageHandler<MessageExtendedReachAttack, IMessage> { @Override public IMessage onMessage(final MessageExtendedReachAttack message, MessageContext ctx) { // DEBUG System.out.println("Message received"); final EntityPlayerMP player = (EntityPlayerMP) SimpleRpgTools.proxy.getPlayerEntityFromContext(ctx); player.getServer().addScheduledTask( new Runnable() { @Override public void run() { Entity entity = player.world. getEntityByID(message.entityId); // DEBUG System.out.println("Entity = "+entity); // Need to ensure that hackers can't cause trick kills, // so double check weapon type and reach if (player.getHeldItemMainhand() == null) { return; } if (player.getActiveItemStack().getItem() instanceof IExtendedReach) { IExtendedReach theExtendedReachWeapon = (IExtendedReach)player.getHeldItemMainhand().getItem(); double distanceSq = player.getDistanceSq(entity); double reachSq = theExtendedReachWeapon.getReach() * theExtendedReachWeapon.getReach(); if (reachSq >= distanceSq) { player.attackTargetEntityWithCurrentItem(entity); } } return; // no response in this case } } ); return null; // no response message } } }
-
Hello, I'm making an amulet (with Baubles) and want to have Thaumcrafts sun scorched potion effect when you remove it. My problem is that I don't know how to import another mod's potion effect. Any and all help with the matter is appreciated.