Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by DavidM

  1. 9 minutes ago, KdotDevelopment said:

    What i did was find the little part that said "holdingBarrier &&" and removed it. I made an abstract option within video settings to toggle it on and off.

    You can still do this with the method I described above. Add an if statement before the rendering to check for this option would work.

     

    9 minutes ago, KdotDevelopment said:

    As a bonus for myself, i created a creative tab just for the items you can only get with commands (like barriers and command blocks).

    In Forge, you can create a new ItemGroup and add in the items by overriding ItemGroup#fill.

     

    9 minutes ago, KdotDevelopment said:

    Also, i didnt make this clear but I need it to work on multiplayer.

    Overriding the registry on a specific side is fine as long as the entries still matches up with the server/client. I.e. the server and client can have completely different blocks under the entry "dirt block", but there will be no problem with the game; it would render as the block on the client, while certain server-side functions are handled by the server-side block under the same entry.

     

    Note that overriding registry entries might cause incompatibilities (when 2 mods try to modify the same entry, only one mod will succeed). However it is still better in terms of compatibility than using a core mod as the former still respects the Forge system.

  2. 15 minutes ago, KdotDevelopment said:

    Well, i already made the whole mod from just vanilla code, i was just wondering if I could port it over to forge so I can actually make it run.

    Depends. If all you did is created a rendering method that would integrate well into Forge's event driven system, then yes.

     

    15 minutes ago, KdotDevelopment said:

    And if you wouldnt mind, could you explain how I could do this without modifying the vanilla code?

    In vanilla Minecraft, barriers are rendered as particles, and handled inside ClientWorld. This might sound impossible, however you could replace the barrier block itself by overriding the registry and its entry in the Blocks class. After that, you have control over the full block. Simply use a TESR or subscribe to RenderWorldLastEvent and render the barrier sprite or emit the vanilla barrier particle in the block.

     

    If you feel like replacing the block entry may cause incompatibilities, you can also subscribe to RenderWorldLastEvent and render the barrier sprite at the vanilla barrier blocks (or use vanilla particles); however, this method would require you to set up a system to record all the barrier blocks in the world.

  3. 2 hours ago, KdotDevelopment said:

    Anyway, before you respond that editing vanilla code is dead, i need you to realize that this is the only way to do it.

    Modifying vanilla isn't supported on these forums.

     

    In your case, modifying vanilla code isn't even necessary (People always say "my case definitely need a core mod", but it is in fact not needed in 99% of their case. You just have to be creative with the system ;)).

    Simply replace the barrier renderer with your own implementation.

  4. 11 hours ago, +=WhatSteve - Forge said:

    OF provides capes

    Optifine do not provide "Minecraft capes".

    All they do is add a render layer to the donators that can only be seen if others have Optifine installed. It has nothing to do with Mojang's cape.

    Optifine's adding custom cape is considered a dick move in the community, as Mojang stated that modders should not mess with capes.

  5. 5 hours ago, Weirdo said:

    ok, and how is that helping me?

    Don't mean to be rude

    Because at this point there is so many things that can go wrong, and it would take ages for other people to guess one by one.

    By seeing your code we can stop guessing in the dark and instead figure out what is wrong immediately.

     

    An analogy that is popular on this forum: just like in real life doctors have to examine your body to figure out what is wrong; they can’t magically know what is wrong if all information they have is “doctor it hurts”.

    • Like 1
  6. if (event.side == LogicalSide.SERVER && DaBoisMod.getCapabilityOf(event.player, FallingFromSkyProvider.FALLING_FROM_SKY_CAPABILITY).isFallingFromSky()) {
    	if (!event.player.onGround) event.player.fallDistance = 0F;
    	else DBMPacketHandler.sendToServer(new SSyncFallingFromSkyPacket(false));
    }

    Assuming that the method names are correct, you are already on the server side in this if statement; however, you are still sending a packet to the server.

    Also I think there is an entity land event or something, and it might be better to use that for your case.

     

  7. 39 minutes ago, +=WhatSteve - Forge said:

    Would Forge also have native support for OF (OptiFine)?

    OptiFine would have to add Forge support if they want it to work with Forge.

     

    40 minutes ago, +=WhatSteve - Forge said:

    I'm wondering if this is just another Badlion

    Forge has nothing to do with launcher. It is modifications to the game to provide cross-mod compatibility.

×
×
  • Create New...

Important Information

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