Jump to content

Budschie

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by Budschie

  1. For the teleport code, just look into the /forge setdimension command. That should help.
  2. Why don't you try to port it to 1.15 or 1.14?
  3. Are you sure you need a 1.12.2 mod? There is no disadvantage when you use 1.15.
  4. The more you work on a mod, the harder it will get to "upgrade" your code to a new version, until you reach a point where you should rewrite it entirely.
  5. I'd really recommend you using newer versions, because: They recieve bug fixes. The mods are loading faster due to multi-threading. You can ask for help on this forum.
  6. I'm sure this is an outdated version. Why aren't you modding in newer versions like 1.15?
  7. But how can I generate an item mesh from a dynamic texture? Is there any way to do it with vanilla code, or do I have to do it with my own code?
  8. The advantage of my code compared to the structure block is that it has no theoratical block cap.
  9. I think I have done something like that. You can look into my github: https://github.com/Budschie/Deepnether-Mod/tree/master/src/main/java/de/budschie/deepnether/structures
  10. If you want your vampire bats to fly through walls, you can also look at the vex entity and its pathfinding: https://minecraft.gamepedia.com/Vex
  11. You have to use ICraftingRecipe. The crafting table container loads a crafting recipe with this line: Optional<ICraftingRecipe> optional = p_217066_1_.getServer().getRecipeManager().getRecipe(IRecipeType.CRAFTING, p_217066_3_, p_217066_1_); I recently wanted to add a custom crafting type to a crafting table too, and it crashed because of a class cast exception, until I implemented ICraftingRecipe.
  12. Is there any way to create an 3-dimensional model from a dynamic texture?
  13. I now fixed the issue that I mentioned above as well, but now I have another problem: The item doesn't look like a standard minecraft item (it's just a plane with a texture), and doesn't seem to be translated the right way when you hold it in your hands.
  14. Ok, I now fixed the issue I mentioned in the post above, but now I have the problem that the whole texture atlas is used as a texture for my item...
  15. @TheGreyGhost Thanks. It works now. But I have a new problem: I am doing something wrong while loading the images of the tool parts: I'm currently using DynamicTexture tex = new DynamicTexture(NativeImage.read(this.getClass().getResourceAsStream("assets/deepnether/textures/item/toolparts/" + stick.getImage(Part.STICK, toolType) + ".png"))); to load a texture, but the stream seems to be "null".
  16. @TBroski You should use the nbt that is provided to you: @Override public void readNBT(Capability<IPlayerHandler> capability, IPlayerHandler instance, Direction side, INBT nbt) { INBT tag = new CompoundNBT(); instance.setjoinWorld(((CompoundNBT) tag).getBoolean("joined")); instance.setChakra(((CompoundNBT) tag).getFloat("chakra")); instance.setmaxChakra(((CompoundNBT) tag).getFloat("maxchakra")); instance.setregenChakra(((CompoundNBT) tag).getFloat("regenchakra")); instance.setcolorChakra(((CompoundNBT) tag).getInt("colorchakra")); instance.setTaijutsu(((CompoundNBT) tag).getInt("taijutsu")); instance.setplayerEyeSlot(((CompoundNBT) tag).getInt("playereyeslot")); instance.setBeNMPoints(((CompoundNBT) tag).getInt("benmpoints")); instance.setPlayerEntityAffiliation(((CompoundNBT) tag).getString("playeraffiliation")); //Keybinds for Jutsu instance.setKeybind1(((CompoundNBT) tag).getString("key1")); instance.setKeybind2(((CompoundNBT) tag).getString("key2")); instance.setKeybind3(((CompoundNBT) tag).getString("key3")); instance.setKeybind4(((CompoundNBT) tag).getString("key4")); instance.setKeybind5(((CompoundNBT) tag).getString("key5")); instance.setKeybind6(((CompoundNBT) tag).getString("key6")); instance.setKeybind7(((CompoundNBT) tag).getString("key7")); instance.setKeybind8(((CompoundNBT) tag).getString("key8")); instance.setKeybind9(((CompoundNBT) tag).getString("key9")); //Jutsu instance.setCloneJutsuBoolean(((CompoundNBT) tag).getBoolean("clone")); instance.setSummoningBoolean(((CompoundNBT) tag).getBoolean("summoning")); instance.setInvisibilityBoolean(((CompoundNBT) tag).getBoolean("invisibility")); instance.setBodyReplacementBoolean(((CompoundNBT) tag).getBoolean("replacement")); //Fire instance.setFireballJutsuBoolean(((CompoundNBT) tag).getBoolean("fireball")); //Water instance.setWaterShurikenJutsuBoolean(((CompoundNBT) tag).getBoolean("watershuriken")); //Lightning instance.setLightningBallJutsuBoolean(((CompoundNBT) tag).getBoolean("lightningball")); //Earth instance.setFlyingStonesJutsuBoolean(((CompoundNBT) tag).getBoolean("flyingstones")); //Wind instance.setGalePalmJutsuBoolean(((CompoundNBT) tag).getBoolean("galepalm")); } You are creating a new CompoundNBT instead of using the nbt that is provided to you.
  17. Look at my github, you will find an example of ore generation there: https://github.com/Budschie/Deepnether-Mod/blob/master/src/main/java/de/budschie/deepnether/biomes/BiomeFeatureAdder.java If you want your ore to replace stone, use the vanilla FillerBlockType. I'd recommend you using something like a BiomeFeatureAdder or something like that, because by doing that you can be sure your custom features are registered. Hope this helped.
  18. I'm now attaching my custom item renderer to the item like this: new CommonTool(new Item.Properties().setISTER(() -> new Callable<ItemStackTileEntityRenderer>() { DynamicCommonToolRendering r = null; @Override public ItemStackTileEntityRenderer call() throws Exception { if(r == null) r = new DynamicCommonToolRendering(); return r; } })); But it won't run the render method which is defined in DynamicCommonToolRendering(). What have I done wrong?
  19. @TheGreyGhost Thanks for replying, but I can't find a static or non-static method in Item.java called "setISTER".
  20. The map uses a custom render class. How can I attach a custom render class to an item?
  21. Hello. I've now implemented a custom tool crafting system (similar to Tinker's construct) with Modifiers etc. Now I have to generate a texture out of the materials the tool is made of. How can I do that? Thanks for any help.
  22. @diesieben07 Thanks. How do I do that?
  23. By that I mean that I don't wan't my mod to completly override the vanilla IRecipe behaviour, which could lead to some compability issues.
  24. @diesieben07 Thanks. Can I add an IRecipe to a crafting table without overriding something?
×
×
  • Create New...

Important Information

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