Jump to content

CurseGame

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by CurseGame

  1. Seems fixed in https://github.com/MinecraftForge/MinecraftForge/pull/10171
  2. The server player instance isn't passed to the OnDatapackSyncEvent. It's impossible to sync with the client side using this command. package net.minecraft.server.players; ... public abstract class PlayerList { ... servergamepacketlistenerimpl.send(new ClientboundSetCarriedItemPacket(p_11263_.getInventory().selected)); net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.OnDatapackSyncEvent(this, null)); servergamepacketlistenerimpl.send(new ClientboundUpdateRecipesPacket(this.server.getRecipeManager().getOrderedRecipes())); this.sendPlayerPermissionLevel(p_11263_); previous version passed player correctly servergamepacketlistenerimpl.send(new ClientboundSetCarriedItemPacket(p_11263_.getInventory().selected)); net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.OnDatapackSyncEvent(this, p_11263_)); servergamepacketlistenerimpl.send(new ClientboundUpdateRecipesPacket(this.server.getRecipeManager().getRecipes()));
  3. In the 1.21 the SynchedEntityData object is final and it's unable to add new Player attributes using traditional EntityConstructing. I make sense to fire the event a little earlier and pass SynchedEntityData.Builder object in it. See example below. public Entity(EntityType<?> p_19870_, Level p_19871_) { ... synchedentitydata$builder.define(DATA_TICKS_FROZEN, 0); this.defineSynchedData(synchedentitydata$builder); // suggested injection net.minecraftforge.event.ForgeEventFactory.onEntityConstructing(this, synchedentitydata$builder); this.entityData = synchedentitydata$builder.build(); this.setPos(0.0, 0.0, 0.0); this.eyeHeight = this.dimensions.eyeHeight(); // current injection net.minecraftforge.event.ForgeEventFactory.onEntityConstructing(this); this.gatherCapabilities(); }
  4. Guys, please, fix this bug. Hundreds mods with no images in tooltips.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.