mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08:00
small nullpointer fix in EntityGadget, in case meta gadget is not set
This commit is contained in:
parent
bb8ae4c443
commit
964e73f0f6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user