• 0

    posted a message on [Solved] Looking for way to handle onUpdate in entities other than EntityLivingBase

    --EDIT Never mind, I think I found a good one--

    Is there any source you would recommend for learning how to do ASM with breaking everything?

    Posted in: Modification Development
  • 0

    posted a message on [Solved] Looking for way to handle onUpdate in entities other than EntityLivingBase

    I don't think that would work for my purposes, because I need the ability to cancel the entity update (I'm making something to speed up/slow down entities in an area). When using the ServerTickEvent, I don't have that power as far as I can tell.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] Looking for way to handle onUpdate in entities other than EntityLivingBase

    I need to run code each tick for every entity, including entities that don't extend EntityLivingBase (arrows for example). I do not need this handler to work on particles, but it is fine if it does. Looking through the forge code, the only relevant Event is LivingUpdateEvent, which only works on EntityLivingBase. Is there a way to do what I want without ASM? If not, could someone point me in the correct direction for learning how to do the necessary ASM? Thanks in advance.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] Why isn't this rendering anything?

    Yes. As I said, all of the code is being run as expected, but without actually rendering anything.

    Posted in: Modification Development
  • 0

    posted a message on [Solved] Why isn't this rendering anything?

    I'm working on goggles that, when worn, renders a grid of quads in the chunk the player is in. Code here: http://pastebin.com/1fGcvUMv

    The problem is that it refuses to render anything. All the if statements pass, nothing crashes, the code is being run, and the array does have valid data in it. But, like I said, no matter what I try it won't render anything at all. Am I missing some OpenGl flag or something? Thanks in advance.


    Edit: After (much) further experimentation, it seems that the problem is that while this event is being called, the current OpenGL settings are for 2d overlays (which explains the name of the event) and the z-coordinate is almost meaningless (for countering z-fighting). Since all the stuff I was trying to render was flat on the y-coordinate... nothing was showing up. However, this still isn't resolved. I need to know how to use the event (or a different one) for rendering in 3 dimensions, similarly to how OpenGL is setup when doing a TESR.


    Edit 2: SOLVED: Using a different event (RenderWorldLastEvent) allows for 3 dimensional rendering.

    Posted in: Modification Development
  • 0

    posted a message on Afraid of the Dark 1.2 [Updated 6/15/19]

    It's a little hard to read the crash log due to the forums changing the format to fit, but I think you should try uninstalling WAILA. It looks like it's trying to get which half of the plant a fern is from an air block (if that makes no sense, then you understand why that would crash). I might be wrong though.

    Posted in: Minecraft Mods
  • 0

    posted a message on TESR getting darker and lighter as it rotates

    Thanks, that seems to have fixed it.

    Posted in: Modification Development
  • 0

    posted a message on TESR getting darker and lighter as it rotates

    I've got a TESR which rotates over time. At is rotates, it gets darker and lighter depending on the angle (this is the problem, not what I'm aiming for). It's made in the tessellator, and I'm not sure what's causing it.


    color = gearHolder.getMembers()[side.getIndex()].getColor();
    				GlStateManager.pushMatrix();
    				GlStateManager.pushAttrib();
    				GlStateManager.disableLighting();
    				GlStateManager.translate(x + .5D, y + .5D, z + .5D);
    				GlStateManager.rotate(side == EnumFacing.DOWN ? 0 : side == EnumFacing.UP ? 180F : side == EnumFacing.NORTH || side == EnumFacing.EAST ? 90F : -90F, side.getAxis() == EnumFacing.Axis.Z ? 1 : 0, 0, side.getAxis() == EnumFacing.Axis.Z ? 0 : 1);
    				GlStateManager.rotate(-(float) gearHolder.getCapability(Capabilities.AXLE_HANDLER_CAPABILITY, side).getAngle(), 0F, 1F, 0F);
    				modelOct.render(res, color);
    				GlStateManager.popAttrib();
    				GlStateManager.popMatrix();


    This only includes the code for the settings, all the tessellator stuff is in the modelOct#render method, but it was too long to include.

    Posted in: Modification Development
  • 0

    posted a message on Help with TESR rotation points

    When you set the rotation point (block style), are you setting it relative to the lowest vertex or from the center of the box?

    Posted in: Modification Development
  • 0

    posted a message on Help with TESR rotation points

    There is one aspect of creating TESRs which I'm finding great difficulty with, which is assigning rotation points to models. Considering models can be translated/rotated with the GlStateManager, created with different bounds/offsets in the model, or have rotation points set in the model, there are a lot of variables to play with. Somehow, I always end up having things either have the wrong rotation point, or have the entire model be offset over 1/2 a block for no apparent reason. I fix these issues through trial and error, but I would prefer to understand how to set the correct rotation point in the first place. I'm trying to create block models centered on the blockspace that rotate around an axis centered on the blockspace, and still works properly when the whole things is rotated to work on different sides of the block. Can anyone provide me with a guide that fully explains how to align everything to get the desired effect? I'm looking for the general rules, not just specifically for what I currently want to do.

    Posted in: Modification Development
  • 0

    posted a message on How to make a block render even while offscreen?

    Thank you, that seems to have worked. It also seems that overriding TileEntity#getMaxRenderDistanceSquared [/i]isn't necessary in this case.

    Posted in: Modification Development
  • 0

    posted a message on How to make a block render even while offscreen?

    I should have mentioned that I already tried those two things with no success. The length of the beam my TESR has is never longer than the default renderDistanceSquared value (the TESR is capped at 16 blocks, the method returns 64^2 by default) and override isGlobalRenderer didn't seem to have any noticeable effect other than causing beacon beams to become a solid color when my block is being rendered (this effect doesn't happen when it returns false and my block is being rendered).

    Posted in: Modification Development
  • 0

    posted a message on How to make a block render even while offscreen?

    I have a block that renders with a TESR. The problem is that part of the render is very large (shaped like a sideways beacon beam that ends after a certain distance), and I want that part of the TESR to still render when the block itself is offscreen. Which method do I have to override to make this possible?

    Posted in: Modification Development
  • 0

    posted a message on [FIXED] Weird rendering glitch (Baked Model)

    I should note that this issue has still not been solved as no-one on the Forge modder support forum has replied with a solution yet (it's been several weeks), so I am still looking for help/advice.

    Posted in: Modification Development
  • 0

    posted a message on Trying to find a good resource pack that only changes planks

    As the title says, I'm looking for a non-HD resource pack that only changes planks (and the associated stairs + slabs) to be less... ugly, but still fits with the vanilla art style. I'm also fine with taking a larger resource pack that matches this criteria and removing everything from it that aren't planks. I don't normally use a resource pack, so I don't know which ones have what I am looking for yet.

    Posted in: Resource Pack Discussion
  • To post a comment, please or register a new account.