• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I feel it is more like a java related problem... anyways, here's my code: public abstract class GunModel implements IBakedModel { protected IBakedModel origin; public GunModel(IBakedModel origin) { this.origin = origin; } public abstract static class Overrides extends ItemOverrideList { public Overrides() { super(); } @Nullable @Override public IBakedModel getModelWithOverrides(IBakedModel origin, ItemStack stack, @Nullable World world, @Nullable LivingEntity entity) { if (!(stack.getItem() instanceof AVAItemGun)) return origin; CompoundNBT compound = ((AVAItemGun) stack.getItem()).initTags(stack); return getModel(origin, compound.getInt("fire"), compound.getInt("reload"), compound.getInt("run")); } protected abstract IBakedModel getModel(IBakedModel origin, int fire, int reload, int run); } }   public class P226Model extends GunModel { protected P226Overrides overrides; public P226Model(IBakedModel origin) { super(origin); overrides = new P226Overrides(); } @Override public ItemOverrideList getOverrides() { return overrides; } public static class P226Overrides extends Overrides { public P226Overrides() { super(); } @Override protected IBakedModel getModel(IBakedModel origin, int fire, int reload, int run) { return new ModifiedP226Model(origin, fire, reload, run); } } }   public class ModifiedGunModel implements IBakedModel { protected int fire; protected int reload; protected int run; protected IBakedModel origin; public ModifiedGunModel(IBakedModel origin, int fire, int reload, int run) { this.origin = origin; this.fire = fire; this.reload = reload; this.run = run; } @Override public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand) { System.out.println("parent"); return origin.getQuads(state, side, rand); } @Override public ItemOverrideList getOverrides() { return null; } }   public class ModifiedP226Model extends ModifiedGunModel { public ModifiedP226Model(IBakedModel origin, int fire, int reload, int run) { super(origin, fire, reload, run); } @Override public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand) { System.out.println("inherited"); return origin.getQuads(state, side, rand); } }   So what I'm struggling with is in @Override protected IBakedModel getModel(IBakedModel origin, int fire, int reload, int run) { return new ModifiedP226Model(origin, fire, reload, run); } if I return a "ModifiedGunModel", it's getQuads() gets called. However if I return "ModifiedP226Model" which inherits from the "ModifiedGunModel", neither getQuads() gets called. Did I missed something or is this just not how it works?
    • I recently noticed that files.minecraftforge.net are uses http and some concerned about this: downloading files via http is not safe, because content can be replaced in the middle of the path from the server to the client Now I noticed that site are uses https and all fine: https://files.minecraftforge.net/ But first link in google search with http! Maybe you do not tune webserver correctly?   Also in a EAQ uses http links:   Plz, fix it. Thx
    • Alright, thanks for the info!
  • Topics

  • Who's Online (See full list)