-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
20 changed files
with
104 additions
and
81 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
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.
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
34 changes: 34 additions & 0 deletions
34
...va/com/terraformersmc/terraform/sign/impl/mixin/MixinAbstractSignBlockEntityRenderer.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,34 @@ | ||
package com.terraformersmc.terraform.sign.impl.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import com.llamalad7.mixinextras.sugar.Local; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.block.WoodType; | ||
import net.minecraft.block.entity.SignBlockEntity; | ||
import net.minecraft.client.model.Model; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.block.entity.AbstractSignBlockEntityRenderer; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Environment(EnvType.CLIENT) | ||
@Mixin(AbstractSignBlockEntityRenderer.class) | ||
public abstract class MixinAbstractSignBlockEntityRenderer { | ||
@Unique | ||
protected SignBlockEntity terraform$renderedBlockEntity; | ||
|
||
@WrapOperation( | ||
method = "render(Lnet/minecraft/block/entity/SignBlockEntity;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/block/BlockState;Lnet/minecraft/block/AbstractSignBlock;Lnet/minecraft/block/WoodType;Lnet/minecraft/client/model/Model;)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/entity/AbstractSignBlockEntityRenderer;renderSign(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/block/WoodType;Lnet/minecraft/client/model/Model;)V") | ||
) | ||
@SuppressWarnings("unused") | ||
private void terraformWood$setRenderedBlockEntity(AbstractSignBlockEntityRenderer instance, MatrixStack matrices, VertexConsumerProvider verticesProvider, int light, int overlay, WoodType type, Model model, Operation<Void> original, @Local SignBlockEntity blockEntity) { | ||
this.terraform$renderedBlockEntity = blockEntity; | ||
original.call(instance, matrices, verticesProvider, light, overlay, type, model); | ||
this.terraform$renderedBlockEntity = null; | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
...ava/com/terraformersmc/terraform/sign/impl/mixin/MixinHangingSignBlockEntityRenderer.java
This file was deleted.
Oops, something went wrong.
28 changes: 4 additions & 24 deletions
28
.../main/java/com/terraformersmc/terraform/sign/impl/mixin/MixinSignBlockEntityRenderer.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
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
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_boat.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_boat" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_chest_boat.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_chest_boat" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_chest_raft.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_chest_raft" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_hanging_sign.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_hanging_sign" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_log.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_log" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_planks.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_planks" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_raft.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_raft" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
terraform-wood-api-v1/src/testmod/resources/assets/terraform/items/custom_sign.json
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,6 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "terraform:item/custom_sign" | ||
} | ||
} |
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