Jump to content

Windokk

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Windokk's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm currently implementing an Oil Pump block. It's bigger than a regular block and is loaded with the wavefront (.obj) loader provied by Forge. I'm trying to add collision boxes to my block but some of my collision boxes are bigger than 16x16x16, and i can walk through them... Here's what I override to create my bounding boxes : @Override public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return switch (state.getValue(FACING)) { default -> Shapes.or(box(-5, 2, 17, 37, 53, 32), box(-5, 2, -13, 37, 53, 2), box(-12, 0, -20, 44, 4, 53), box(6, 1, 43, 26, 26, 62), box(9, 49, 2, 23, 53, 17)); case NORTH -> Shapes.or(box(-21, 2, -16, 21, 53, -1), box(-21, 2, 14, 21, 53, 29), box(-28, 0, -37, 28, 4, 36), box(-10, 1, -46, 10, 26, -27), box(-7, 49, -1, 7, 53, 14)); case EAST -> Shapes.or(box(17, 2, -21, 32, 53, 21), box(-13, 2, -21, 2, 53, 21), box(-20, 0, -28, 53, 4, 28), box(43, 1, -10, 62, 26, 10), box(2, 49, -7, 17, 53, 7)); case WEST -> Shapes.or(box(-16, 2, -5, -1, 53, 37), box(14, 2, -5, 29, 53, 37), box(-37, 0, -12, 36, 4, 44), box(-46, 1, 6, -27, 26, 26), box(-1, 49, 9, 14, 53, 23)); }; } My question is : Is there a way to bypass the collision box size limit on blocks ?
  2. In my jeepentity class, the overrided method hurt() isn't called.. Anyone has the same problem or knows what's causing it ? Also all arrows and weapons are passing through the hitbox... https://github.com/Windokk/MilitaryElements/blob/main/src/main/java/com/windokkstudio/militaryelements/entities/vehicles/JeepEntity.java
  3. @warjort Maybe instead of telling him not to help me, you could explain to me better than just telling me: just figure it out yourself
  4. How do i do it ? I mean, could you maybe share what the renderer should look like ?
  5. Then what is it supposed to do ?
  6. I'm trying to create a jeep entity but it seems like i'm not doing the renderer registration right... The entity loads into the world but is invisible I'm on 1.19.2 Here is the github link of my project : https://github.com/Windokk/MilitaryElements
  7. thx a lot for helping me !
  8. I don't really understand... concretely how do i make the anim play when i rightclick with the item ?
  9. Sorry, it was working for me all along... i just didn't see it.. i'm soo stoopid.. Anyway, the animation is not playing.. is it normal ?
  10. btw, how did you make it log "AAAAAAAAAAAA", did you right clicked with the item in hand or did you do something else i'm missing ?
  11. Nope, i don't log it anywhere else.. Must be a problem on my side.. thx a lot for your time !
  12. https://github.com/Windokk/MilitaryElements hhere is my whole project repo
  13. Here is my item class : it's an adrenaline syringe but it seem that the initializeClient method isn't called public class Adrenaline extends Item { public Adrenaline(Properties p_41383_) {super(p_41383_);} @Override public void initializeClient(Consumer<IClientItemExtensions> consumer) { MilitaryElements.LOGGER.info("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); consumer.accept(new IClientItemExtensions() { private static final HumanoidModel.ArmPose EXAMPLE_POSE = HumanoidModel.ArmPose.create("EXAMPLE", false, (model, entity, arm) -> { if (arm == HumanoidArm.RIGHT) { model.rightArm.xRot = (float) (Math.random() * Math.PI * 2); } else { model.leftArm.xRot = (float) (Math.random() * Math.PI * 2); } }); @Override public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) { if (!itemStack.isEmpty()) { if (entityLiving.getUsedItemHand() == hand && entityLiving.getUseItemRemainingTicks() > 0) { return EXAMPLE_POSE; } } return HumanoidModel.ArmPose.EMPTY; } @Override public boolean applyForgeHandTransform(PoseStack poseStack, LocalPlayer player, HumanoidArm arm, ItemStack itemInHand, float partialTick, float equipProcess, float swingProcess) { int i = arm == HumanoidArm.RIGHT ? 1 : -1; poseStack.translate(i * 0.56F, -0.52F, -0.72F); if (player.getUseItem() == itemInHand && player.isUsingItem()) { poseStack.translate(0.0, -0.05, 0.0); } return true; } }); } @Override public InteractionResultHolder<ItemStack> use(Level world, Player entity, InteractionHand hand) { InteractionResultHolder<ItemStack> ar = super.use(world, entity, hand); ItemStack itemstack = ar.getObject(); double x = entity.getX(); double y = entity.getY(); double z = entity.getZ(); //Sounds return ar; } }
  14. well, the initializeClient method doesn't load, even tho I put @Override above it.. I'm on 1.19.2 btw
  15. thx a lot !!
×
×
  • Create New...

Important Information

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