Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/28/20 in all areas

  1. Have an example usage https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/item/ModItemTier.java Just be aware that the suppliers are absolutely required.
    2 points
  2. An instance of a class implementing IItemTier is also an instance of IItemTier. In terms of class hierarchy as OOP concept, class and interface are treated the same way. Phrases such as “instance of” and “superclass of” apply to both classes and interfaces.
    2 points
  3. Does it say 1.15.2, or 1.5.2? A lot of people have been confusing the 2 lately I notice. . . .read CAREFULLY. Post a screenshot too please
    1 point
  4. thank You guys. I figured out and create my material. Bascially what i did was created a new class for my new material and implemented IItemTier and then did like the vanilla code. here is my code ===> public enum ToolMaterial implements IItemTier{ RUBY(3, 1000, 5.0f, 9.0f, 10, () -> { return Ingredient.fromItems(ModItems.RUBY.get()); }); private final int A; private final int B; private final float C; private final float D; private final int E; private final LazyValue<Ingredient> f; private ToolMaterial(int i, int j, float f, float g, int k, Supplier<Ingredient> object) { this.A = i; this.B = j; this.C = f; this.D = g; this.E = k; this.f = new LazyValue<>(object); } @Override public int getMaxUses() { return this.B; } @Override public float getEfficiency() { return this.C; } @Override public float getAttackDamage() { return this.D; } @Override public int getHarvestLevel() { return this.A; } @Override public int getEnchantability() { return this.E; } @Override public Ingredient getRepairMaterial() { return this.f.getValue(); } }
    1 point
  5. Got it thanks. OP you can notify other mod's devs if there's other mods with this problem.
    1 point
  6. I think I followed a tutorial or was suggested to render hud on ElementType.EXPERIENCE. What is the correct way to do it?
    1 point
  7. Basically the item tier is what used to be tool material in older versions. You create a class that implents IItemTier and then you pass that class to your item. (In simple words you "just copy" the vanilla ItemTier class and replace the values.)
    1 point
  8. I don’t think there is any other ways. There might be ways such as replacing rendering class regarding the overlay, but not without breaking even more mods. However Mine and Slash shouldn’t make all overlays rendered during the rendering of the experience bar. It is a problem on their side. You can submit a PR or open an issue addressing this on their GitHub.
    1 point
  9. Note that if you are just looking to create one IItemTier implementation then there is no point in using an enum.
    1 point
  10. You need to create your own class (preferably enum, it’ll be easier) and let it implement IItemTier as an interface. You’ll need to override all the methods of IItemTier in your new class - look at what the vanilla one does, and just replicate its functionality. Then you can just use your MyModItemTier.SOME_MATERIAL in the constructor of your new tool Items.
    1 point
  11. Are my eyes deceiving me or are you missing a bracket somewhere? Moreover, why are you removing the potion effect instead setting the effective time to something smaller. Third, potion effects should be added on the server side.
    1 point
  12. Thanks man. I have some small things to work out with the texture but thank you so much, i at least got some form of model in the game!
    1 point
  13. Caused by: net.minecraft.util.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location: .DS_Store:sounds.json You will have to fix this. You're on a mac and macs like creating hidden files and folders everywhere and it screws with the Minecraft loading procedure. Search the forums.
    1 point
  14. I've overridden setPosition: /EDIT wrong solution: it doesn't really work at all... Now I have weird glitches were the entity is not where it belongs to and I can't really explain why EDIT: fixed it, works fine now EDIT2: I did not tell the truth... it does not work all the time... will inspect that EDIT3: finally... I found a solution to keep the boundingBox centered on your entity (at least x and z -axis). No more wishes I guess: @Override public void setPosition(double par1, double par2, double par3) { AxisAlignedBB b = this.boundingBox; double boxSX = b.maxX - b.minX; double boxSY = b.maxY - b.minY; double boxSZ = b.maxZ - b.minZ; this.boundingBox.setBounds(posX - boxSX/2D, posY, posZ - boxSZ/2D, posX + boxSX/2D, posY + boxSY, posZ + boxSZ/2D); }
    1 point
  15. This isn't the right place for your problem at all. First of all this is the subforum for mod developers and second 1.7.10 will definitely don't get any support here. You can try to get help over at the technic launcher forums however.
    0 points
×
×
  • Create New...

Important Information

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