mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Make Villager profession unlocalized name use modids when not 'minecraft' Closes #5977
Fixed trees able to be generated through water. Closes #6000 Change Block#toString to use getRegistryName instead of getNameForObject Closes #5937 Allow Cooking Recipes to deserialize results with stack sizes. Closes #5960
This commit is contained in:
1 parent
318fc6ffe8
commit
48fa2f458c
9 files changed
+60
-677
No files matched your search
@@ -125,7 +125,7 @@ public class ForgeConfig
|
||||
public final BooleanValue selectiveResourceReloadEnabled;
|
||||
|
||||
public final BooleanValue showLoadWarnings;
|
||||
|
||||
|
||||
public final BooleanValue allowEmissiveItems;
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
@@ -168,7 +168,7 @@ public class ForgeConfig
|
||||
.comment("When enabled, forge will show any warnings that occurred during loading")
|
||||
.translation("forge.configgui.showloadwarnings")
|
||||
.define("showLoadWarnings", true);
|
||||
|
||||
|
||||
allowEmissiveItems = builder
|
||||
.comment("Allow item rendering to detect emissive quads and draw them properly. This allows glowing blocks to look the same in item form, but incurs a very slight performance hit.")
|
||||
.translation("forge.configgui.allowEmissiveItems")
|
||||
@@ -209,67 +209,4 @@ public class ForgeConfig
|
||||
//public static boolean disableVersionCheck = false;
|
||||
//public static boolean logCascadingWorldGeneration = true; // see Chunk#logCascadingWorldGeneration()
|
||||
//public static boolean fixVanillaCascading = false;
|
||||
|
||||
//Client
|
||||
//public static int clumpingThreshold = 64;
|
||||
//public static boolean zoomInMissingModelTextInGui = false;
|
||||
//public static boolean disableStairSlabCulling = false;
|
||||
//public static boolean alwaysSetupTerrainOffThread = false;
|
||||
//public static boolean forgeLightPipelineEnabled = true;
|
||||
//public static boolean selectiveResourceReloadEnabled = false;
|
||||
|
||||
//TODO
|
||||
//public static int[] blendRanges = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 };
|
||||
|
||||
/*
|
||||
private static void syncConfig(boolean load)
|
||||
{
|
||||
//prop = config.get(Configuration.CATEGORY_CLIENT, "biomeSkyBlendRange", new int[] { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 });
|
||||
//prop.setComment("Control the range of sky blending for colored skies in biomes.");
|
||||
//prop.setLanguageKey("forge.configgui.biomeSkyBlendRange");
|
||||
//blendRanges = prop.getIntList();
|
||||
//propOrder.add(prop.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* By subscribing to the OnConfigChangedEvent we are able to execute code when our config screens are closed.
|
||||
* This implementation uses the optional configID string to handle multiple Configurations using one event handler.
|
||||
* /
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(OnConfigChangedEvent event)
|
||||
{
|
||||
if (getMetadata().modId.equals(event.getModID()))
|
||||
{
|
||||
if ("chunkLoader".equals(event.getConfigID()))
|
||||
{
|
||||
ForgeChunkManager.syncConfigDefaults();
|
||||
ForgeChunkManager.loadConfiguration();
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean tmpStairs = disableStairSlabCulling;
|
||||
|
||||
syncConfig(false);
|
||||
|
||||
if (event.isWorldRunning() && tmpStairs != disableStairSlabCulling)
|
||||
{
|
||||
FMLCommonHandler.instance().reloadRenderers();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
public void playerLogin(PlayerEvent.PlayerLoggedInEvent event)
|
||||
{
|
||||
UsernameCache.setUsername(event.player.getPersistentID(), event.player.getGameProfile().getName());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void postInit(InterModProcessEvent evt)
|
||||
{
|
||||
ForgeChunkManager.loadConfiguration();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -23,9 +23,7 @@ import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.*;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLModIdMappingEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
@@ -89,8 +87,6 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
|
||||
WorldPersistenceHooks.addHook(new FMLWorldPersistenceHook());
|
||||
final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
modEventBus.addListener(this::preInit);
|
||||
modEventBus.addListener(this::postInit);
|
||||
modEventBus.addListener(this::onAvailable);
|
||||
modEventBus.addListener(this::gatherData);
|
||||
MinecraftForge.EVENT_BUS.addListener(this::serverStarting);
|
||||
MinecraftForge.EVENT_BUS.addListener(this::playerLogin);
|
||||
@@ -103,20 +99,6 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
|
||||
StartupMessageManager.addModMessage("Forge version "+ForgeVersion.getVersion());
|
||||
}
|
||||
|
||||
/*
|
||||
public void missingMapping(RegistryEvent.MissingMappings<Item> event)
|
||||
{
|
||||
for (MissingMappings.Mapping<Item> entry : event.getAllMappings())
|
||||
{
|
||||
if (entry.key.toString().equals("minecraft:totem")) //This item changed from 1.11 -> 1.11.2
|
||||
{
|
||||
ResourceLocation newTotem = new ResourceLocation("minecraft:totem_of_undying");
|
||||
entry.remap(ForgeRegistries.ITEMS.getValue(newTotem));
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public void playerLogin(PlayerEvent.PlayerLoggedInEvent event)
|
||||
{
|
||||
UsernameCache.setUsername(event.getPlayer().getUniqueID(), event.getPlayer().getGameProfile().getName());
|
||||
@@ -138,47 +120,6 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public void registrItems(RegistryEvent.Register<Item> event)
|
||||
{
|
||||
// Add and register the forge universal bucket, if it's enabled
|
||||
if(FluidRegistry.isUniversalBucketEnabled())
|
||||
{
|
||||
universalBucket = new UniversalBucket();
|
||||
universalBucket.setUnlocalizedName("forge.bucketFilled");
|
||||
event.getRegistry().register(universalBucket.setRegistryName(ForgeVersion.MOD_ID, "bucket_filled"));
|
||||
MinecraftForge.EVENT_BUS.register(universalBucket);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public void postInit(InterModProcessEvent evt)
|
||||
{
|
||||
registerAllBiomesAndGenerateEvents();
|
||||
//ForgeChunkManager.loadConfiguration();
|
||||
}
|
||||
|
||||
private static void registerAllBiomesAndGenerateEvents()
|
||||
{
|
||||
/*
|
||||
for (Biome biome : ForgeRegistries.BIOMES.getValuesCollection())
|
||||
{
|
||||
if (biome.decorator instanceof DeferredBiomeDecorator)
|
||||
{
|
||||
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator)biome.decorator;
|
||||
decorator.fireCreateEventAndReplace(biome);
|
||||
}
|
||||
|
||||
BiomeDictionary.ensureHasTypes(biome);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public void onAvailable(FMLLoadCompleteEvent evt)
|
||||
{
|
||||
// FluidRegistry.validateFluidRegistry();
|
||||
}
|
||||
|
||||
public void serverStarting(FMLServerStartingEvent evt)
|
||||
{
|
||||
new ForgeCommand(evt.getCommandDispatcher());
|
||||
|
||||
@@ -365,7 +365,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean canBeReplacedByLeaves(BlockState state, IWorldReader world, BlockPos pos)
|
||||
{
|
||||
return (isAir(state, world, pos) || state.isIn(BlockTags.LEAVES)) || !state.isOpaqueCube(world, pos);
|
||||
return isAir(state, world, pos) || state.isIn(BlockTags.LEAVES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user