diff --git a/src/main/java/emu/grasscutter/game/entity/EntityGadget.java b/src/main/java/emu/grasscutter/game/entity/EntityGadget.java index f74a79e7b..7e68ad2bf 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityGadget.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityGadget.java @@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget { .setConfigId(this.getConfigId()) .setGadgetState(this.getState()) .setIsEnableInteract(true) - .setDraftId(this.metaGadget.draft_id) .setAuthorityPeerId(this.getScene().getWorld().getHostPeerId()); + if(this.metaGadget != null) { + gadgetInfo.setDraftId(this.metaGadget.draft_id); + } + if (this.getContent() != null) { this.getContent().onBuildProto(gadgetInfo); }