Skip to content

Commit

Permalink
Update npcspawner.js
Browse files Browse the repository at this point in the history
  • Loading branch information
radmanplays authored Sep 19, 2024
1 parent 61a4a06 commit f26411a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examplemods/npcspawner.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

// Create a fake player GameProfile
const GameProfileClass = ModAPI.reflect.getClassById("net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile");
const fakeProfile = GameProfileClass.constructors[2](
ModAPI.reflect.getClassById("java.util.UUID").staticMethods.randomUUID(), ModAPI.util.str("Steve")
);
const fakeProfile = GameProfileClass.constructors[2](null, ModAPI.util.str("Steve"));

// Get the EntityPlayerMP class to spawn the fake player
const EntityPlayerMPClass = ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP");
Expand Down

0 comments on commit f26411a

Please sign in to comment.