Merge branch 'mc1.15/dev' into mc1.16/dev

# Conflicts:
#	src/main/java/com/simibubi/create/foundation/config/CClient.java
#	src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java
This commit is contained in:
zelophed 2021-04-03 01:00:57 +02:00
commit e05eb5c386
2 changed files with 19 additions and 7 deletions

View file

@ -18,11 +18,11 @@ public class CClient extends ConfigBase {
"Offset the overlay from goggle- and hover- information by this many pixels on the X axis; Use /create overlay");
public ConfigInt overlayOffsetY = i(0, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetY",
"Offset the overlay from goggle- and hover- information by this many pixels on the Y axis; Use /create overlay");
public ConfigBool smoothPlacementIndicator = b(false, "smoothPlacementIndicator",
"Use an alternative indicator when showing where the assisted placement ends up relative to your crosshair");
public ConfigEnum<PlacementIndicatorSetting> placementIndicator = e(PlacementIndicatorSetting.TEXTURE, "placementIndicator", "What indicator should be used when showing where the assisted placement ends up relative to your crosshair");
public ConfigBool ignoreFabulousWarning = b(false, "ignoreFabulousWarning", "Setting this to true will prevent Create from sending you a warning when playing with Fabulous graphics enabled");
public ConfigGroup placementAssist = group(1, "placementAssist", "Settings for the Placement Assist");
public ConfigEnum<PlacementIndicatorSetting> placementIndicator = e(PlacementIndicatorSetting.TEXTURE, "indicatorType", "What indicator should be used when showing where the assisted placement ends up relative to your crosshair", "Choose 'NONE' to disable the Indicator altogether");
public ConfigFloat indicatorScale = f(1.0f, 0f, "indicatorScale", "Change the size of the Indicator by this multiplier");
public ConfigGroup ponder = group(1, "ponder", "Ponder settings");
public ConfigBool comfyReading =
b(false, "comfyReading", "Slow down a ponder scene whenever there is text on screen.");

View file

@ -29,11 +29,19 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import org.lwjgl.opengl.GL11;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.config.CClient;
import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingAngle;
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
@Mod.EventBusSubscriber
public class PlacementHelpers {
@ -214,6 +222,8 @@ public class PlacementHelpers {
ms.translate(centerX, centerY, 0);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle.get(0)));
//RenderSystem.rotatef(snappedAngle, 0, 0, 1);
double scale = AllConfigs.CLIENT.indicatorScale.get();
RenderSystem.scaled(scale, scale, 1);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferbuilder = tessellator.getBuffer();
@ -249,7 +259,9 @@ public class PlacementHelpers {
RenderSystem.shadeModel(GL11.GL_SMOOTH);
ms.translate(centerX, centerY, 0);
ms.scale(12, 12, 0);
float scale = AllConfigs.CLIENT.indicatorScale.get().floatValue();
ms.scale(scale, scale, 1);
ms.scale(12, 12, 1);
float index = snappedAngle / 22.5f;
float tex_size = 16f/256f;