优化贴图
|
@ -20,12 +20,6 @@ import net.minecraftforge.fml.common.Mod;
|
|||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class JavelinHudOverlay {
|
||||
|
||||
public static final int TEXTURE_WIDTH = 771;
|
||||
public static final int TEXTURE_HEIGHT = 1006;
|
||||
|
||||
public static final int HUD_WIDTH = 1720;
|
||||
public static final int HUD_HEIGHT = 720;
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public static void eventHandler(RenderGuiEvent.Pre event) {
|
||||
int w = event.getWindow().getGuiScaledWidth();
|
||||
|
|
|
@ -183,7 +183,7 @@ public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
if (tag.getBoolean("Seeking")) {
|
||||
Entity targetEntity = player.level().getEntitiesOfClass(LivingEntity.class, player.getBoundingBox().inflate(384))
|
||||
.stream().filter(e -> e.getStringUUID().equals(tag.getString("TargetEntity"))).findFirst().orElse(null);
|
||||
Entity seekingEntity = SeekTool.seekEntity(player, player.level(), 384, 7);
|
||||
Entity seekingEntity = SeekTool.seekEntity(player, player.level(), 384, 8);
|
||||
if (seekingEntity != null && seekingEntity == targetEntity) {
|
||||
tag.putInt("SeekTime", tag.getInt("SeekTime") + 1);
|
||||
} else {
|
||||
|
|
|
@ -117,7 +117,7 @@ public class FireMessage {
|
|||
}
|
||||
|
||||
if (handItem.getItem() == ModItems.JAVELIN.get() && player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming && tag.getInt("ammo") > 0) {
|
||||
Entity seekingEntity = SeekTool.seekEntity(player, player.level(), 384, 7);
|
||||
Entity seekingEntity = SeekTool.seekEntity(player, player.level(), 384, 8);
|
||||
if (seekingEntity != null) {
|
||||
tag.putString("TargetEntity",seekingEntity.getStringUUID());
|
||||
tag.putBoolean("Seeking",true);
|
||||
|
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.5 KiB |