Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Jeldrik

Jeldrik

Members
 View Profile  See their activity
  • Content Count

    12
  • Joined

    February 24
  • Last visited

    11 hours ago

Community Reputation

0 Neutral

About Jeldrik

  • Rank
    Tree Puncher
  1. Jeldrik

    Change render for specific entity Instance

    Jeldrik posted a topic in Modder Support

    for example: I hit a Creeper and this Creeper changes its render Method and becomes red. All the other ones stay the same. Edit: alternatively, maybe it works to give the entity instance to the render method to check the status of the entity.
    • Yesterday at 01:59 AM
  2. Jeldrik

    Goal Priority not as intended

    Jeldrik replied to Jeldrik's topic in Modder Support

    Ok solved it. Had to add the execute function call to the tick method (maybe inefficient?) @Override public void tick() { if(shouldExecute()) { startExecuting(); } super.tick(); }
    • Tuesday at 03:13 PM
    • 1 reply
  3. Jeldrik

    Minecraft doesn't open, but task manager says it is

    Jeldrik replied to Moon2288's topic in Support & Bug Reports

    LEGACY JDK DETECTED, SECURED JAR HANDLING DISABLED Sounds like you have to update your JDK
    • Tuesday at 02:58 PM
    • 1 reply
  4. Jeldrik

    Goal Priority not as intended

    Jeldrik posted a topic in Modder Support

    Hey i deleted and readded the HurtByTargetGoal to give it a lower priority and have it later in the List creeperEntity.targetSelector.addGoal(1, new DanceGoal(creeperEntity)); creeperEntity.targetSelector.addGoal(2, new HurtByTargetGoal(creeperEntity)); but HurtByTargetGoal gets still prioritized over my DanceGoal Entire EventHandler Method: https://pastebin.com/ECg4WPC8
    • Tuesday at 02:50 PM
    • 1 reply
  5. Jeldrik

    Starting GUI on key Input

    Jeldrik replied to Jeldrik's topic in Modder Support

    Ohhh so simple All works now, thanks a lot! But how do I know that this is the case? cant find any documentation for that. Edit: ah found it!
    • February 24
    • 10 replies
  6. Jeldrik

    Starting GUI on key Input

    Jeldrik replied to Jeldrik's topic in Modder Support

    1. @EventBusSubscriber(modid = DnD.MOD_ID, bus = Bus.MOD, value = Dist.CLIENT) public class ModClientEvents { public final static KeyBinding openDiceScreen = new KeyBinding("key.open_dice_screen", 75, "key.categories.miscellaneous"); @SubscribeEvent public static void keyBindings(FMLClientSetupEvent event) { ClientRegistry.registerKeyBinding(openDiceScreen); } } 2. @EventBusSubscriber(modid = DnD.MOD_ID, bus = Bus.FORGE, value = Dist.CLIENT) public class ClientEvents { //here is my ClientTickEvent }
    • February 24
    • 10 replies
  7. Jeldrik

    Starting GUI on key Input

    Jeldrik replied to Jeldrik's topic in Modder Support

    • February 24
    • 10 replies
  8. Jeldrik

    Starting GUI on key Input

    Jeldrik replied to Jeldrik's topic in Modder Support

    Found an old thread about this topic and tried to apply the Code as you said. Good to know that the KeyPressedEvent only works on GUIs The GUI Class works, i tried opening it in another way. But I still can't get this to run: private static Field KEYBIND_ARRAY = null; @SubscribeEvent(priority = EventPriority.LOWEST) public void onClientTick(final ClientTickEvent event) throws Exception { if (KEYBIND_ARRAY == null) { KEYBIND_ARRAY = KeyBinding.class.getDeclaredField("KEYBIND_ARRAY"); KEYBIND_ARRAY.setAccessible(true); } if (event.phase.equals(Phase.END)) { @SuppressWarnings("unchecked") Map<String, KeyBinding> binds = (Map<String, KeyBinding>) KEYBIND_ARRAY.get(null); for (String bind : binds.keySet()) { if (binds.get(bind).isKeyDown()) { if (binds.get(bind).getKey() .getKeyCode() == (ModClientEvents.openDiceScreen.getKey().getKeyCode())) { Minecraft.getInstance().displayGuiScreen(new DiceScreen()); } break; } } } } In ModClientEvents I Registered a KeyBind. It shows up in the Controls Settings.
    • February 24
    • 10 replies
  9. Jeldrik started following Starting GUI on key Input February 24
  10. Jeldrik

    Starting GUI on key Input

    Jeldrik posted a topic in Modder Support

    Hey, i am new to minecraft modding and to this forum and have to get used to a lot of things. I was trying to make a custom GUI that is opened when I press a key. In my ClientEvents file I want to read the Key input and start the GUI @SubscribeEvent public void onKeyInput(final KeyboardKeyPressedEvent event) { if(event.getKeyCode() == 75) { Minecraft.getInstance().displayGuiScreen(new DiceScreen()); } But when i press "k", (supposed to be the Key with number 75) nothing happens. This is my Screen class if needed: @OnlyIn(Dist.CLIENT) public class DiceScreen extends Screen { private static final ResourceLocation BACKGROUND_TEXTURE = new ResourceLocation(DnD.MOD_ID, "textures/gui/DiceScreen"); public DiceScreen() { super(new TranslationTextComponent("jeldriks_dnd_mod.dice_screen")); this.height = 81; this.width = 175; } @Override public void render(MatrixStack matrixStack, int mouseX, int mouseY, final float partialTicks) { this.renderBackground(matrixStack); super.render(matrixStack, mouseX, mouseY, partialTicks); this.renderComponentHoverEffect(matrixStack, null, mouseX, mouseY); } @Override public void renderBackground(MatrixStack matrixStack) { super.renderBackground(matrixStack); this.font.drawString(matrixStack, "Choose your dice to roll!", 8.0f, 6.0f, 4210752); // posx posy color RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f); this.minecraft.getTextureManager().bindTexture(BACKGROUND_TEXTURE); int x = (this.width) / 2; int y = (this.height) / 2; this.blit(matrixStack, x, y, 0, 0, this.width, this.height); } }
    • February 24
    • 10 replies
  • All Activity
  • Home
  • Jeldrik
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community