Skip to content

Commit

Permalink
Merge branch 'CleanroomMC:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
KasumiNova authored Sep 14, 2024
2 parents 622da1c + b958531 commit 33ad2c9
Show file tree
Hide file tree
Showing 12 changed files with 540 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/000-report-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
- Java 19
- Java 20
- Java 21
- Java 22
- Other (Please Specify)
validations:
required: true
Expand Down Expand Up @@ -87,4 +88,4 @@ body:
- label: "I am using experimental branch and have installed [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1) and it does not fix this issue."
required: true
- label: "I am running a test build from Cleanroom Github Actions. (Or, if I've compiled it myself I plan to fix the issue)"
required: true
required: true
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:6.10.+"
classpath "net.minecraftforge.gradle:ForgeGradle:6.0.+"
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 15 additions & 7 deletions src/main/java/net/minecraftforge/common/BiomeDictionary.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

/**
* BiomeDictionary provides tags for Biomes to use
* If tags are not specified, you imply an "average" biome
* (Think Oak forest, moderate temperature, temperate trees, and moderate humidity)
*/
public class BiomeDictionary
{
private static final boolean DEBUG = false;
Expand All @@ -49,18 +54,21 @@ public static final class Type
public static final Type HOT = new Type("HOT");
public static final Type COLD = new Type("COLD");

/*Tags specifying the amount of vegetation a biome has. Specifying neither implies a biome to have moderate amounts*/
/**Tag specifying a sparse amount of vegetation*/
public static final Type SPARSE = new Type("SPARSE");
/**Tag specifying a dense amount of vegetation*/
public static final Type DENSE = new Type("DENSE");

/*Tags specifying how moist a biome is. Specifying neither implies the biome as having moderate humidity*/
/**Tag specifying how moist a biome is*/
public static final Type WET = new Type("WET");
/**Tag specifying how moist a biome is*/
public static final Type DRY = new Type("DRY");

/*Tree-based tags, SAVANNA refers to dry, desert-like trees (Such as Acacia), CONIFEROUS refers to snowy trees (Such as Spruce) and JUNGLE refers to jungle trees.
* Specifying no tag implies a biome has temperate trees (Such as Oak)*/
/**Tree-based tag: refers to dry, desert-like trees (Such as Acacia)*/
public static final Type SAVANNA = new Type("SAVANNA");
/**Tree-based tag: refers to snowy trees (Such as Spruce)*/
public static final Type CONIFEROUS = new Type("CONIFEROUS");
/**Tree-based tag: refers to jungle trees*/
public static final Type JUNGLE = new Type("JUNGLE");

/*Tags specifying the nature of a biome*/
Expand Down Expand Up @@ -125,14 +133,14 @@ public String toString()
}

/**
* Retrieves a Type instance by name,
* if one does not exist already it creates one.
* Retrieves a Type instance by name.
* If one does not exist already, it creates one.
* This can be used as intermediate measure for modders to
* add their own Biome types.
* <p>
* There are <i>no</i> naming conventions besides:
* <ul><li><b>Must</b> be all upper case (enforced by name.toUpper())</li>
* <li><b>No</b> Special characters. {Unenforced, just don't be a pain, if it becomes a issue I WILL
* <li><b>No</b> Special characters. {Unenforced, just don't be a pain, if it becomes an issue I WILL
* make this RTE with no worry about backwards compatibility}</li></ul>
* <p>
* Note: For performance sake, the return value of this function SHOULD be cached.
Expand Down
14 changes: 11 additions & 3 deletions src/main/java/net/minecraftforge/common/DungeonHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.WeightedRandom;


/**
* DungeonHooks allows you to add or remove mobs
* to the spawners that generate in dungeons
*
* @author LexManos, cpw
*/
public class DungeonHooks
{
private static ArrayList<DungeonMob> dungeonMobs = new ArrayList<DungeonMob>();
Expand All @@ -34,7 +41,7 @@ public class DungeonHooks
* If the mob is already in the spawn list, the rarity will be added to the existing one,
* causing the mob to be more common.
*
* @param name The name of the monster, use the same name used when registering the entity.
* @param name The name of the monster. This is the same name used when registering the entity.
* @param rarity The rarity of selecting this mob over others. Must be greater then 0.
* Vanilla Minecraft has the following mobs:
* Spider 100
Expand Down Expand Up @@ -83,8 +90,9 @@ public static int removeDungeonMob(ResourceLocation name)

/**
* Gets a random mob name from the list.
* @param rand World generation random number generator
* @return The mob name
*
* @param rand The World generation random number
* @return The mobs name
*/
public static ResourceLocation getRandomDungeonMob(Random rand)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package net.minecraftforge.fml.client;

import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.common.DuplicateModsFoundException;
import net.minecraftforge.fml.common.ModContainer;

Expand All @@ -40,9 +41,9 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
int offset = Math.max(85 - dupes.dupes.size() * 10, 10);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.load.problem.found"), this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRenderer, "You have mod sources that are duplicate within your system", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "You have duplicate mods installed. Please remove duplicates to avoid conflicts.", this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRenderer, "Mod Id : File name", this.width / 2, offset, 0xFFFFFF);
offset+=5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package net.minecraftforge.fml.client;

import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.toposort.ModSortingException;
import net.minecraftforge.fml.common.toposort.ModSortingException.SortingExceptionData;
Expand All @@ -43,7 +44,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
int offset = Math.max(85 - (failedList.getVisitedNodes().size() + 3) * 10, 10);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.load.problem.found"), this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRenderer, "A mod sorting cycle was detected and loading cannot continue", this.width / 2, offset, 0xFFFFFF);
offset+=10;
Expand Down
19 changes: 14 additions & 5 deletions src/main/java/net/minecraftforge/fml/common/ProgressManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,24 @@
import com.google.common.base.Joiner;

/**
* Not a fully fleshed out API, may change in future MC versions.
* However feel free to use and suggest additions.
* ProgressManager allows you to create loading bars
* that appear durning Mod Loading
*/
public class ProgressManager
{
private static final List<ProgressBar> bars = new CopyOnWriteArrayList<ProgressBar>();

/**
* Not a fully fleshed out API, may change in future MC versions.
* However feel free to use and suggest additions.
* Create a progress bar with a title and number of steps
*
* @param title The title of the bar
* @param steps The ammout of steps
*/
public static ProgressBar push(String title, int steps)
{
return push(title, steps, false);
}

/**
* Not a fully fleshed out API, may change in future MC versions.
* However feel free to use and suggest additions.
Expand Down Expand Up @@ -118,6 +122,11 @@ public void step(Class<?> classToName, String... extra)
step(ClassNameUtils.shortName(classToName)+Joiner.on(' ').join(extra));
}

/**
* Move to the next step in a bar.
*
* @param message The message to display inside a the bar
*/
public void step(String message)
{
if(step >= steps) throw new IllegalStateException("too much steps for ProgressBar " + title);
Expand Down Expand Up @@ -157,4 +166,4 @@ public void timeEachStep()
this.timeEachStep = true;
}
}
}
}
6 changes: 3 additions & 3 deletions src/main/java/org/lwjgl/opengl/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public class Display {
*
* @param pixel_format Describes the minimum specifications the context must fulfill.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
*
* @throws org.lwjgl.LWJGLException
*/
public static void create(PixelFormat pixel_format, Drawable shared_drawable) {
Expand Down Expand Up @@ -125,7 +124,7 @@ public static void create() {
glfwWindowHintString(GLFW_COCOA_FRAME_NAME, ForgeEarlyConfig.COCOA_FRAME_NAME);

glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE); // request a non-hidpi framebuffer on Retina displays
// on MacOS
// on MacOS

Window.handle = glfwCreateWindow(mode.getWidth(), mode.getHeight(), windowTitle, NULL, NULL);
if (Window.handle == 0L) {
Expand Down Expand Up @@ -242,7 +241,8 @@ public void invoke(long window, boolean iconified) {
@Override
public void invoke(long window, int width, int height) {

latestResized = true;
boolean minimized = width == 0 && height == 0;
latestResized = true && !minimized;
latestWidth = width;
latestHeight = height;
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/forge/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ fml.menu.modoptions=Mod Options...

item.forge.bucketFilled.name=%s Bucket


fml.messages.load.problem.found=Forge Mod Loader has found a problem with your minecraft installation
fml.messages.mod.missing.dependencies=%s is missing mods it depends on.
fml.messages.mod.missing.dependencies.fix=Include the following mods or remove %s.
fml.messages.mod.missing.dependencies.compatibility=You must include the right dependencies for %s:
Expand Down
Loading

0 comments on commit 33ad2c9

Please sign in to comment.