• 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    TestFluidBlock extends BlockFluidClassic, so it will behave like a vanilla liquid and spread.


    I'm not too sure what would cause the fluid to render like that. Is your texture 16 pixels wide and a multiple of 16 pixels high?


    Post your latest code and the texture.

    Posted in: Modification Development
  • 0

    posted a message on Multiple ItemEntity Stacks Spawning onBlockDestroyed
    Quote from cj3636»

    How do I go about creating the RenderFactory class?


    If you're targeting Java 6/7, use an anonymous class. If you're targeting Java 8, use a lambda or constructor method reference.

    All an IRenderFactory does is create the Render instance using the provided RenderManager and return it.
    Posted in: Modification Development
  • 0

    posted a message on Multiple ItemEntity Stacks Spawning onBlockDestroyed
    Quote from cj3636»

    Thank you. And I plan on updating. However I don't know how to register Entities yet.


    Use EntityRegistry#registerModEntity to register your entity and RenderingRegistry#registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) from your client proxy to register its renderer. Do both of these in preInit.
    Posted in: Modification Development
  • 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    You're using the lava textures in the TestGas constructor, so it renders with the lava textures.

    Posted in: Modification Development
  • 0

    posted a message on Destroy blocks around original block when broken
    Quote from Metorrite»

    how exactly should i be posting it to the EVENT_BUS, could you give me an example?


    You shouldn't be. In my original post I was saying that you should only create an event if you're going to post it to an event bus (and you have a reason to do so).

    You're subscribing to the base BlockEvent class, which means your event handler will be called when any subclass of BlockEvent is fired. You should subscribe to BlockEvent.BreakEvent instead.
    Posted in: Modification Development
  • 1

    posted a message on Multiple ItemEntity Stacks Spawning onBlockDestroyed

    Only spawn entities on the server (when World#isRemote is false).


    Side note: I'd highly recommend updating to 1.9.4.

    Posted in: Modification Development
  • 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    This is caused by TestGas#getColor. Fluid#getColor must return an integer in the format 0xAARRGGBB (alpha, red, green, blue). TestGas#getColor returns 0x66FF00, which has 0 as its alpha value. This causes it to be rendered completely transparent.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] setInventorySlotContents not working
    Quote from WolfieWaffle»

    Could you explain the first part a bit more? It worked, but why?

    See this StackOverflow answer. ItemTorchBasic can only access protected members of Item on instances of ItemTorchBasic or its subclasses, not on any Item instance.

    Casting the ItemStack's Item to ItemTorchBasic before calling the protected method on it would work, but it makes more sense to call the method on this instead (since the ItemStack's Item should always be this).


    I switched part of it to use the hand, but what would I do for this method? Is there a way to have an offhand slot and get the slot from the hand?

    playerIn.inventory.setInventorySlotContents(slot, new ItemStack(torch1, count, oldFuel));



    Use the getter/setter methods I mentioned in my previous post. They will get/set the item in each hand's slot (using the currently selected hotbar slot as the main hand).
    Posted in: Modification Development
  • 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    If you've renamed the directory, post the new FML log.

    Posted in: Modification Development
  • 0

    posted a message on [Sloved]Can't find health boost (Coding)

    The field is called healthBoost, not HealthBoost.


    In future, tag your thread with the Minecraft version you're using so we know how to help you.


    I'd also recommend updating to 1.9.4, 1.7.10 is very old at this point.

    Posted in: Modification Development
  • 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    You didn't post your FML log, but I can see a problem already: Resource domains are always lowercase. Your assets must be in assets/forgedebugmodelfluid/..., not assets/ForgeDebugModelFluid/....


    Copying and pasting code is a bad idea. Try to understand what the example code is doing and write it yourself.

    Posted in: Modification Development
  • 0

    posted a message on What version to start modding on

    Shadowfacts has some 1.9.4 tutorials here. The official Forge documentation is also a useful reference for various topics.

    Posted in: Modification Development
  • 0

    posted a message on Destroy blocks around original block when broken
    Quote from Metorrite»

    what do you mean posting it to an event bus? isn't it already posted with the line "MinecraftForge.EVENT_BUS.register(new Treecapitator());" ?

    EventBus#post posts an event to the registered event handlers, EventBus#register registers an event handler.

    Please use Gist or Pastebin to post logs/crash reports (if applicable) and your new code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.

    It's much easier to read code with proper formatting and syntax highlighting.
    Posted in: Modification Development
  • 1

    posted a message on [SOLVED] setInventorySlotContents not working

    Your Item class should assume that any ItemStack it receives as an argument contains itself unless there's a reason not to. Don't call methods on the ItemStack's Item, call methods on this.


    Your lightTorch method is broken and doesn't properly support the off hand. Use EntityLivingBase#getHeldItem/setHeldItem to get/set the player's held items, InventoryPlayer#getCurrentItem only gives you the main hand.

    Posted in: Modification Development
  • 0

    posted a message on Creating fluids in eclipse with forge 1.8 help!

    Post your code and FML log (logs/fml-client-latest.log) using Gist or Pastebin. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.


    Screenshots are not a good way to share code.

    Posted in: Modification Development
  • To post a comment, please .