Jump to content

J3ramy

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by J3ramy

  1. Finally I managed to check it. It works perfectly. Thank you all!
  2. Hey Thorius, I will try it tonight when I’m at home again but it seems like it could work. I’ll keep you up to date
  3. Yeah I tried it with Math.abs but it isn’t working either…
  4. Maybe I should mention it. I changed the max speed and max speed on rail to 16m/s. But my question is more, how do I convert the calculated force to the Minecraft motion?
  5. Hey guys, I am struggling a long time to figure out how to create a formula for my mod. Overview: I created a brake rail which should brake down a minecart when it's on it. I found this formula in the internet and applied it: The minecart has an entry speed of 12m/s, the target velocity is 8m/s and the break run is 1m because it's one block. I slow down the cart by multiplying the result of this formula with the current motion of the cart: I figured out another thing: The wiki says that that 8m/s are 1.2 in motion. So I changed the formula depending on the motion (I don't know if this is right but it made sense to me): Why 0.15? As mentioned before 8m/s are 1.2. So, 1m/s = 0.15 -> (8/1.2). And then I multiplied it with the entry speed because it has to be changed to the "motion internal unit"?! I am really frustrated right know, because I tried a lot of different changes within the formula. The problem is maybe the multiplication with the motion? I don't know. Maybe someone can help me Thanks in advance!
  6. This one works like a charme. Thank you!
  7. Hey guys, I created my own screen and container. But the heading of the inventory screen is annoying (see here). Is there an easy way to remove it, like an override? I haven't found anything useful yet. Thanks for your help!
  8. Nice. Thank you very much. It finally works ^^ That was very hard for me...
  9. The overrides in TestCartEntity are working when I use EntityType.MINECART in the constructor super call. If I change it to ModEntityTypes.TEST_CART then there's the weird "bug" that it gets placed but its not visible/clickable
  10. Yeah but this time the overrides are working. If I use the custom entity type, it's not working
  11. Thanks. I changed the constrcutor to Actually, now the cart is kinda there. If I place it on a rail and place another block (e.g. dirt) there, the dirt block disappears, which indicates that the cart is more or less there. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- EDIT: I changed the super call to And now it works perfectly fine. But now the registration of the custom entity type seems useless to me? Is it the "correct" solution or is it weird?
  12. I changed the class to this: The error disappeared but still no cart is spawning... EDIT: I pushed to the repo again
  13. I use now TEST_CART.get() from ModEntityTypes for the item registration (I assume this is the Custom Entity Type): No compile errors but one runtime error:
  14. That makes sense. Now I changed the ModItems.java to this: But there's an error: Cannot resolve method 'register(DefaultedRegistry<EntityType<?>>, String, Builder<TestCartEntity>)' I used the EntityType-class as a reference.
  15. I noticed that the VCS skipped the utils folder. I readded it again. It should work now
  16. Interesting For me it compiles. What is the error?
  17. Link to my repo. I hope it helps
  18. I changed it to follwing and added the texture private static final ResourceLocation TEXTURE_LOC = new ResourceLocation(EdomMod.MOD_ID,"textures/entity/minecart.png"); But it is still not working. When I right click, it debugs the constructor, but I can go through it and it's not visible... It acts like it is not getting created
  19. My cart now gets created (Debug in constructor of TestCartEntity) But the cart is not visible. Here's my code: Cart entity Renderer Cart item Register Mod class
  20. Thanks. I will look into it and message you, when I am not able to figure out
  21. Yes I agree! But how do I do it with Carts? I only did it with default items
  22. I also send my cart item. Maybe there's an error in it. Item register Cart item EDIT: I tried to debug to the console in the constructor of TestCart but it seems like the constructor is not called. So, I guess I made a mistake within the item?
  23. I set it to .1f and there's no change I walked against the cart and it moved. I built a test environment as well (see here). Left = custom, Right = default cart
  24. Thanks for your reply. Sadly, none of above works. Neither the max speed nor the collision. Did I miss something?: public class TestCart extends MinecartEntity { public TestCart(EntityType<?> type, World world) { super(type, world); } @Override public Type getMinecartType() { return Type.RIDEABLE; } @Override public boolean canBePushed() { return false; } @Override public void applyEntityCollision(Entity entity) { } @Override public void addVelocity(double x, double y, double z) { } @Override public float getMaxCartSpeedOnRail() { return 1f; } }
×
×
  • Create New...

Important Information

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