net.minecraft.entity.EntityDimensions Java Examples
The following examples show how to use
net.minecraft.entity.EntityDimensions.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EvolvedCreeperEntity.java From Galacticraft-Rewoven with MIT License | 5 votes |
@Override public EntityDimensions getDimensions(EntityPose pose) { if (this.isBaby()) { return this.getType().getDimensions().scaled(0.75F, 0.5F); } else { return this.getType().getDimensions(); } }
Example #2
Source File: MixinPlayerEntity.java From multiconnect with MIT License | 5 votes |
@Inject(method = "getDimensions", at = @At("HEAD"), cancellable = true) private void onGetDimensions(EntityPose pose, CallbackInfoReturnable<EntityDimensions> ci) { if (ConnectionInfo.protocolVersion <= Protocols.V1_13_2) { if (pose == EntityPose.CROUCHING) { ci.setReturnValue(SNEAKING_DIMENSIONS_1_13_2); } } }
Example #3
Source File: EntityEvent.java From patchwork-api with GNU Lesser General Public License v2.1 | 5 votes |
public EyeHeight(Entity entity, EntityPose pose, EntityDimensions size, float defaultHeight) { super(entity); this.pose = pose; this.size = size; this.oldHeight = defaultHeight; this.newHeight = defaultHeight; }
Example #4
Source File: SeaponyRenderer.java From MineLittlePony with MIT License | 5 votes |
@Override public void render(GuardianEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { IResizeable resize = (IResizeable)entity; EntityDimensions origin = resize.getCurrentSize(); // aligns the beam to their horns resize.setCurrentSize(EntityDimensions.changing(origin.width, entity instanceof ElderGuardianEntity ? 6 : 3)); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); // The beams in RenderGuardian leave lighting disabled, so we need to change it back. #MojangPls RenderSystem.enableLighting(); resize.setCurrentSize(origin); }
Example #5
Source File: MixinClientPlayerEntity.java From MineLittlePony with MIT License | 5 votes |
@Override public float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions) { float value = super.getActiveEyeHeight(pose, dimensions); IPony pony = MineLittlePony.getInstance().getManager().getPony(this); if (!pony.getRace(false).isHuman()) { value *= pony.getMetadata().getSize().getEyeHeightFactor(); } return value; }
Example #6
Source File: EvolvedCreeperEntity.java From Galacticraft-Rewoven with MIT License | 4 votes |
@Override protected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions) { return this.isBaby() ? 0.75F : 1.4F; }
Example #7
Source File: RestlessCactusEntity.java From the-hallow with MIT License | 4 votes |
@Override public EntityDimensions getDimensions(EntityPose pose) { return EntityDimensions.changing(0.9F, 1.0F * getCactusHeight()); }
Example #8
Source File: CrowEntity.java From the-hallow with MIT License | 4 votes |
@Override protected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions) { return dimensions.height * 0.6F; }
Example #9
Source File: EntityEvent.java From patchwork-api with GNU Lesser General Public License v2.1 | 4 votes |
public EntityDimensions getSize() { return size; }
Example #10
Source File: EntityEvents.java From patchwork-api with GNU Lesser General Public License v2.1 | 4 votes |
public static float getEyeHeight(Entity entity, EntityPose pose, EntityDimensions size, float defaultHeight) { EntityEvent.EyeHeight event = new EntityEvent.EyeHeight(entity, pose, size, defaultHeight); MinecraftForge.EVENT_BUS.post(event); return event.getNewHeight(); }
Example #11
Source File: MixinEntity.java From patchwork-api with GNU Lesser General Public License v2.1 | 4 votes |
@Shadow protected abstract float getEyeHeight(EntityPose pose, EntityDimensions dimensions);
Example #12
Source File: IResizeable.java From MineLittlePony with MIT License | 4 votes |
@Accessor("dimensions") EntityDimensions getCurrentSize();
Example #13
Source File: IResizeable.java From MineLittlePony with MIT License | 4 votes |
@Accessor("dimensions") void setCurrentSize(EntityDimensions size);