Jump to content

SomePerson

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by SomePerson

  1. I did not see this: public class Block extends BlockBehaviour So I did not know how I could use Properties.copy() which actually requires a BlockBehaviour object. Sorry for that.
  2. Also the player looking in different directions has no effect.
  3. Update: at around 0 0 0 it draws the model but it does not move.
  4. There is a function in LivingEntity called hasLineOfSight where you can specify another Entity
  5. Another question: considering my current way of doing this is stupid, how could I render a different model for the player, maybe even with geckolib?
  6. public static final Block SLIME_BLOCK = register("slime_block", new SlimeBlock(BlockBehaviour.Properties.of().mapColor(MapColor.GRASS).friction(0.8F).sound(SoundType.SLIME_BLOCK).noOcclusion())); That was in Blocks.java. Just do that.
  7. import net.minecraft.world.level.material.Material;
  8. You are not importing the Material class. Is that on purpose?
  9. if(transform.isActive()){ event.setCanceled(true); LayerDefinition def = Transformed.createBodyLayer(); Transformed<Player> model = new Transformed<>(def.bakeRoot()); PoseStack ps = new PoseStack(); ps.translate(player.getX(),player.getY(),player.getZ()); //ps.pushTransformation(new Transformation(null).applyOrigin(player.getPosition(1).toVector3f())); model.renderToBuffer(ps,Minecraft.getInstance().renderBuffers().bufferSource().getBuffer(RenderType.entitySolid(Transformed.LAYER_LOCATION.getModel())), 0, 0, 1, 1, 1, 1); } I have this but it does not work and its probably completely wrong but i could not find anything better (It is in the RenderPlayerEvent.Pre event)
×
×
  • Create New...

Important Information

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