-
Notifications
You must be signed in to change notification settings - Fork 4
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
20d4871
commit e084edb
Showing
11 changed files
with
45 additions
and
70 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
### Fixed: | ||
- | ||
### Changed: | ||
- Updated to mc 1.20.6 | ||
- Updated to mc 1.21 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
jdk: | ||
- openjdk17 | ||
- openjdk21 | ||
before_install: | ||
- sdk install java 17.0.3-tem | ||
- sdk use java 17.0.3-tem | ||
- sdk install java 21.0.0-tem | ||
- sdk use java 21.0.0-tem |
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,11 +1,37 @@ | ||
package net.rpgz; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.mob.MobEntity; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.hit.EntityHitResult; | ||
import net.minecraft.util.hit.HitResult; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class RpgzClient implements ClientModInitializer { | ||
|
||
private static final Identifier LOOT_BAG_TEXTURE = Identifier.of("rpgz", "textures/sprite/loot_bag.png"); | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
HudRenderCallback.EVENT.register((drawContext, tickCounter) -> { | ||
MinecraftClient client = MinecraftClient.getInstance(); | ||
if (client.crosshairTarget != null && client.crosshairTarget.getType() == HitResult.Type.ENTITY) { | ||
Entity entity = ((EntityHitResult) client.crosshairTarget).getEntity(); | ||
if (entity instanceof MobEntity) { | ||
MobEntity deadBody = (MobEntity) entity; | ||
if (deadBody != null && deadBody.deathTime > 20) { | ||
int scaledWidth = client.getWindow().getScaledWidth(); | ||
int scaledHeight = client.getWindow().getScaledHeight(); | ||
drawContext.drawTexture(LOOT_BAG_TEXTURE, (scaledWidth / 2), (scaledHeight / 2) - 16, 0.0F, 0.0F, 16, 16, 16, 16); | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
|
||
} |
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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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