-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
136 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
- Added Levitating Blocks. (@enjarai) | ||
- A block can now be levitated by applying a Featherweight Ploy to it. | ||
- These levitated blocks can be kept levitating by continually applying Featherweight Ploy. | ||
- Levitated blocks can be moved around using Kinetic Ploy, as if they were normal entities. | ||
- They may impart significant damage when striking living creatures at high velocity. | ||
- A levitated block will revert to its normal form when on solid ground and no longer affected by Featherweight. | ||
- It can be forced to convert back in midair by applying a Featherweight of 1 to it. | ||
- If a levitated block is inside a block that isn't naturally replaceable, it will never revert. | ||
- Added Displacement. (@StellarWitch7 and @enjarai) | ||
- Displacement is a delayed means of teleportation. | ||
- When applying displacement to an entity, the mana cost scales exponentially with distance. | ||
- After the displacement is applied, and a few seconds of delay, the target entity will teleport by the given offset. | ||
- During the delay window, more displacements can be applied to the entity to modify its final destination. | ||
- If the entity takes damage from any source, the displacement is cancelled. | ||
- Added Astral Knots. (@enjarai and @StellarWitch7) | ||
- This type of Knot is made from a Nether Star. | ||
- It does not regenerate mana from moonlight, but has a truly massive buffer, and has a unique mechanic associated with it. | ||
- Improved block conversions. (Heating, Cooling and Weathering) (@Awakened-Redstone) | ||
- Fixed issues with waterlogging. | ||
- Fixed issues with blockstates not being preserved. | ||
- Added the Acolyte's Bindings and the Archmage's Tether. (@StellarWitch7 and @enjarai) | ||
- Thanks for the textures Crephan! | ||
- Improved Knot tooltips displaying merlin gain and drain. (@StellarWitch7) | ||
- Updated changelog. (@enjarai) | ||
- Added a model for the Acolyte's Bindings. (@enjarai) | ||
- Added a bell sound for the Acolyte's Bindings. (@enjarai) | ||
- Fixed a naming error. (@StellarWitch7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/client/java/dev/enjarai/trickster/render/CollarRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package dev.enjarai.trickster.render; | ||
|
||
import com.google.common.base.Suppliers; | ||
import dev.enjarai.trickster.Trickster; | ||
import io.wispforest.accessories.api.client.AccessoryRenderer; | ||
import io.wispforest.accessories.api.slot.SlotReference; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.model.*; | ||
import net.minecraft.client.render.OverlayTexture; | ||
import net.minecraft.client.render.VertexConsumer; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.entity.EntityRenderer; | ||
import net.minecraft.client.render.entity.LivingEntityRenderer; | ||
import net.minecraft.client.render.entity.model.BipedEntityModel; | ||
import net.minecraft.client.render.entity.model.EntityModel; | ||
import net.minecraft.client.render.entity.model.EntityModelPartNames; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.Identifier; | ||
|
||
import java.util.function.Supplier; | ||
|
||
// Partially adapted from Collar Trinkets by wiidotmom (https://github.com/wiidotmom/collar-trinkets) | ||
public class CollarRenderer implements AccessoryRenderer { | ||
private static final Identifier TEXTURE = Trickster.id("textures/entity/collar.png"); | ||
private static final Supplier<BipedEntityModel<LivingEntity>> MODEL = Suppliers.memoize(() -> | ||
new Model(Model.createTexturedModelData().createModel())); | ||
|
||
@Override | ||
public <M extends LivingEntity> void render(ItemStack itemStack, SlotReference slotReference, MatrixStack matrixStack, EntityModel<M> entityModel, VertexConsumerProvider vertexConsumerProvider, int light, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { | ||
BipedEntityModel<LivingEntity> model = MODEL.get(); | ||
model.setAngles(slotReference.entity(), limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); | ||
model.animateModel(slotReference.entity(), limbSwing, limbSwingAmount, ageInTicks); | ||
followBodyRotations(slotReference.entity(), model); | ||
VertexConsumer consumer = vertexConsumerProvider.getBuffer(model.getLayer(TEXTURE)); | ||
|
||
model.render(matrixStack, consumer, light, OverlayTexture.DEFAULT_UV); | ||
|
||
// BipedEntityModel<LivingEntity> bellModel = BELL_MODEL.get(); | ||
// bellModel.setAngles(slotReference.entity(), limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); | ||
// bellModel.animateModel(slotReference.entity(), limbSwing, limbSwingAmount, ageInTicks); | ||
// followBodyRotations(slotReference.entity(), bellModel); | ||
// VertexConsumer bellConsumer = vertexConsumerProvider.getBuffer(bellModel.getLayer(TEXTURE)); | ||
// bellModel.render(matrixStack, bellConsumer, light, OverlayTexture.DEFAULT_UV, 1.0f, 1.0f, 1.0f, 1.0f); | ||
} | ||
|
||
private static void followBodyRotations(LivingEntity entity, BipedEntityModel<LivingEntity> model) { | ||
EntityRenderer<? super LivingEntity> render = MinecraftClient.getInstance().getEntityRenderDispatcher().getRenderer(entity); | ||
|
||
if (render instanceof LivingEntityRenderer<?, ?> renderer && renderer.getModel() instanceof BipedEntityModel<?> entityModel) { | ||
((BipedEntityModel<LivingEntity>) entityModel).copyBipedStateTo(model); | ||
} | ||
} | ||
|
||
public static class Model extends BipedEntityModel<LivingEntity> { | ||
public Model(ModelPart root) { | ||
super(root); | ||
this.setVisible(false); | ||
this.body.visible = true; | ||
} | ||
|
||
public static TexturedModelData createTexturedModelData() { | ||
ModelData modelData = new ModelData(); | ||
ModelPartData root = modelData.getRoot(); | ||
ModelPartData body = root.addChild(EntityModelPartNames.BODY, ModelPartBuilder.create(), ModelTransform.NONE); | ||
body.addChild("collar", ModelPartBuilder.create().uv(0, 0).cuboid(-3.0F, -24.0F, -2.0F, 6.0F, 3.0F, 4.0F, new Dilation(0.3F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); | ||
body.addChild("bell", ModelPartBuilder.create().uv(0, 7).cuboid(-0.5F, -23.0F, -2.75F, 1.0F, 1.0F, 1.0F, new Dilation(0.3F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); | ||
|
||
root.addChild(EntityModelPartNames.HEAD, ModelPartBuilder.create(), ModelTransform.NONE); | ||
root.addChild(EntityModelPartNames.HAT, ModelPartBuilder.create(), ModelTransform.NONE); | ||
root.addChild(EntityModelPartNames.RIGHT_ARM, ModelPartBuilder.create(), ModelTransform.NONE); | ||
root.addChild(EntityModelPartNames.LEFT_ARM, ModelPartBuilder.create(), ModelTransform.NONE); | ||
root.addChild(EntityModelPartNames.RIGHT_LEG, ModelPartBuilder.create(), ModelTransform.NONE); | ||
root.addChild(EntityModelPartNames.LEFT_LEG, ModelPartBuilder.create(), ModelTransform.NONE); | ||
|
||
return TexturedModelData.of(modelData, 64, 64); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.