Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void init() {

@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
super.renderBackground(guiGraphics, mouseY, mouseY, partialTicks);
// super.renderBackground(guiGraphics, mouseY, mouseY, partialTicks);
super.render(guiGraphics, mouseX, mouseY, partialTicks);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void init() {
this.right.addWidget(this.zoom);
this.right.addWidget(this.renderMode);
this.right.addWidget(this.seed);
this.right.addWidget(this.preview);
// this.right.addWidget(this.preview);
}

@Override
Expand Down Expand Up @@ -218,7 +218,7 @@ public void renderWidget(GuiGraphics guiGraphics, int mx, int my, float partialT
int y = this.getY();

this.height = this.getWidth();
guiGraphics.blit(RenderType::guiTextured, this.textureId, x, y, 0, 0, this.width, this.height, this.width, this.height);
// guiGraphics.blit(RenderType::guiTextured, this.textureId, x, y, 0, 0, this.width, this.height, this.width, this.height);

this.updateLegend(mx, my);

Expand Down Expand Up @@ -269,37 +269,37 @@ private float getLegendScale() {

private void renderLegend(GuiGraphics guiGraphics, int mx, int my, Component[] labels, String[] values, int left, int top, int lineHeight, int color) {
float scale = this.getLegendScale();
PoseStack pose = guiGraphics.pose();
// PoseStack pose = guiGraphics.pose();

pose.pushPose();
pose.translate(left + 3.75F * scale, top - lineHeight * (3.2F * scale), 0);
pose.scale(scale, scale, 1);
Minecraft mc = Minecraft.getInstance();
Font renderer = mc.font;
int spacing = 0;
for (Component s : labels) {
spacing = Math.max(spacing, renderer.width(s));
}
float maxWidth = (this.width - 4) / scale;
for (int i = 0; i < labels.length && i < values.length; i++) {
Component label = labels[i];
String value = values[i];
while (value.length() > 0 && spacing + renderer.width(value) > maxWidth) {
value = value.substring(0, value.length() - 1);
}
guiGraphics.drawString(renderer, label, 0, i * lineHeight, color);
guiGraphics.drawString(renderer, value, spacing, i * lineHeight, color);
}
pose.popPose();
if (!this.hoveredCoords.isEmpty()) {
guiGraphics.drawCenteredString(renderer, this.hoveredCoords, mx, my - 10, 0xFFFFFF);
}
// pose.pushPose();
// pose.translate(left + 3.75F * scale, top - lineHeight * (3.2F * scale), 0);
// pose.scale(scale, scale, 1);
//
// Minecraft mc = Minecraft.getInstance();
// Font renderer = mc.font;
// int spacing = 0;
// for (Component s : labels) {
// spacing = Math.max(spacing, renderer.width(s));
// }
//
// float maxWidth = (this.width - 4) / scale;
// for (int i = 0; i < labels.length && i < values.length; i++) {
// Component label = labels[i];
// String value = values[i];
//
// while (value.length() > 0 && spacing + renderer.width(value) > maxWidth) {
// value = value.substring(0, value.length() - 1);
// }
//
// guiGraphics.drawString(renderer, label, 0, i * lineHeight, color);
// guiGraphics.drawString(renderer, value, spacing, i * lineHeight, color);
// }
//
// pose.popPose();
//
// if (!this.hoveredCoords.isEmpty()) {
// guiGraphics.drawCenteredString(renderer, this.hoveredCoords, mx, my - 10, 0xFFFFFF);
// }
}

private int getZoom() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package raccoonman.reterraforged.data.worldgen.preset;

import java.util.Optional;
import java.util.OptionalLong;

import net.minecraft.data.worldgen.BootstrapContext;
Expand All @@ -19,6 +20,6 @@ public static void bootstrap(Preset preset, BootstrapContext<DimensionType> ctx)
int worldDepth = properties.worldDepth;
int totalHeight = worldDepth + worldHeight;

ctx.register(BuiltinDimensionTypes.OVERWORLD, new DimensionType(OptionalLong.empty(), true, false, false, true, 1.0, true, false, -worldDepth, totalHeight, totalHeight, BlockTags.INFINIBURN_OVERWORLD, BuiltinDimensionTypes.OVERWORLD_EFFECTS, 0.0f, new DimensionType.MonsterSettings(false, true, UniformInt.of(0, 7), 0)));
ctx.register(BuiltinDimensionTypes.OVERWORLD, new DimensionType(OptionalLong.empty(), true, false, false, true, 1.0, true, false, -worldDepth, totalHeight, totalHeight, BlockTags.INFINIBURN_OVERWORLD, BuiltinDimensionTypes.OVERWORLD_EFFECTS, 0.0f, Optional.of(300), new DimensionType.MonsterSettings(false, true, UniformInt.of(0, 7), 0)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ protected void addTags(HolderLookup.Provider provider) {
this.tag(RTFBlockTags.SOIL).add(Blocks.DIRT, Blocks.COARSE_DIRT);
this.tag(RTFBlockTags.CLAY).add(Blocks.CLAY);
this.tag(RTFBlockTags.SEDIMENT).add(Blocks.SAND, Blocks.GRAVEL);
this.tag(RTFBlockTags.ERODIBLE).add(Blocks.SNOW_BLOCK).add(Blocks.POWDER_SNOW).add(Blocks.GRAVEL).addOptionalTag(BlockTags.DIRT.location());

// this.tag(RTFBlockTags.ERODIBLE).add(Blocks.SNOW_BLOCK).add(Blocks.POWDER_SNOW).add(Blocks.GRAVEL).addOptionalTag(BlockTags.DIRT.location());
this.tag(RTFBlockTags.ERODIBLE).add(Blocks.SNOW_BLOCK).add(Blocks.POWDER_SNOW).add(Blocks.GRAVEL).addOptionalTag(BlockTags.DIRT);

// if(!miscellaneousSettings.oreCompatibleStoneOnly) {
this.tag(RTFBlockTags.ROCK).add(Blocks.GRANITE, Blocks.ANDESITE, Blocks.STONE, Blocks.DIORITE);
// } else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public RTFDensityFunctionTagsProvider(PackOutput packOutput, CompletableFuture<H

@Override
protected void addTags(HolderLookup.Provider provider) {
this.tag(RTFDensityFunctionTags.ADDITIONAL_NOISE_ROUTER_FUNCTIONS).add(PresetNoiseRouterData.GRADIENT, PresetNoiseRouterData.HEIGHT_EROSION, PresetNoiseRouterData.SEDIMENT, TBNoiseRouterData.UNIQUENESS);
// this.tag(RTFDensityFunctionTags.ADDITIONAL_NOISE_ROUTER_FUNCTIONS).add(PresetNoiseRouterData.GRADIENT, PresetNoiseRouterData.HEIGHT_EROSION, PresetNoiseRouterData.SEDIMENT, TBNoiseRouterData.UNIQUENESS);
this.getOrCreateRawBuilder(RTFDensityFunctionTags.ADDITIONAL_NOISE_ROUTER_FUNCTIONS)
.addElement(PresetNoiseRouterData.GRADIENT.location())
.addElement(PresetNoiseRouterData.HEIGHT_EROSION.location())
.addElement(PresetNoiseRouterData.SEDIMENT.location())
.addElement(TBNoiseRouterData.UNIQUENESS.location());

}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
org.gradle.jvmargs=-Xmx4G
minecraft_version=1.21.5
minecraft_version=1.21.8
archives_base_name=reterraforged
mod_version=0.0.6
mod_id=reterraforged
maven_group=raccoonman.reterraforged
fabric_loader_version=0.16.14
fabric_api_version=0.121.0+1.21.5
fabric_loader_version=0.17.2
fabric_api_version=0.131.0+1.21.8
forge_version=52.0.22
terrablender_version=5.0.0.1
terrablender_version=6.0.0.3