Fixed not being able to load mod with latest Create mod version: Updated Flyweel dependency to 0.6.9. Updated russian translation.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
mod_version = 3.1
|
||||
mod_version = 3.3
|
||||
artifact_minecraft_version = 1.19.2
|
||||
|
||||
minecraft_version = 1.19.2
|
||||
@@ -17,4 +17,4 @@ cursegradle_version = 1.4.0
|
||||
parchment_version = 2022.11.06
|
||||
|
||||
flywheel_minecraft_version = 1.19.2
|
||||
flywheel_version = 0.6.8.a-14
|
||||
flywheel_version = 0.6.9-18
|
||||
@@ -1,6 +1,7 @@
|
||||
package nl.requios.effortlessbuilding.create.foundation.render;
|
||||
|
||||
import com.jozufozu.flywheel.core.model.ModelUtil;
|
||||
import com.jozufozu.flywheel.core.model.ShadeSeparatedBufferedData;
|
||||
import com.jozufozu.flywheel.util.Pair;
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
@@ -22,8 +23,10 @@ public class BakedModelRenderHelper {
|
||||
}
|
||||
|
||||
public static SuperByteBuffer standardModelRender(BakedModel model, BlockState referenceState, PoseStack ms) {
|
||||
Pair<RenderedBuffer, Integer> pair = ModelUtil.getBufferBuilder(model, referenceState, ms);
|
||||
return new SuperByteBuffer(pair.first(), pair.second());
|
||||
ShadeSeparatedBufferedData data = ModelUtil.getBufferedData(model, referenceState, ms);
|
||||
SuperByteBuffer sbb = new SuperByteBuffer(data);
|
||||
data.release();
|
||||
return sbb;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
package nl.requios.effortlessbuilding.create.foundation.render;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.function.IntPredicate;
|
||||
|
||||
import com.jozufozu.flywheel.api.vertex.ShadedVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexList;
|
||||
import com.jozufozu.flywheel.backend.ShadersModHandler;
|
||||
import com.jozufozu.flywheel.core.model.ShadeSeparatedBufferedData;
|
||||
import com.jozufozu.flywheel.core.vertex.BlockVertexList;
|
||||
import com.jozufozu.flywheel.util.DiffuseLightCalculator;
|
||||
import com.jozufozu.flywheel.util.transform.TStack;
|
||||
import com.jozufozu.flywheel.util.transform.Transform;
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder.DrawState;
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.mojang.math.*;
|
||||
import com.mojang.math.Matrix3f;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import com.mojang.math.Quaternion;
|
||||
import com.mojang.math.Vector3f;
|
||||
import com.mojang.math.Vector4f;
|
||||
import nl.requios.effortlessbuilding.create.foundation.block.render.SpriteShiftEntry;
|
||||
import nl.requios.effortlessbuilding.create.foundation.utility.Color;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2IntMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -26,10 +35,11 @@ import net.minecraft.world.level.Level;
|
||||
|
||||
public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<SuperByteBuffer> {
|
||||
|
||||
private final ShadedVertexList template;
|
||||
private final VertexList template;
|
||||
private final IntPredicate shadedPredicate;
|
||||
|
||||
// Vertex Position
|
||||
private final PoseStack transforms;
|
||||
private final PoseStack transforms = new PoseStack();
|
||||
|
||||
// Vertex Coloring
|
||||
private boolean shouldColor;
|
||||
@@ -57,11 +67,28 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||
// Temporary
|
||||
private static final Long2IntMap WORLD_LIGHT_CACHE = new Long2IntOpenHashMap();
|
||||
|
||||
public SuperByteBuffer(RenderedBuffer buf, int unshadedStartVertex) {
|
||||
DrawState drawState = buf.drawState();
|
||||
template = new BlockVertexList.Shaded(buf.vertexBuffer(), drawState.vertexCount(), drawState.format().getVertexSize(), unshadedStartVertex);
|
||||
public SuperByteBuffer(ByteBuffer vertexBuffer, BufferBuilder.DrawState drawState, int unshadedStartVertex) {
|
||||
int vertexCount = drawState.vertexCount();
|
||||
int stride = drawState.format().getVertexSize();
|
||||
|
||||
ShadedVertexList template = new BlockVertexList.Shaded(vertexBuffer, vertexCount, stride, unshadedStartVertex);
|
||||
shadedPredicate = template::isShaded;
|
||||
this.template = template;
|
||||
|
||||
transforms.pushPose();
|
||||
}
|
||||
|
||||
public SuperByteBuffer(ShadeSeparatedBufferedData data) {
|
||||
this(data.vertexBuffer(), data.drawState(), data.unshadedStartVertex());
|
||||
}
|
||||
|
||||
public SuperByteBuffer(ByteBuffer vertexBuffer, BufferBuilder.DrawState drawState) {
|
||||
int vertexCount = drawState.vertexCount();
|
||||
int stride = drawState.format().getVertexSize();
|
||||
|
||||
template = new BlockVertexList(vertexBuffer, vertexCount, stride);
|
||||
shadedPredicate = index -> true;
|
||||
|
||||
transforms = new PoseStack();
|
||||
transforms.pushPose();
|
||||
}
|
||||
|
||||
@@ -143,7 +170,7 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||
if (disableDiffuseMult) {
|
||||
builder.color(r, g, b, a);
|
||||
} else {
|
||||
float instanceDiffuse = diffuseCalculator.getDiffuse(nx, ny, nz, template.isShaded(i));
|
||||
float instanceDiffuse = diffuseCalculator.getDiffuse(nx, ny, nz, shadedPredicate.test(i));
|
||||
int colorR = transformColor(r, instanceDiffuse);
|
||||
int colorG = transformColor(g, instanceDiffuse);
|
||||
int colorB = transformColor(b, instanceDiffuse);
|
||||
@@ -222,6 +249,10 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||
return template.isEmpty();
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
template.delete();
|
||||
}
|
||||
|
||||
public PoseStack getTransforms() {
|
||||
return transforms;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
modLoader="javafml"
|
||||
# Forge for 1.17.1 is version 37
|
||||
loaderVersion="[41,)"
|
||||
loaderVersion="[40,)"
|
||||
license="GNU LESSER GENERAL PUBLIC LICENSE"
|
||||
issueTrackerURL="https://bitbucket.org/Requios/effortless-building/issues?status=new&status=open"
|
||||
showAsResourcePack=false
|
||||
@@ -20,20 +19,20 @@ Makes building easier by providing tools like mirrors, arrays, build modes and a
|
||||
[[dependencies.effortlessbuilding]]
|
||||
modId="forge"
|
||||
mandatory=true
|
||||
versionRange="[43.0.0,)"
|
||||
versionRange="[40.2.4,)"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
[[dependencies.effortlessbuilding]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.19.1,1.20)"
|
||||
versionRange="[1.19,1.20)"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
[[dependencies.effortlessbuilding]]
|
||||
modId="flywheel"
|
||||
mandatory=true
|
||||
versionRange="[0.6.8,0.6.9)"
|
||||
versionRange="[0.6.9,0.6.10)"
|
||||
ordering="AFTER"
|
||||
side="CLIENT"
|
||||
@@ -52,10 +52,22 @@
|
||||
|
||||
"effortlessbuilding.action.undo": "Отмена",
|
||||
"effortlessbuilding.action.redo": "Возврат",
|
||||
"effortlessbuilding.action.replace": "Замещение",
|
||||
"effortlessbuilding.action.open_modifier_settings": "Модификаторы",
|
||||
"effortlessbuilding.action.open_player_settings": "Открыть настройки",
|
||||
|
||||
"effortlessbuilding.action.replace": "Замещение",
|
||||
|
||||
"effortlessbuilding.action.replace_only_air": "Замещать только воздух",
|
||||
"effortlessbuilding.action.replace_only_air.description": "Замещаются только блоки воздуха. Нетвёрдые блоки, например, трава, по-прежнему замещаются.",
|
||||
"effortlessbuilding.action.replace_blocks_and_air": "Замещать всё",
|
||||
"effortlessbuilding.action.replace_blocks_and_air.description": "Замещаются как блоки, так и воздух.",
|
||||
"effortlessbuilding.action.replace_only_blocks": "Замещать только блоки",
|
||||
"effortlessbuilding.action.replace_only_blocks.description": "Замещаются только блоки, не воздух.",
|
||||
"effortlessbuilding.action.replace_filtered_by_offhand": "Фильтр по второй руке",
|
||||
"effortlessbuilding.action.replace_filtered_by_offhand.description": "Замещаются только блоки, совпадающие с блоком во второй руке. Если она пуста, замещается только воздух. Если во второй руке рандомизатор, замещаются только блоки, совпадающие с таковыми в рандомизаторе.",
|
||||
"effortlessbuilding.action.toggle_protect_tile_entities": "Сохранять блоки-сущности",
|
||||
"effortlessbuilding.action.toggle_protect_tile_entities.description": "Хранящие данные блоки, такие как сундуки, печи и воронки, не будут замещены.",
|
||||
|
||||
"effortlessbuilding.action.build_speed": "Размещение",
|
||||
"effortlessbuilding.action.filling": "Режим заполнения",
|
||||
"effortlessbuilding.action.raised_edge": "Кромка",
|
||||
@@ -75,5 +87,18 @@
|
||||
"effortlessbuilding.action.start_center": "Центр",
|
||||
"effortlessbuilding.action.start_corner": "Угол",
|
||||
|
||||
"commands.reach.usage": "/reach <уровень>"
|
||||
"commands.reach.usage": "/reach <уровень>",
|
||||
|
||||
"effortlessbuilding.gui.scrollInput.defaultTitle": "Выберите опцию:",
|
||||
"effortlessbuilding.gui.scrollInput.scrollToModify": "Прокрутить для изменения",
|
||||
"effortlessbuilding.gui.scrollInput.scrollToAdjustAmount": "Прокрутить для подгонки количества",
|
||||
"effortlessbuilding.gui.scrollInput.scrollToSelect": "Прокрутить для выбора",
|
||||
"effortlessbuilding.gui.scrollInput.shiftScrollsFaster": "Shift ускоряет прокрутку",
|
||||
"effortlessbuilding.gui.scrollInput.controlScrollsSlower": "Ctrl замедляет прокрутку",
|
||||
|
||||
"effortlessbuilding.tooltip.holdForDescription": "Зажмите [%1$s] для описания",
|
||||
"effortlessbuilding.tooltip.holdForControls": "Зажмите [%1$s] для управления",
|
||||
"effortlessbuilding.tooltip.keyShift": "Shift",
|
||||
"effortlessbuilding.tooltip.keyCtrl": "Ctrl",
|
||||
"effortlessbuilding.tooltip.keybind": "[%1$s]"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user