aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-04-14 04:32:44 +0200
committernea <nea@nea.moe>2023-04-14 04:32:44 +0200
commitf0b14a4183a79cf53803610bde674264fd65bfd8 (patch)
treea2713059ee16c324945d032043f8bd5b902c050d
parent893e7262ed05d9266548d899c98dad2e1cb285f1 (diff)
downloadNotEnoughUpdates-f0b14a4183a79cf53803610bde674264fd65bfd8.tar.gz
NotEnoughUpdates-f0b14a4183a79cf53803610bde674264fd65bfd8.tar.bz2
NotEnoughUpdates-f0b14a4183a79cf53803610bde674264fd65bfd8.zip
position adjustment
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt
index 7c352dae..7acd88a9 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt
@@ -32,6 +32,7 @@ import net.minecraft.client.Minecraft
import net.minecraft.client.entity.AbstractClientPlayer
import net.minecraft.client.gui.GuiScreen
import net.minecraft.client.renderer.GlStateManager
+import net.minecraft.entity.passive.EntityVillager
import net.minecraft.util.BlockPos
import net.minecraftforge.client.event.MouseEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -85,7 +86,7 @@ class NPCLocationExporter {
json["clickcommand"] = ""
json["modver"] = NotEnoughUpdates.VERSION
json["x"] = position.x
- json["y"] = position.y
+ json["y"] = position.y + 1
json["z"] = position.z
json["island"] = island
NotEnoughUpdates.INSTANCE.manager.writeJsonDefaultDir(json, "$id.json")
@@ -123,6 +124,18 @@ class NPCLocationExporter {
Utils.addChatMessage("Could not find entity under cursor")
return
}
+ if (pointedEntity is EntityVillager) {
+ Minecraft.getMinecraft().displayGuiScreen(
+ NPCNamePrompt(
+ // Just use jerry pet skin, idk, this will probably cause texture packs to overwrite us, but uhhhhh uhhhhhhh
+ UUID.fromString("c9540683-51e4-3942-ad17-4f2c3f3ae4b7"),
+ pointedEntity.position,
+ SBInfo.getInstance().getLocation(),
+ "822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b"
+ )
+ )
+ return
+ }
if (pointedEntity !is AbstractClientPlayer) {
Utils.addChatMessage("Entity under cursor is not a player")
return