Anon10W1z
Forge Modder-
Posts
311 -
Joined
-
Last visited
Everything posted by Anon10W1z
-
As others have said, the server should handle the actions of the keybinds rather than the keybinds themselves. Solutions involving working with keybinds on the server are not really solutions at all because they just cause more problems.
-
I decompiled a 1.8 mod to port over to 1.9 (for personal use), but I'm stuck on a reference to a isChecked() method in the GuiButton class. I've looked through the decompiled Minecraft 1.8 source code and I can't find it. I even used the MCPBot and it couldn't find any isChecked method in 1.8. Any ideas?
-
So how can I circumvent this? Do I just not set the HAND_STATES?
-
Alright, I did this and the arrow does fire as if the bow was drawn back 100%. Unfortunately the bow still goes through the entire draw-back animation. My code now: EntityPlayer player = (EntityPlayer) entity; ItemStack heldItem = player.getHeldItemMainhand(); if (heldItem != null && heldItem.getItem() instanceof ItemBow && this.getEnchantmentLevel(heldItem) > 0) { //player.setItemInUse(heldItem, heldItem.getMaxItemUseDuration() / 3); ReflectionHelper.setPrivateValue(EntityLivingBase.class, player, heldItem, "activeItemStack", "field_184627_bm"); ReflectionHelper.setPrivateValue(EntityLivingBase.class, player, heldItem.getMaxItemUseDuration() / 3, "activeItemStackUseCount", "field_184628_bn"); player.getDataManager().set(ReflectionHelper.getPrivateValue(EntityLivingBase.class, player, "HAND_STATES", "field_184621_as"), (byte) 1); ((ArrowNockEvent) baseEvent).setAction(new ActionResult<>(EnumActionResult.SUCCESS, heldItem)); }
-
I have an "Quickdraw" enchantment that works by setting the bow item in use immediately on right click, so it doesn't have to draw back all the way to be used. The basic code in 1.8 was: EntityPlayer player = (EntityPlayer) entity; ItemStack heldItem = player.getHeldItem(); if (heldItem != null && heldItem.getItem() instanceof ItemBow && this.getEnchantmentLevel(heldItem) > 0) { player.setItemInUse(heldItem, heldItem.getMaxItemUseDuration() / 3); ((ArrowNockEvent) baseEvent).result = heldItem; baseEvent.setCanceled(true); } However the setItemInUse method seems to be gone in 1.9, and I can't find a suitable replacement. What can I do?
-
[1.9] How do I go about updating my mods from 1.8 to 1.9?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Never heard of it. I'll take a look -
[1.9] How do I go about updating my mods from 1.8 to 1.9?
Anon10W1z replied to Anon10W1z's topic in Modder Support
I am using IEEP what can I replace it with? -
[1.9] How do I go about updating my mods from 1.8 to 1.9?
Anon10W1z posted a topic in Modder Support
Other than changing references and stuff, what else is there to do? -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Well see, it only moves the player's eye up a little from where it is. So it is off by a lot. -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
The player's eye doesn't point at the specified block. That's what I want. -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Thanks for that. Unfortunately I can't seem to get it to look properly. My code: double dX = Minecraft.getMinecraft().thePlayer.posX - DMTMap.STADIUM.secondCorner.getX(); double dY = Minecraft.getMinecraft().thePlayer.posY - DMTMap.STADIUM.secondCorner.getY(); double dZ = Minecraft.getMinecraft().thePlayer.posZ - DMTMap.STADIUM.secondCorner.getZ(); double yaw = Math.atan2(dZ, dX); double pitch = Math.atan2(Math.sqrt(dZ * dZ + dX * dX), dY) + Math.PI; Minecraft.getMinecraft().thePlayer.rotationYaw = (float) yaw; Minecraft.getMinecraft().thePlayer.rotationPitch = (float) pitch; -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Okay, I understand except for "vector math". I don't like to be spoonfed, but what "vector math" do I need to do? And how do I convert the vector into the pitch and yaw? -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
By the looks of it, all this does is keep turning the player's head. I need to get the variables to line up with a certain block. -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Okay, it looks like Mineplex checks for where the player is looking when I right click. So I now need a way for the player to turn its head to face a specific block. Anyone know how? -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Alright will do. Thanks. -
Simulate a right click on a specific block?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Will this work even for right clicking with items. not blocks? -
I am also stuck on simulating a right click.
-
[1.8.9] How to use the substitution alias system?
Anon10W1z replied to Choonster's topic in Modder Support
I remember having this problem in 1.8.0 when trying to get blocks to fall, and making it configurable to the user. I ended up using ASM to do this, though when I made my thread Lex said that wasn't the best solution. -
Is there a packet I can send, or something similar, that can notify the server of a right click being sent without the need to right click? For explanation, I am making a mod that shows a separate GUI for playing the Mineplex game Draw My Thing. It works perfectly, but it'd be even cooler if I could draw from that GUI. If I only needed this on single-player I could easily just use world.setBlock(), however I need this to notify the server of a right click.
-
[SOLVED] [1.8] Removing formatted words from text message
Anon10W1z replied to Anon10W1z's topic in Modder Support
Solved by using the literal "\u00A7" -
[SOLVED] [1.8] Removing formatted words from text message
Anon10W1z posted a topic in Modder Support
I have the following code: String checkMessage = Arrays.stream(event.message.getFormattedText().split(" ")).filter(word -> !word.startsWith("§") || word.startsWith("§f")).collect(Collectors.joining(" ")); System.out.println(checkMessage); This is intended to remove the words that start with '§' but not "§f". However, it turns out when I print checkMessage no words get filtered. §r§928 §r§r§c§lTITAN §r§eSimplyAnon§r §ftest§r Any reasoning behind this? -
[1.8 (Does it really matter?)] Checking for available updates
Anon10W1z replied to LordMastodon's topic in Modder Support
You can also integrate your mod with the Version Checker mod by Dynious. -
[SOLVED] How are vanilla stack sizes drawn on ItemStacks?
Anon10W1z replied to Anon10W1z's topic in Modder Support
Thanks, that did the trick!