mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 14:36:29 +01:00
The Magic Formula
- Re-enable the computercraft integration - Some ponder oddities - Update pack format
This commit is contained in:
parent
2a93caf5c7
commit
193c905f24
8 changed files with 58 additions and 52 deletions
|
@ -188,8 +188,8 @@ dependencies {
|
|||
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}+${curios_minecraft_version}")
|
||||
|
||||
if (cc_tweaked_enable.toBoolean()) {
|
||||
compileOnly fg.deobf("cc.tweaked:cc-tweaked-${cc_tweaked_minecraft_version}-forge-api:${cc_tweaked_version}:cc-tweaked-${cc_tweaked_minecraft_version}-forge-api-${cc_tweaked_version}")
|
||||
runtimeOnly fg.deobf("cc.tweaked:cc-tweaked-${cc_tweaked_minecraft_version}-forge:${cc_tweaked_version}:cc-tweaked-${cc_tweaked_minecraft_version}-forge-${cc_tweaked_version}")
|
||||
compileOnly fg.deobf("cc.tweaked:cc-tweaked-${cc_tweaked_minecraft_version}-forge-api:${cc_tweaked_version}")
|
||||
runtimeOnly fg.deobf("cc.tweaked:cc-tweaked-${cc_tweaked_minecraft_version}-forge:${cc_tweaked_version}")
|
||||
}
|
||||
|
||||
// implementation fg.deobf("curse.maven:druidcraft-340991:3101903")
|
||||
|
|
|
@ -29,9 +29,9 @@ jei_version = 15.2.0.22
|
|||
curios_minecraft_version = 1.20.1
|
||||
curios_version = 5.2.0-beta.3
|
||||
|
||||
cc_tweaked_enable = false
|
||||
cc_tweaked_minecraft_version = 1.19.3
|
||||
cc_tweaked_version = 1.103.1
|
||||
cc_tweaked_enable = true
|
||||
cc_tweaked_minecraft_version = 1.20.1
|
||||
cc_tweaked_version = 1.105.0
|
||||
|
||||
# curseforge information
|
||||
projectId = 328085
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.compat.computercraft;
|
|||
import java.util.function.Function;
|
||||
|
||||
import com.simibubi.create.compat.Mods;
|
||||
import com.simibubi.create.compat.computercraft.implementation.ComputerBehaviour;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
|
||||
public class ComputerCraftProxy {
|
||||
|
@ -14,7 +15,7 @@ public class ComputerCraftProxy {
|
|||
|
||||
private static void registerWithDependency() {
|
||||
/* Comment if computercraft.implementation is not in the source set */
|
||||
// computerFactory = ComputerBehaviour::new;
|
||||
computerFactory = ComputerBehaviour::new;
|
||||
}
|
||||
|
||||
private static Function<SmartBlockEntity, ? extends AbstractComputerBehaviour> fallbackFactory;
|
||||
|
|
|
@ -65,6 +65,7 @@ public class PonderWorld extends SchematicWorld {
|
|||
|
||||
int overrideLight;
|
||||
Selection mask;
|
||||
boolean currentlyTickingEntities;
|
||||
|
||||
public PonderWorld(BlockPos anchor, Level original) {
|
||||
super(anchor, original);
|
||||
|
@ -147,6 +148,8 @@ public class PonderWorld extends SchematicWorld {
|
|||
public BlockState getBlockState(BlockPos globalPos) {
|
||||
if (mask != null && !mask.test(globalPos.subtract(anchor)))
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
if (currentlyTickingEntities && globalPos.getY() < 0)
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
return super.getBlockState(globalPos);
|
||||
}
|
||||
|
||||
|
@ -194,6 +197,8 @@ public class PonderWorld extends SchematicWorld {
|
|||
}
|
||||
|
||||
public void tick() {
|
||||
currentlyTickingEntities = true;
|
||||
|
||||
particles.tick();
|
||||
|
||||
for (Iterator<Entity> iterator = entities.iterator(); iterator.hasNext();) {
|
||||
|
@ -204,13 +209,15 @@ public class PonderWorld extends SchematicWorld {
|
|||
entity.yOld = entity.getY();
|
||||
entity.zOld = entity.getZ();
|
||||
entity.tick();
|
||||
|
||||
|
||||
if (entity.getY() <= -.5f)
|
||||
entity.discard();
|
||||
|
||||
if (!entity.isAlive())
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
currentlyTickingEntities = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -333,10 +333,6 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
|||
overlayMS = new PoseStack();
|
||||
overlayMS.last().pose().set(ms.last().pose());
|
||||
overlayMS.last().normal().set(ms.last().normal());
|
||||
|
||||
float scaleFactor = world.scene.getScaleFactor();
|
||||
float f = (float) Math.pow(30 * scaleFactor, -1.2);
|
||||
overlayMS.scale(f, f, f);
|
||||
}
|
||||
|
||||
VertexConsumer builder = new SheetedDecalTextureGenerator(
|
||||
|
|
|
@ -9,14 +9,12 @@ import org.apache.commons.lang3.mutable.MutableInt;
|
|||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.mojang.blaze3d.platform.Window;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||
import com.simibubi.create.foundation.gui.Theme;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.ponder.PonderLocalization;
|
||||
import com.simibubi.create.foundation.ponder.PonderTooltipHandler;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
@ -136,45 +134,51 @@ public abstract class NavigatableSimiScreen extends AbstractSimiScreen {
|
|||
|
||||
PoseStack ms = graphics.pose();
|
||||
|
||||
Screen lastScreen = ScreenOpener.getPreviouslyRenderedScreen();
|
||||
// Screen lastScreen = ScreenOpener.getPreviouslyRenderedScreen();
|
||||
float transitionValue = transition.getValue(partialTicks);
|
||||
float scale = 1 + 0.5f * transitionValue;
|
||||
|
||||
|
||||
/*
|
||||
* Looks like this stopped working sometime before 1.18
|
||||
* Now commented as it does mess with the background alpha since 1.20
|
||||
*/
|
||||
|
||||
// draw last screen into buffer
|
||||
if (lastScreen != null && lastScreen != this && !transition.settled()) {
|
||||
ms.pushPose();
|
||||
UIRenderHelper.framebuffer.clear(Minecraft.ON_OSX);
|
||||
ms.translate(0, 0, -1000);
|
||||
UIRenderHelper.framebuffer.bindWrite(true);
|
||||
PonderTooltipHandler.enable = false;
|
||||
// Using 0,0 for mouse coords to hide tooltips
|
||||
lastScreen.render(graphics, 0, 0, partialTicks);
|
||||
PonderTooltipHandler.enable = true;
|
||||
|
||||
ms.popPose();
|
||||
ms.pushPose();
|
||||
|
||||
// use the buffer texture
|
||||
minecraft.getMainRenderTarget()
|
||||
.bindWrite(true);
|
||||
|
||||
Window window = minecraft.getWindow();
|
||||
int dpx = window.getGuiScaledWidth() / 2;
|
||||
int dpy = window.getGuiScaledHeight() / 2;
|
||||
if (lastScreen instanceof NavigatableSimiScreen navigableScreen) {
|
||||
dpx = navigableScreen.depthPointX;
|
||||
dpy = navigableScreen.depthPointY;
|
||||
}
|
||||
|
||||
ms.translate(dpx, dpy, 0);
|
||||
ms.scale(scale, scale, 1);
|
||||
ms.translate(-dpx, -dpy, 0);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
UIRenderHelper.drawFramebuffer(1f - Math.abs(transitionValue));
|
||||
RenderSystem.disableBlend();
|
||||
ms.popPose();
|
||||
}
|
||||
// if (lastScreen != null && lastScreen != this && !transition.settled()) {
|
||||
// ms.pushPose();
|
||||
// UIRenderHelper.framebuffer.clear(Minecraft.ON_OSX);
|
||||
// ms.translate(0, 0, -1000);
|
||||
// UIRenderHelper.framebuffer.bindWrite(true);
|
||||
// PonderTooltipHandler.enable = false;
|
||||
// // Using 0,0 for mouse coords to hide tooltips
|
||||
// lastScreen.render(graphics, 0, 0, partialTicks);
|
||||
// PonderTooltipHandler.enable = true;
|
||||
//
|
||||
// ms.popPose();
|
||||
// ms.pushPose();
|
||||
//
|
||||
// // use the buffer texture
|
||||
// minecraft.getMainRenderTarget()
|
||||
// .bindWrite(true);
|
||||
//
|
||||
// Window window = minecraft.getWindow();
|
||||
// int dpx = window.getGuiScaledWidth() / 2;
|
||||
// int dpy = window.getGuiScaledHeight() / 2;
|
||||
// if (lastScreen instanceof NavigatableSimiScreen navigableScreen) {
|
||||
// dpx = navigableScreen.depthPointX;
|
||||
// dpy = navigableScreen.depthPointY;
|
||||
// }
|
||||
//
|
||||
// ms.translate(dpx, dpy, 0);
|
||||
// ms.scale(scale, scale, 1);
|
||||
// ms.translate(-dpx, -dpy, 0);
|
||||
// RenderSystem.enableBlend();
|
||||
// RenderSystem.defaultBlendFunc();
|
||||
// UIRenderHelper.drawFramebuffer(1f - Math.abs(transitionValue));
|
||||
// RenderSystem.disableBlend();
|
||||
// ms.popPose();
|
||||
// }
|
||||
|
||||
// modify current screen as well
|
||||
scale = transitionValue > 0 ? 1 - 0.5f * (1 - transitionValue) : 1 + .5f * (1 + transitionValue);
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"description": "Create resources",
|
||||
"pack_format": 10,
|
||||
"forge:resource_pack_format": 12,
|
||||
"forge:data_pack_format": 10
|
||||
"pack_format": 15
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"pack_format": 12,
|
||||
"pack_format": 15,
|
||||
"description": "Replacement textures for Vanilla Copper"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue