Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by DavidM

  1. Custom clients are not supported on this forum, and are not encouraged in general (yes, clients such as BLC and Lunar are looked down upon in the modding community due to violation of Mojang's wishes and account security threats).

    If you want to modify the game, use a mod instead (although keep in mind that "anti-cheat" clients and fundamentally flawed and will not work).

  2. 7 minutes ago, tal124 said:

    I meant that I was trying to register my rendering handler with DeferredRegistry, and I knew that wouldn't work cause there isn't any code referring to rendering so I tried finding a Registry for rendering, and I guess I skimmed over RenderingRegistry.

    And other than that, they pretty much look like this
     

    
    	public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, chocolate.MODID);
    
            public static void init() { BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); }

     

    That should be fine. I thought you meant that the DeferredRegistry isn't working for the IRegistries :)

    • Thanks 1
  3. 1 minute ago, tal124 said:

    All I have are basic blocks, Items, and fluids, so I haven't needed anything else as of yet. And thank you, That actually let me Mob spawn into existence.

    It is preferred that blocks, items and entities are registered via DeferredRegistry.

    Can you post your code regarding the DeferredRegistry that you said didn't work?

  4. Check out RenderingRegistry and its methods.

    (Basically call RenderingRegistry::registerEntityRenderingHandler during FMLClientSetupEvent)

     

    17 minutes ago, tal124 said:

    All I really understand is the deferred register method, and that wasn't working with whatever I put into it.

    This sounds concerning. How are you registering everything then?

    • Thanks 1
  5. On 4/4/2021 at 7:29 AM, vini121121 said:

    man, ther es a problem on shader packs. they just pick the image of your monitor and reverse it into the water.

    if you look close to the water, nothing will be reflected like in the pictures that i have uploaded

    See on this picture: https://prnt.sc/113is8e

    Where's the tree reflex? and wheres the reflex on the corners???

    I think this reflex from shader is much bad bro

    Those are problems with the specific shader, not shaders in general.

    If you want to add reflections and waves, then using a shader is by far the best way to go.

     

    What specific changes are you trying to implement? It would be much easier to help if we know what you are trying to do specifically.

  6. Hi.

     

    3 hours ago, MrInfinity said:

    entityIn.setMotion(v.x, -v.y, v.z);

    You need to add the velocity to the entity, not negate its current velocity (that doesn't make mathematical sense).

     

    3 hours ago, MrInfinity said:

    private static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING;

    FACING is a DirectionProperty, which is a blockstate property. It does not contain a value by itself, but rather act as a key to a value stored in the blockstate.

  7. 1 minute ago, JayyThePotato said:

    ill learn to use it and post the full code, and what i did was fix all the errors that came up when i launched it in inteliiJ with the 1.15 gradle. 

    In that case, I'm afraid you are far from updating the mod.

     

    All the "launching of IntelliJ" is going to do is load the Gradle file, which is only used to setup the workspace (and other misc stuff such as building the mod). It won't give an error as long as you have a valid build.gradle.

     

    After that, you will still have to actually update the code. I would expect a mod like Witchery to have about 80000+ lines of code, and the majority of those need to be rewritten due to the large update. I would suggest to learn more about Minecraft modding first before tackling on a large project like this.

  8. 7 minutes ago, JayyThePotato said:

    theres like 80 java classes in each package and i think 15 packages. i dont know how i would sort them into the github repo

    You should learn to use Git, which is the encouraged method of uploading your code to GitHub.

     

    Also, what do you mean by

    17 hours ago, JayyThePotato said:

    and i got it down to a working file however since i finished fixing all the errors

    ? There is a lot of changes from 1.7.10 to newer versions. If all you did was to fix the compile time errors, then the mod will not work at all. IMO it would be less work to write the mod from scratch rather than porting across such a huge version gap.

  9. Minecraft mods are fully fledged Java programs. That means they are capable of doing almost ANYTHING on your computer. They can insert themselves as a background program and spy on your every move; they can key log your keyboard in the background to retrieve credential informations of your account; they can corrupt every single file on your device.

     

    However, being capable of these things doesn't mean it will happen. As long as you didn't get your mod from some dodgy site, you should be fine. A mod is a file on your computer; it won't delete itself unless its author intends to do so (which is weird, and never happens unless the mod is intentionally being weird, in which case you should think twice before installing it).

  10. Just now, Caffeinated Pinkie said:

    Well, the problem is that I'm trying to prevent all lightning from spawning fire, including vanilla lightning.

    Hmm.

    Since the fire is created before the bolt is added to the world, you could try subscribing to EntityJoinWorldEvent, check if the entity is lightning bolt, and check for fire blocks around the position of the bolt and set them to air.

    This will extinguish fire in the proximity (3-5 blocks in diameter) that are not created by the lightning, but that is the closest I can think of.

  11. 16 minutes ago, Lightlygamer1 said:

    what will happen?

    Creating excessive base classes is a bad practice against the structure of OOP. Since each class can only inherit one base class, creating base classes just to write less code will prevent deriving classes to extend other classes that are actually useful. For example, with your current setup, if you want to make a sword that glints, you will have to choose between extending SwordItem and ItemEnchantedGlint. This will result in having to mimic the behavior of the unextended class, which would be redundant code (and bad design).

     

    For more information, look up "Composition over Inheritance".

    • Like 1
  12. 5 hours ago, FrozenFarmer64 said:

    I am trying to make a block render darker than the world light value.

    You cannot do that. Minecraft's chunk format enforces the range of [0, 15] light level. Forcefully changing this will cause world corruptions and a lot of incompatibility with other mods.

     

    However, if the darkness effect is only visual, then you could create a custom shader to achieve it.

    I think I misunderstood. Are you trying to render a single/few blocks that way? Or do you want the whole world to be rendered that way?

  13. 16 hours ago, Dzuchun said:

    Right to the question: how minecraft achieves smooth entity rendering? As far as I know and experimented with Logging of entity's position in render method, it is updated, like, 20 times per second, which equals to 1 tick. So it seems like while rendering, minecraft uses entity's speed to determine where it should be, or what?

    With entity speed (or how much it moved during last tick) and interpolation.

    Interpolation is multiplying the difference in distance in that tick by the partial ticks of that frame, and add that to the previous position to achieve smooth movement.

    • Thanks 1
×
×
  • Create New...

Important Information

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