net.minecraft.entity.mob.GuardianEntity Java Examples

The following examples show how to use net.minecraft.entity.mob.GuardianEntity. 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: SeaponyRenderer.java    From MineLittlePony with MIT License 6 votes vote down vote up
public SeaponyRenderer(EntityRenderDispatcher manager) {
    super(manager);

    features.clear();
    ponyRenderer = new Proxy<GuardianEntity, GuardianPonyModel>(features, manager, ModelType.GUARDIAN) {
        @Override
        public Identifier findTexture(GuardianEntity entity) {
            return SEAPONY;
        }

        @Override
        protected HeldItemFeature<GuardianEntity, GuardianPonyModel> createItemHoldingLayer() {
            return new GlowingItemFeature<>(this);
        }
    };
    model = ponyRenderer.getModel();
}
 
Example #2
Source File: SeaponyRenderer.java    From MineLittlePony with MIT License 5 votes vote down vote up
@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 #3
Source File: SeaponyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
@Nonnull
public final Identifier getTexture(GuardianEntity entity) {
    return ponyRenderer.getTextureFor(entity);
}
 
Example #4
Source File: SeaponyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
protected void scale(GuardianEntity entity, MatrixStack stack, float ticks) {
    ponyRenderer.scale(entity, stack, ticks);
}
 
Example #5
Source File: SeaponyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
protected void scale(GuardianEntity entity, MatrixStack stack, float ticks) {
    super.scale(entity, stack, ticks);
    stack.scale(2.35F, 2.35F, 2.35F);
}
 
Example #6
Source File: GuardianPonyModel.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
public void setAngles(GuardianEntity entity, float move, float swing, float ticks, float headYaw, float headPitch) {
    mixin().setAngles(entity, move, swing, ticks, headYaw, headPitch);
}
 
Example #7
Source File: GuardianPonyModel.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
public void animateModel(GuardianEntity entity, float move, float swing, float float_3) {
    mixin().animateModel(entity, move, swing, float_3);
}
 
Example #8
Source File: GuardianPonyModel.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
public void copyStateTo(EntityModel<GuardianEntity> model) {
    mixin().copyStateTo(model);
}
 
Example #9
Source File: GuardianPonyModel.java    From MineLittlePony with MIT License 4 votes vote down vote up
@Override
public SeaponyModel<GuardianEntity> mixin() {
    return mixin;
}