Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

cookiedragon234

Members
  • Content Count

    38
  • Joined

  • Last visited

  • Days Won

    1

cookiedragon234 last won the day on January 19 2020

cookiedragon234 had the most liked content!

Community Reputation

6 Neutral

About cookiedragon234

  • Rank
    Tree Puncher

Recent Profile Visitors

906 profile views
  1. Im not sure whether that would produce s spectrum allowing a significant amount of colour choices. Also in order to save the users chosen colour, I need to take the colour where they click. With a buffered image I can just do getRgb at the position they clicked, but with your method Im not sure how I would do that.
  2. Hi I am trying to create a colour picker gui element, which displays the HSV colour space, with the x and y axis representing Saturation and Value, and a separate slider for hue and alpha. Something like this is the goal: This is my code so far: final Minecraft mc = Minecraft.getMinecraft(); final BufferedImage bufferedImage = new BufferedImage(100,100, TYPE_INT_ARGB); final DynamicTexture dynamicTexture = new DynamicTexture(bufferedImage); ResourceLocation dynamicResource; private int hue = 1; private float alpha = 1; @Override public v
  3. @ATomo9_CY yes, it will override the user's input. Im not 100% sure about mouse input, but you can use stuff like mc.player.swingArm() for that
  4. @ricepuffz its an external dependency which you need to add. See https://github.com/SpongePowered/MixinGradle . Also as @DavidM said, coremodding is not recommended and since you don't know what it is, it's probably best you dont try to do it.
  5. Uh I dont completely get what that code is doing, but it didn't work anyway. I am experimenting with achieving this using GlScaled but running into some small problems. If anyone else has managed to do this with glscaled I would appreciate an example. I will post my code if I finish it and get it working.
  6. @DavidM the width of a string will change based on its height, they are proportional
  7. That is the correct way to do it This is my code @Mixin(value = AbstractClientPlayer.class) public abstract class MixinAbstractClientPlayer extends MixinEntityPlayer { @Shadow @Nullable protected abstract NetworkPlayerInfo getPlayerInfo(); @Inject(method = "hasSkin", at = @At("RETURN"), cancellable = true) public void hasSkin(CallbackInfoReturnable<Boolean> cir) { PlayerSkin.HasSkin event = new PlayerSkin.HasSkin(getPlayerInfo(), cir.getReturnValue()); MinecraftForge.EVENT_BUS.post(event); cir.setReturnValue(event.result); } @Inject(method = "get
  8. KeyBinding.setKeyBindState(mc.gameSettings.keyBind[whatever].getKeyCode(), true);
  9. I wrote the following code to resize a string until it fits within the specified width: public int drawStringClamped(String text, float x, float y, float width, int color) { int original = fontRenderer.FONT_HEIGHT; while (getStringWidth(text) > width && fontRenderer.FONT_HEIGHT > 0) { fontRenderer.FONT_HEIGHT--; } int out = drawString(text, x, y, color); fontRenderer.FONT_HEIGHT = original; return out; } This however does not work as the `getStringWidth` function does not take into account the string height! Is there an alternative way to do
  10. Does anyone know of a function to convert coordinates in 3d space into 2d space? An example usage for this would be drawing text on the users screen over a 3d position, obviously the location of the text logically is in 3d space, however for it to be rendered it must be rendered in 2d. An example of this already happening in the vanilla game is name tags, however I tried to use the EntityRenderer.drawNameplate function and this did nothing, the text simply did not show up. I tried running the function on world render as well as on ui render. If anyone knows of a function that can a
  11. It seems to fire for mobs but not players after more testing. I managed to solve this by using the AttackEntityEvent along with some other hacky mechanics.
  12. Could you provide some examples? I'm simply using mixins because I know it works and I've seen many examples of people using them to successfully create packet events: https://github.com/Hexeption/Nitro-Client/blob/master/src/main/java/uk/co/hexeption/client/mixin/mixins/MixinNetworkManager.java, https://github.com/cabaletta/baritone/blob/master/src/launch/java/baritone/launch/mixins/MixinNetworkManager.java, https://git.liquidbounce.net/CCBlueX/LiquidBase/blob/4b53d25e2893dbc5521d9a831a652b792f7803ea/src/main/java/net/ccbluex/liquidbase/injection/mixins/MixinNetworkManager.java, h
  13. Yes, and the mixin I just described is mixing into the netty networkmanager. I know its netty because when printing from the network manager it tells me that it is in the "netty" thread. I did dig into the code, and I found the class from which packets are sent and recieved, so I made a mixin to intercept the function calls.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.