-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
f5f5c26
commit 1192ceb
Showing
19 changed files
with
352 additions
and
159 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
6 changes: 6 additions & 0 deletions
6
common/src/generated/resources/assets/nirvana/models/item/old_pipe.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "nirvana:item/old_pipe" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
common/src/generated/resources/assets/nirvana/models/item/suspicious_pipe.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "nirvana:item/suspicious_pipe" | ||
} | ||
} |
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
24 changes: 10 additions & 14 deletions
24
common/src/main/java/galena/nirvana/mixins/ItemInHandRendererMixin.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 |
---|---|---|
@@ -1,30 +1,26 @@ | ||
package galena.nirvana.mixins; | ||
|
||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import galena.nirvana.world.item.SmokingItem; | ||
import net.minecraft.client.player.AbstractClientPlayer; | ||
import galena.nirvana.index.NirvanaTags; | ||
import net.minecraft.client.renderer.ItemInHandRenderer; | ||
import net.minecraft.client.renderer.MultiBufferSource; | ||
import net.minecraft.world.InteractionHand; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.UseAnim; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(ItemInHandRenderer.class) | ||
public class ItemInHandRendererMixin { | ||
|
||
@Inject( | ||
@Redirect( | ||
method = "renderArmWithItem", | ||
at = @At("HEAD"), | ||
cancellable = true | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;getUseAnimation()Lnet/minecraft/world/item/UseAnim;") | ||
) | ||
public void hideFirstPersonJoint(AbstractClientPlayer player, float f, float g, InteractionHand hand, float h, ItemStack stack, float i, PoseStack pose, MultiBufferSource multiBufferSource, int j, CallbackInfo ci) { | ||
if(!(stack.getItem() instanceof SmokingItem)) return; | ||
if(player.getUseItem() != stack) return; | ||
public UseAnim hideFirstPersonJoint(ItemStack instance) { | ||
var defaultAnimation = instance.getUseAnimation(); | ||
if(!(instance.is(NirvanaTags.SMOKING_ITEM))) return defaultAnimation; | ||
// if(player.getUseItem() != instance) return defaultAnimation; | ||
|
||
ci.cancel(); | ||
return UseAnim.BOW; | ||
} | ||
|
||
} |
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
Oops, something went wrong.