mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-14 08:16:42 +01:00
1.19.2 and improvements
- Update to 1.19.2 - SuperByteBuffer no longer accepts a null RenderedBuffer - Add datagen code for BiomeModifiers - Switch back to Parchment mappings
This commit is contained in:
parent
69b4973cac
commit
f7280b799c
11 changed files with 46 additions and 39 deletions
|
@ -39,8 +39,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
|
||||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||||
minecraft {
|
minecraft {
|
||||||
//mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}"
|
mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}"
|
||||||
mappings channel: 'official', version: "${minecraft_version}"
|
|
||||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
|
|
|
@ -5,10 +5,10 @@ org.gradle.daemon = false
|
||||||
|
|
||||||
# mod version info
|
# mod version info
|
||||||
mod_version = 0.5.0.d
|
mod_version = 0.5.0.d
|
||||||
artifact_minecraft_version = 1.19
|
artifact_minecraft_version = 1.19.2
|
||||||
|
|
||||||
minecraft_version = 1.19
|
minecraft_version = 1.19.2
|
||||||
forge_version = 41.0.110
|
forge_version = 43.0.8
|
||||||
|
|
||||||
# build dependency versions
|
# build dependency versions
|
||||||
forgegradle_version = 5.1.53
|
forgegradle_version = 5.1.53
|
||||||
|
@ -16,16 +16,16 @@ mixingradle_version = 0.7-SNAPSHOT
|
||||||
mixin_version = 0.8.5
|
mixin_version = 0.8.5
|
||||||
librarian_version = 1.+
|
librarian_version = 1.+
|
||||||
cursegradle_version = 1.4.0
|
cursegradle_version = 1.4.0
|
||||||
parchment_version = 2022.07.10
|
parchment_version = 2022.08.10
|
||||||
|
|
||||||
# dependency versions
|
# dependency versions
|
||||||
registrate_version = MC1.19-1.1.5
|
registrate_version = MC1.19-1.1.5
|
||||||
flywheel_minecraft_version = 1.19
|
flywheel_minecraft_version = 1.19.2
|
||||||
flywheel_version = 0.6.5-3
|
flywheel_version = 0.6.5-3
|
||||||
jei_minecraft_version = 1.19
|
jei_minecraft_version = 1.19.2
|
||||||
jei_version = 11.1.0.235
|
jei_version = 11.2.0.246
|
||||||
curios_minecraft_version = 1.19
|
curios_minecraft_version = 1.19.2
|
||||||
curios_version = 5.1.0.4
|
curios_version = 5.1.1.0
|
||||||
|
|
||||||
# curseforge information
|
# curseforge information
|
||||||
projectId = 328085
|
projectId = 328085
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.simibubi.create.content.contraptions.components.deployer;
|
||||||
import java.util.OptionalInt;
|
import java.util.OptionalInt;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
@ -10,10 +12,9 @@ import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.config.CKinetics;
|
import com.simibubi.create.foundation.config.CKinetics;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
import io.netty.util.concurrent.Future;
|
|
||||||
import io.netty.util.concurrent.GenericFutureListener;
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.network.Connection;
|
import net.minecraft.network.Connection;
|
||||||
|
import net.minecraft.network.PacketSendListener;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.protocol.Packet;
|
import net.minecraft.network.protocol.Packet;
|
||||||
import net.minecraft.network.protocol.PacketFlow;
|
import net.minecraft.network.protocol.PacketFlow;
|
||||||
|
@ -171,7 +172,7 @@ public class DeployerFakePlayer extends FakePlayer {
|
||||||
public void send(Packet<?> packetIn) {}
|
public void send(Packet<?> packetIn) {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void send(Packet<?> packetIn, GenericFutureListener<? extends Future<? super Void>> futureListeners) {}
|
public void send(Packet<?> p_243227_, @Nullable PacketSendListener p_243273_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ public class FlapDisplayRenderer extends KineticTileEntityRenderer {
|
||||||
dim = 0.75f;
|
dim = 0.75f;
|
||||||
}
|
}
|
||||||
|
|
||||||
GlyphInfo glyphinfo = fontset.getGlyphInfo(glyph);
|
GlyphInfo glyphinfo = fontset.getGlyphInfo(glyph, false);
|
||||||
float glyphWidth = glyphinfo.getAdvance(false);
|
float glyphWidth = glyphinfo.getAdvance(false);
|
||||||
|
|
||||||
if (!section.renderCharsIndividually() && section.spinning[0]) {
|
if (!section.renderCharsIndividually() && section.spinning[0]) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class NoShadowFontWrapper extends Font {
|
||||||
private Font wrapped;
|
private Font wrapped;
|
||||||
|
|
||||||
public NoShadowFontWrapper(Font wrapped) {
|
public NoShadowFontWrapper(Font wrapped) {
|
||||||
super(null);
|
super(null, false);
|
||||||
this.wrapped = wrapped;
|
this.wrapped = wrapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,6 @@ public class HighlightCommand {
|
||||||
BlockPos p = exception.getPosition();
|
BlockPos p = exception.getPosition();
|
||||||
String command = "/create highlight " + p.getX() + " " + p.getY() + " " + p.getZ();
|
String command = "/create highlight " + p.getX() + " " + p.getY() + " " + p.getZ();
|
||||||
return player.server.getCommands()
|
return player.server.getCommands()
|
||||||
.performCommand(source, command);
|
.performPrefixedCommand(source, command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,11 +55,11 @@ public class ConfigScreenList extends ObjectSelectionList<ConfigScreenList.Entry
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderList(PoseStack p_238478_1_, int p_238478_2_, int p_238478_3_, int p_238478_4_, int p_238478_5_, float p_238478_6_) {
|
protected void renderList(PoseStack p_239228_, int p_239229_, int p_239230_, float p_239231_) {
|
||||||
Window window = minecraft.getWindow();
|
Window window = minecraft.getWindow();
|
||||||
double d0 = window.getGuiScale();
|
double d0 = window.getGuiScale();
|
||||||
RenderSystem.enableScissor((int) (this.x0 * d0), (int) (window.getHeight() - (this.y1 * d0)), (int) (this.width * d0), (int) (this.height * d0));
|
RenderSystem.enableScissor((int) (this.x0 * d0), (int) (window.getHeight() - (this.y1 * d0)), (int) (this.width * d0), (int) (this.height * d0));
|
||||||
super.renderList(p_238478_1_, p_238478_2_, p_238478_3_, p_238478_4_, p_238478_5_, p_238478_6_);
|
super.renderList(p_239228_, p_239229_, p_239230_, p_239231_);
|
||||||
RenderSystem.disableScissor();
|
RenderSystem.disableScissor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class SubMenuConfigScreen extends ConfigScreen {
|
||||||
|
|
||||||
String command = change.annotations.get("Execute");
|
String command = change.annotations.get("Execute");
|
||||||
if (minecraft.player != null && command != null && command.startsWith("/")) {
|
if (minecraft.player != null && command != null && command.startsWith("/")) {
|
||||||
minecraft.player.chat(command);
|
minecraft.player.commandSigned(command.substring(1), null);
|
||||||
//AllPackets.channel.sendToServer(new CChatMessagePacket(command));
|
//AllPackets.channel.sendToServer(new CChatMessagePacket(command));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package com.simibubi.create.foundation.render;
|
package com.simibubi.create.foundation.render;
|
||||||
|
|
||||||
import java.util.function.IntPredicate;
|
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.vertex.ShadedVertexList;
|
import com.jozufozu.flywheel.api.vertex.ShadedVertexList;
|
||||||
import com.jozufozu.flywheel.api.vertex.VertexList;
|
|
||||||
import com.jozufozu.flywheel.backend.ShadersModHandler;
|
import com.jozufozu.flywheel.backend.ShadersModHandler;
|
||||||
import com.jozufozu.flywheel.core.vertex.BlockVertexList;
|
import com.jozufozu.flywheel.core.vertex.BlockVertexList;
|
||||||
import com.jozufozu.flywheel.util.DiffuseLightCalculator;
|
import com.jozufozu.flywheel.util.DiffuseLightCalculator;
|
||||||
|
@ -34,8 +31,7 @@ import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<SuperByteBuffer> {
|
public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<SuperByteBuffer> {
|
||||||
|
|
||||||
private final VertexList template;
|
private final ShadedVertexList template;
|
||||||
private final IntPredicate shadedPredicate;
|
|
||||||
|
|
||||||
// Vertex Position
|
// Vertex Position
|
||||||
private final PoseStack transforms;
|
private final PoseStack transforms;
|
||||||
|
@ -67,15 +63,9 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||||
private static final Long2IntMap WORLD_LIGHT_CACHE = new Long2IntOpenHashMap();
|
private static final Long2IntMap WORLD_LIGHT_CACHE = new Long2IntOpenHashMap();
|
||||||
|
|
||||||
public SuperByteBuffer(RenderedBuffer buf, int unshadedStartVertex) {
|
public SuperByteBuffer(RenderedBuffer buf, int unshadedStartVertex) {
|
||||||
if (buf != null) {
|
|
||||||
DrawState drawState = buf.drawState();
|
DrawState drawState = buf.drawState();
|
||||||
ShadedVertexList template = new BlockVertexList.Shaded(buf.vertexBuffer(), drawState.vertexCount(), drawState.format().getVertexSize(), unshadedStartVertex);
|
template = new BlockVertexList.Shaded(buf.vertexBuffer(), drawState.vertexCount(), drawState.format().getVertexSize(), unshadedStartVertex);
|
||||||
this.template = template;
|
|
||||||
shadedPredicate = template::isShaded;
|
|
||||||
} else {
|
|
||||||
this.template = null;
|
|
||||||
shadedPredicate = index -> true;
|
|
||||||
}
|
|
||||||
transforms = new PoseStack();
|
transforms = new PoseStack();
|
||||||
transforms.pushPose();
|
transforms.pushPose();
|
||||||
}
|
}
|
||||||
|
@ -158,7 +148,7 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||||
if (disableDiffuseMult) {
|
if (disableDiffuseMult) {
|
||||||
builder.color(r, g, b, a);
|
builder.color(r, g, b, a);
|
||||||
} else {
|
} else {
|
||||||
float instanceDiffuse = diffuseCalculator.getDiffuse(nx, ny, nz, shadedPredicate.test(i));
|
float instanceDiffuse = diffuseCalculator.getDiffuse(nx, ny, nz, template.isShaded(i));
|
||||||
int colorR = transformColor(r, instanceDiffuse);
|
int colorR = transformColor(r, instanceDiffuse);
|
||||||
int colorG = transformColor(g, instanceDiffuse);
|
int colorG = transformColor(g, instanceDiffuse);
|
||||||
int colorB = transformColor(b, instanceDiffuse);
|
int colorB = transformColor(b, instanceDiffuse);
|
||||||
|
@ -234,7 +224,7 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return template == null || template.isEmpty();
|
return template.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PoseStack getTransforms() {
|
public PoseStack getTransforms() {
|
||||||
|
|
|
@ -17,7 +17,9 @@ import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
|
import net.minecraftforge.common.world.BiomeModifier;
|
||||||
import net.minecraftforge.data.event.GatherDataEvent;
|
import net.minecraftforge.data.event.GatherDataEvent;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
public class AllOreFeatureConfigEntries {
|
public class AllOreFeatureConfigEntries {
|
||||||
public static final OreFeatureConfigEntry ZINC_ORE =
|
public static final OreFeatureConfigEntry ZINC_ORE =
|
||||||
|
@ -102,5 +104,20 @@ public class AllOreFeatureConfigEntries {
|
||||||
if (placedFeatureProvider != null) {
|
if (placedFeatureProvider != null) {
|
||||||
generator.addProvider(true, placedFeatureProvider);
|
generator.addProvider(true, placedFeatureProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
Map<ResourceLocation, BiomeModifier> biomeModifiers = new HashMap<>();
|
||||||
|
for (Map.Entry<ResourceLocation, OreFeatureConfigEntry> entry : OreFeatureConfigEntry.ALL.entrySet()) {
|
||||||
|
DatagenExtension datagenExt = entry.getValue().datagenExt();
|
||||||
|
if (datagenExt != null) {
|
||||||
|
biomeModifiers.put(entry.getKey(), datagenExt.createBiomeModifier(registryAccess));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DynamicDataProvider<BiomeModifier> biomeModifierProvider = DynamicDataProvider.create(generator, "Create's Biome Modifiers", registryAccess, ForgeRegistries.Keys.BIOME_MODIFIERS, biomeModifiers);
|
||||||
|
if (biomeModifierProvider != null) {
|
||||||
|
generator.addProvider(true, biomeModifierProvider);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
modLoader="javafml"
|
modLoader="javafml"
|
||||||
loaderVersion="[41,)"
|
loaderVersion="[43,)"
|
||||||
issueTrackerURL="https://github.com/Creators-of-Create/Create/issues"
|
issueTrackerURL="https://github.com/Creators-of-Create/Create/issues"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@ Technology that empowers the player.'''
|
||||||
[[dependencies.create]]
|
[[dependencies.create]]
|
||||||
modId="forge"
|
modId="forge"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[41.0.110,)"
|
versionRange="[43.0.0,)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
|
||||||
[[dependencies.create]]
|
[[dependencies.create]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[1.19,1.20)"
|
versionRange="[1.19.2,1.20)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue