Jump to content

sequituri

Forge Modder
  • Posts

    669
  • Joined

  • Last visited

Posts posted by sequituri

  1. remove the word abstract from the class definition. (basic java here)

     

    change

    public abstract class lemonLeaf extends BlockLeavesBase implements IShearable
    

    to

    public class lemonLeaf extends BlockLeavesBase implements IShearable
    

    Then you must provide a method for every abstract method in the superclass and interfaces. The methods can even be empty or return null, 0, false, etc. They must be there to make the class concrete.

     

     

    The rest is up to how you want your leaves to work.

  2. If you are using Eclipse, then you should probably be seeing warnings about unused variables in your methods. Heed them! Or turn the warnings on in your options, since that can save you heartaches in these kinds of instances.

    You are creating local variables in your methodsZ: ItemStack <stackname> = new ItemStack(<blah blah>) just creates an itemstack and promptly lets it get garbage collected and disappear.

    The way to make these persist is to store them in a persistent place or return them from methods. You do neither. The player has an inventory and a held itemstack, you might want to use one of them to store the new 'ItemStack' or at least spawn it in world and delete the original.

  3. You're going to have to try and narrow down the problem. Is it just one world or do all worlds cause it? Is it only in Combined client or Dedicated Server and client? Is it only in survival or creative or SP or MP or both? Does it happen when you login as an anonymous player and your normal player? Can you force a crash and see anything unusual in the crashlog?

  4. Unless you are purposely snipping parts of your code, there are two problems.

    You have not created any event handlers for FML to initialize your mod. So, none of your main mod code is getting executed.

    Put

    @EventHandler
    public static void load(FMLPreinitializationEvent loadEvent) {
    //  put your block and item creation code in here
    }
    

    Do the same for FMLInitializationEvent with another method.

    The other thing is:

    for (int i =0; i < TOP.length;i++){
              topIcon = iIconRegister.registerIcon(HAT.MODID + ":Palm_Wood_Log" + "_Top");
              sideIcon = iIconRegister.registerIcon(HAT.MODID + ":Palm_Wood_Log" + "_Side");
           }
    

    needs to be:

    int i;
    for (i =0; i < TOP.length;i++){
          topIcon[i] = iIconRegister.registerIcon(HAT.MODID + ":Palm_Wood_Log_Top" + i);
          }
    for (i =0; i < SIDE.length;i++){
          sideIcon[i] = iIconRegister.registerIcon(HAT.MODID + ":Palm_Wood_Log_Side" + i);
          }
    

    If TOP.length == SIDE.length, you can merge the loops, like you had. You need to use the [ i ] notation.

  5. For a really realistic system, a block material would consist of a state of matter, or more realistically, a set of temperature points like freezing, melting, and plasma ignition. Then, the block instance could just have a field (but of course this would require more than a nibble of metadata) that included it's temperature (which determines its matter state). Water could freeze or even become steam...

    Naturally, this would be a major rework of MC, so it would never fly as a suggestion.

    If we include gases, then we should justify including plasmas too.?

  6. Class names should always start with in initial Capital letter (including the constructors). Nothing else that is a symbol should, except manifest constants (ALL CAPS). Otherwise, you get completely hard to debug code that has errors as you can see, with no idea why.

     

    Hint:

     

     

    Your import statement does not import any classes.

     

    2nd hint:

     

     

    import hat.blocks.palmblocks.palmlog;

     

    ^ This could be a file named "palmblocks" containing a class "palmlog" or it may be a file "palmlog" which imports nothing! There is no class name, but you cannot tell because your class names are lowercased!

     

     

     

     

  7. From the looks of the error log and your packet class, it seems that netty is trying to create your server side packet when it encounters a CNF error searching through your constructors. One of your constructors requires a GuiAssemblySorter instance... that is where the error comes in, as this class does not exist server side as far as I can tell.

    Why not try and put a @SideOnly(Side.CLIENT) annotation on that specific constructor. It may fix it because then it would not find that constructor on the server side (which it correctly should not).

  8. Why you ignore the argument that is the mob and use a hardcoded entity instance?

    public Packet02(int id, EntityMob mob) {
    	animID = (byte) id;
    	entityID = tigrex.getEntityId();
    }

    In other words, "tigrex" is not an argument to the Packet02 constructor, so where's it from? What's wrong with the argument "mob"?

  9. That's a typical example of z-fighting. If you have two textures that render in the same exact plane, the graphics engine renders them as fighting for dominance and can cause weird effects. If I were doing this, I'd render them in parallel planes but with a small distance between them.

  10. Once when I was a noob to modding and I hadn't yet read any tutorials, I wondered what the base class for a mod should be, too. However, I never in my wildest dreams imagined it would extend EntityCow! That is pretty novel.

×
×
  • Create New...

Important Information

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