Jump to content

Jonas Handtke

Members
  • Posts

    34
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jonas Handtke's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I want to ask if the AI Tasks you create for a Custom Entity the priority is important? For example if you want to make a Entity constantly attack the player the priority is the key, right?
  2. I tried to use the Entity.setPose Method in a Keybind to force sitting the Player but it didn't work at all. Do I use it wrong? Do I need to do more than using the setPose() Method?
  3. I mean is it possible to do that? Like an Event so you can write what happens when a Player/Entity is hearing a Sound.
  4. Hello Everyone, I need some help with a Method where I want to throw Exceptions on certain Conditions. If you use the Method and if any of those Conditions to throw a Exception is true, then it should give us an Exception but I don't know how to implement this right. This is the Code: public static SoulType register(String id, String displayName, SoulTypeRarities rarity, double corruption, double strength) { double minCorruption = 0; double maxCorruption = 2; double minStrength = 0; double maxStrength = 5; if (SOUL_TYPES.containsKey(id)) { throw new IllegalArgumentException("SoulType with id '" + id + "' already exists."); } if (corruption < minCorruption || corruption > maxCorruption) { throw new IllegalArgumentException("Corruption must be between " + minCorruption + " and " + maxCorruption + " ."); } if (strength < minStrength || strength > maxStrength) { throw new IllegalArgumentException("Strength must be between " + minStrength + " and " + maxStrength + " ."); } SoulType newType = new SoulType(id, displayName, rarity, corruption, strength); SOUL_TYPES.put(id, newType); return newType; }
  5. I want to create a Enchantment that adds an Overlay with an Shader that acts like Echolocation Effect. Where should I start? Are this type of Shader hard to code??
  6. I want to create a completely new Entity Class (exactly like the Vanilla Entity Class) but has more Properties and Fields for my Mod. For Example I want to add a new Property to add Types (Elemental, Dark, Physical, Magical etc.) this will add automatically Weakness and Strengths to the Entity. Or should I add these "Types" when an Entity is spawned?
  7. For Example I have an Main Mod that adds new Content to Minecraft. But I'm using custom Classes etc. and I want it so that is an api integrated in the Main Mod but can be download seperately like an Module. Is this possible? If you need more Information just comment what you need to know ^^
  8. EDIT: I found the Solution how to fix it by myself. I'm trying to make a Event that is fired if a Player is swimming. Here is the Event Class: public class PlayerSwimEvent extends PlayerEvent { public PlayerSwimEvent(Player player) { super(player); } } Here is the Hooks (similar to ForgeHooks Class) that has Methods for the Events: public class EventHooks { public static void onPlayerSwim(Player player) { MinecraftForge.EVENT_BUS.post(new PlayerSwimEvent(player)); } } And here is the Mixin Class: @Mixin(value = Player.class) public class MixinPlayerSwimEvent { @Inject(method = "isSwimming", at = @At("HEAD")) public boolean isSwimming(CallbackInfoReturnable<Boolean> cir) { Player player = null; if (!player.getAbilities().flying && !player.isSpectator()) { EventHooks.onPlayerSwim(player); } return cir.getReturnValue(); } } My Issue is now that I don't get it to work because of the missing Parameter Player. Can someone help with this?
  9. I think I found a found a solution but I need to check myself if this code I want to try works.
  10. I want to extend the Attribute Class with a new Method that if you have a specific Value of that Attribute you use this Method you get a permanent Potion Effect. For example if you have a Attribute that has the min Value 0 and the Max Value 1 and want that you get the specified Potion Effect if the Value of that Attribute is 1. I never made something like extending a certain Class with new Functionality and need some Instructions to get into. Maybe you know a good Tutorial about it.
  11. I want to make a Mod similar to the Tinkers Construct Crafting System where you can use different Materials to create a Tool. But mainly I want to recreate the Texture Overlay Feature. Sadly I don't know the Method how to create something like that. Can someone tell me the rough Step how can I make something like the Tinkers Construct Crafting System?
  12. Just a Question I'm currently thinking. I plan to add a new Operation to the existing Operation List, is this event possible??
  13. Also does someone know which java file is calling for example the Event LivingAttackEvent?
  14. That was just an example and a test to see how it works.
×
×
  • Create New...

Important Information

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