Compare commits
No commits in common. "c4b7f6e78e6dd82d0064044c956c41ed935f8c5c" and "e2115397fea6169255b5d3fbf3734dfe020ba16e" have entirely different histories.
c4b7f6e78e
...
e2115397fe
@ -134,7 +134,7 @@ object AndroidResearchManager : SimpleJsonResourceReloadListener(GsonBuilder().s
|
|||||||
}
|
}
|
||||||
|
|
||||||
context.enqueueWork {
|
context.enqueueWork {
|
||||||
context.player().matteryPlayer.reloadResearch(context.player().registryAccess())
|
minecraft.player?.matteryPlayer?.reloadResearch(MINECRAFT_SERVER.registryAccess())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,12 +331,10 @@ object MatteryGUI {
|
|||||||
fun onLayerRenderEvent(event: RenderGuiLayerEvent.Pre) {
|
fun onLayerRenderEvent(event: RenderGuiLayerEvent.Pre) {
|
||||||
val gui = minecraft.gui
|
val gui = minecraft.gui
|
||||||
|
|
||||||
if (minecraft.gameMode?.canHurtPlayer() == true && !minecraft.options.hideGui) {
|
if (event.name == VanillaGuiLayers.FOOD_LEVEL || event.name == VanillaGuiLayers.AIR_LEVEL) {
|
||||||
if (event.name == VanillaGuiLayers.FOOD_LEVEL || event.name == VanillaGuiLayers.AIR_LEVEL) {
|
renderFoodAndAir(event, gui)
|
||||||
renderFoodAndAir(event, gui)
|
} else if (event.name == VanillaGuiLayers.PLAYER_HEALTH) {
|
||||||
} else if (event.name == VanillaGuiLayers.PLAYER_HEALTH) {
|
renderPlayerHealth(event, gui)
|
||||||
renderPlayerHealth(event, gui)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,6 @@ import ru.dbotthepony.mc.otm.core.writeComponent
|
|||||||
import ru.dbotthepony.mc.otm.core.writeItemType
|
import ru.dbotthepony.mc.otm.core.writeItemType
|
||||||
import ru.dbotthepony.mc.otm.matter.MatterManager.Finder
|
import ru.dbotthepony.mc.otm.matter.MatterManager.Finder
|
||||||
import ru.dbotthepony.mc.otm.milliTime
|
import ru.dbotthepony.mc.otm.milliTime
|
||||||
import ru.dbotthepony.mc.otm.onceServer
|
|
||||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||||
import ru.dbotthepony.mc.otm.registry.RegistryDelegate
|
import ru.dbotthepony.mc.otm.registry.RegistryDelegate
|
||||||
import ru.dbotthepony.mc.otm.secondTime
|
import ru.dbotthepony.mc.otm.secondTime
|
||||||
@ -1772,16 +1771,8 @@ object MatterManager {
|
|||||||
|
|
||||||
LOGGER.debug("Encoding matter registry packets took ${time.millis}ms, (${totalSize} bytes total, $compressedSize bytes compressed)")
|
LOGGER.debug("Encoding matter registry packets took ${time.millis}ms, (${totalSize} bytes total, $compressedSize bytes compressed)")
|
||||||
|
|
||||||
/**
|
for (chunk in chunks) {
|
||||||
* Delay sending by one server tick;
|
distributor.invoke(chunk)
|
||||||
* this way client is guaranteed to be in "PLAY" state, with local player present.
|
|
||||||
* This hack is required because we manually compressing and splitting packet between multiple payloads,
|
|
||||||
* hence it is impossible to "read" parsed data from network directly, using provided RegistryFriendlyByteBuf.
|
|
||||||
*/
|
|
||||||
onceServer {
|
|
||||||
for (chunk in chunks) {
|
|
||||||
distributor.invoke(chunk)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user