Merge branch '1.19.4' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.3
This commit is contained in:
commit
44183a45a8
@ -331,6 +331,12 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
|
|||||||
}
|
}
|
||||||
.save(serializer, modLocation("regular/industrial_glass"))
|
.save(serializer, modLocation("regular/industrial_glass"))
|
||||||
|
|
||||||
|
CraftEntry(MItems.FLUID_TANK, "Liquid Packaging",
|
||||||
|
russianName = "Упаковка для жидкостей").make(serializer, glass, translation)
|
||||||
|
|
||||||
|
CraftEntry(MItems.FLUID_CAPSULE, "Liquid Canning",
|
||||||
|
russianName = "Банка для жидкостей").make(serializer, glass, translation)
|
||||||
|
|
||||||
AdvancementBuilder()
|
AdvancementBuilder()
|
||||||
.parent(glass)
|
.parent(glass)
|
||||||
.display(
|
.display(
|
||||||
@ -560,7 +566,7 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
|
|||||||
.addCriterion("pill4", criterion(MItems.PILL_OBLIVION))
|
.addCriterion("pill4", criterion(MItems.PILL_OBLIVION))
|
||||||
.save(serializer, modLocation("regular/all_pills"))
|
.save(serializer, modLocation("regular/all_pills"))
|
||||||
|
|
||||||
AdvancementBuilder()
|
val essenceCapsule = AdvancementBuilder()
|
||||||
.parent(root)
|
.parent(root)
|
||||||
.display(
|
.display(
|
||||||
itemStack = ItemStack(MItems.ESSENCE_CAPSULE),
|
itemStack = ItemStack(MItems.ESSENCE_CAPSULE),
|
||||||
@ -589,4 +595,7 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
|
|||||||
)
|
)
|
||||||
.addCriterion("damage", NailedEntityTrigger.Instance().criterion())
|
.addCriterion("damage", NailedEntityTrigger.Instance().criterion())
|
||||||
.save(serializer, modLocation("regular/explosive_hammer"))
|
.save(serializer, modLocation("regular/explosive_hammer"))
|
||||||
|
|
||||||
|
CraftEntry(MItems.ESSENCE_STORAGE.values, "Did not Forgot to Remember",
|
||||||
|
russianName = "Не забыл запомнить").make(serializer, essenceCapsule, translation)
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ import java.util.function.Consumer
|
|||||||
|
|
||||||
typealias AdvancementHolder = Advancement
|
typealias AdvancementHolder = Advancement
|
||||||
|
|
||||||
private data class CraftEntry(
|
data class CraftEntry(
|
||||||
val item: Collection<Item>,
|
val item: Collection<Item>,
|
||||||
val englishName: String,
|
val englishName: String,
|
||||||
val englishSuffix: String? = null,
|
val englishSuffix: String? = null,
|
||||||
@ -108,6 +108,12 @@ fun addMachineAdvancements(serializer: Consumer<AdvancementHolder>, lang: Matter
|
|||||||
CraftEntry(MItems.TWIN_PLATE_PRESS.values, "Twice the Thud",
|
CraftEntry(MItems.TWIN_PLATE_PRESS.values, "Twice the Thud",
|
||||||
russianName = "Двойной стук").make(serializer, press, translation)
|
russianName = "Двойной стук").make(serializer, press, translation)
|
||||||
|
|
||||||
|
CraftEntry(MItems.ENERGY_SERVO.values, "Power Goes In, Powered Things Go Out",
|
||||||
|
russianName = "Энергия на вход, электроинструмент на выход").make(serializer, press, translation)
|
||||||
|
|
||||||
|
CraftEntry(MItems.ENERGY_SERVO.values, "Power Goes In, Powered Things Go Out",
|
||||||
|
russianName = "Энергия на вход, электроинструмент на выход").make(serializer, press, translation)
|
||||||
|
|
||||||
val scanner = CraftEntry(MItems.MATTER_SCANNER.values, "Scanning Things that Matter",
|
val scanner = CraftEntry(MItems.MATTER_SCANNER.values, "Scanning Things that Matter",
|
||||||
russianName = "Сканируем вещи которые материальны")
|
russianName = "Сканируем вещи которые материальны")
|
||||||
val decomposer = CraftEntry(MItems.MATTER_DECOMPOSER.values, "Decaying the Atoms", "Keep your limbs outside of the working chamber at all times",
|
val decomposer = CraftEntry(MItems.MATTER_DECOMPOSER.values, "Decaying the Atoms", "Keep your limbs outside of the working chamber at all times",
|
||||||
|
@ -896,7 +896,7 @@ private fun gui(provider: MatteryLanguageProvider) {
|
|||||||
gui("experience.set_exact", "Set your experience level to %s")
|
gui("experience.set_exact", "Set your experience level to %s")
|
||||||
|
|
||||||
gui("essence_capsule", "(Almost) Everything you ever knew is within")
|
gui("essence_capsule", "(Almost) Everything you ever knew is within")
|
||||||
gui("essence_capsule2", "This item can be recycled at Essence Servo")
|
gui("essence_capsule2", "This item can be recycled at Essence Storage")
|
||||||
gui("essence_capsule3", "Use to break free most of stored knowledge")
|
gui("essence_capsule3", "Use to break free most of stored knowledge")
|
||||||
gui("essence_capsule.digital", "Use to scan memories stored within")
|
gui("essence_capsule.digital", "Use to scan memories stored within")
|
||||||
|
|
||||||
|
@ -323,4 +323,32 @@ fun addPainterRecipes(consumer: RecipeOutput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
consumer.accept(PainterArmorDyeRecipe(modLocation("painter/armor_clear_dye"), mapOf(null to 15)).toFinished())
|
consumer.accept(PainterArmorDyeRecipe(modLocation("painter/armor_clear_dye"), mapOf(null to 15)).toFinished())
|
||||||
|
|
||||||
|
consumer.accept(PainterRecipe(
|
||||||
|
modLocation("painter/tritanium_yellow_stripe"),
|
||||||
|
Ingredient.of(MRegistry.TRITANIUM_BLOCK.item),
|
||||||
|
ItemStack(MItems.TRITANIUM_STRIPED_BLOCK),
|
||||||
|
mapOf(DyeColor.YELLOW to 1)
|
||||||
|
).toFinished())
|
||||||
|
|
||||||
|
consumer.accept(PainterRecipe(
|
||||||
|
modLocation("painter/tritanium_yellow_stripe_stairs"),
|
||||||
|
Ingredient.of(MRegistry.TRITANIUM_STAIRS.item),
|
||||||
|
ItemStack(MItems.TRITANIUM_STRIPED_STAIRS),
|
||||||
|
mapOf(DyeColor.YELLOW to 1)
|
||||||
|
).toFinished())
|
||||||
|
|
||||||
|
consumer.accept(PainterRecipe(
|
||||||
|
modLocation("painter/tritanium_yellow_stripe_slab"),
|
||||||
|
Ingredient.of(MRegistry.TRITANIUM_SLAB.item),
|
||||||
|
ItemStack(MItems.TRITANIUM_STRIPED_SLAB),
|
||||||
|
mapOf(DyeColor.YELLOW to 1)
|
||||||
|
).toFinished())
|
||||||
|
|
||||||
|
consumer.accept(PainterRecipe(
|
||||||
|
modLocation("painter/tritanium_yellow_stripe_wall"),
|
||||||
|
Ingredient.of(MRegistry.TRITANIUM_WALL.item),
|
||||||
|
ItemStack(MItems.TRITANIUM_STRIPED_WALL),
|
||||||
|
mapOf(DyeColor.YELLOW to 1)
|
||||||
|
).toFinished())
|
||||||
}
|
}
|
||||||
|
@ -535,6 +535,8 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
|||||||
waitForServerLevel.forEach { it.invoke() }
|
waitForServerLevel.forEach { it.invoke() }
|
||||||
} else {
|
} else {
|
||||||
waitForServerLevel.clear()
|
waitForServerLevel.clear()
|
||||||
|
|
||||||
|
BlockEntitySyncPacket.applyBacklog(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ object MachinesConfig : AbstractConfig("machines") {
|
|||||||
|
|
||||||
private val CHEMICAL_GENERATOR = workerValues(
|
private val CHEMICAL_GENERATOR = workerValues(
|
||||||
MNames.CHEMICAL_GENERATOR,
|
MNames.CHEMICAL_GENERATOR,
|
||||||
energyStorage = Decimal(24_000),
|
energyStorage = Decimal(32_000),
|
||||||
energyThroughput = Decimal(160),
|
energyThroughput = Decimal(160),
|
||||||
energyConsumption = Decimal(40),
|
energyConsumption = Decimal(40),
|
||||||
workTimeMultiplier = null
|
workTimeMultiplier = null
|
||||||
@ -80,7 +80,7 @@ object MachinesConfig : AbstractConfig("machines") {
|
|||||||
|
|
||||||
object ChemicalGenerator {
|
object ChemicalGenerator {
|
||||||
val VALUES by ::CHEMICAL_GENERATOR
|
val VALUES by ::CHEMICAL_GENERATOR
|
||||||
val RATIO: Int by builder.comment("This amount of burn ticks result in 1 generation tick").defineInRange("RATIO", 4, 0)
|
val RATIO: Int by builder.comment("This amount of burn ticks result in 1 generation tick").defineInRange("RATIO", 2, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
object MatterBottler {
|
object MatterBottler {
|
||||||
|
@ -69,9 +69,7 @@ class BlockEntitySyncPacket(val position: BlockPos, val buffer: ByteArray, val v
|
|||||||
val blockEntity = level.getBlockEntity(position)
|
val blockEntity = level.getBlockEntity(position)
|
||||||
|
|
||||||
if (blockEntity == null) {
|
if (blockEntity == null) {
|
||||||
LOGGER.warn("Putting BlockEntitySyncPacket received for $position into backlog because there is literally no block entity there!")
|
LOGGER.warn("Putting BlockEntitySyncPacket received for $position into backlog because there is literally no block entity there! This is CERTAINLY a bug in one of optimizing mods you have or server has installed! This might cause memory leak.")
|
||||||
LOGGER.warn("This is CERTAINLY a bug in one of optimizing mods you have or server has installed!")
|
|
||||||
LOGGER.warn("This can cause memory leak.")
|
|
||||||
|
|
||||||
backlog.computeIfAbsent(level) { Object2ObjectOpenHashMap() }
|
backlog.computeIfAbsent(level) { Object2ObjectOpenHashMap() }
|
||||||
.computeIfAbsent(position, Object2ObjectFunction { ArrayList() })
|
.computeIfAbsent(position, Object2ObjectFunction { ArrayList() })
|
||||||
@ -88,6 +86,8 @@ class BlockEntitySyncPacket(val position: BlockPos, val buffer: ByteArray, val v
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (packets != null) {
|
if (packets != null) {
|
||||||
|
LOGGER.info("Unfolding ${packets.size} backlog packets for $position (${level.getBlockState(position)}/$blockEntity)")
|
||||||
|
|
||||||
for (packet in packets) {
|
for (packet in packets) {
|
||||||
blockEntity.synchronizer.read(FastByteArrayInputStream(packet.buffer, 0, packet.validBytes))
|
blockEntity.synchronizer.read(FastByteArrayInputStream(packet.buffer, 0, packet.validBytes))
|
||||||
}
|
}
|
||||||
@ -115,6 +115,22 @@ class BlockEntitySyncPacket(val position: BlockPos, val buffer: ByteArray, val v
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val LOGGER = LogManager.getLogger()
|
private val LOGGER = LogManager.getLogger()
|
||||||
|
|
||||||
|
internal fun applyBacklog(blockEntity: MatteryBlockEntity) {
|
||||||
|
val packets = backlog[blockEntity.level]?.remove(blockEntity.blockPos)
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (packets != null) {
|
||||||
|
LOGGER.info("Unfolding ${packets.size} backlog packets for ${blockEntity.blockPos} (${blockEntity.level!!.getBlockState(blockEntity.blockPos)}/$blockEntity)")
|
||||||
|
|
||||||
|
for (packet in packets) {
|
||||||
|
blockEntity.synchronizer.read(FastByteArrayInputStream(packet.buffer, 0, packet.validBytes))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch(err: Throwable) {
|
||||||
|
LOGGER.error("Exception while reading synchronized BlockEntity data!\nPosition: ${blockEntity.blockPos}\nBlock: ${blockEntity.level!!.getBlockState(blockEntity.blockPos)}\nBlock entity: $blockEntity", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user