mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
A few more binary-breaking changes, before it's too late:
- Move CompositeModel out of its package. - Move a few inner classes from the OBJ loader. - Rename the bucket model and fluid model classes to match the naming convention. - Remove BiomeEvent.* and WorldTypeEvent.InitBiomeGens as they are not currently implemented and they haven't been in the previous version either.
This commit is contained in:
1 parent
4b9920bcb3
commit
b6c12f5fff
12 files changed
+184
-555
No files matched your search
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2019.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
|
||||
/**
|
||||
* BiomeEvent is fired whenever an event involving biomes occurs.<br>
|
||||
* If a method utilizes this {@link Event} as its parameter, the method will
|
||||
* receive every child event of this class.<br>
|
||||
* <br>
|
||||
* All children of this event are fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}
|
||||
* unless stated otherwise in their Javadocs.
|
||||
**/
|
||||
public class BiomeEvent extends Event
|
||||
{
|
||||
private final Biome biome;
|
||||
|
||||
public BiomeEvent(Biome biome)
|
||||
{
|
||||
this.biome = biome;
|
||||
}
|
||||
|
||||
public Biome getBiome()
|
||||
{
|
||||
return biome;
|
||||
}
|
||||
|
||||
/**
|
||||
* BiomeColor is fired whenever an event involving biome colors occurs. <br>
|
||||
* If a method utilizes this {@link Event} as its parameter, the method will
|
||||
* receive every child event of this class.<br>
|
||||
* <br>
|
||||
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
public static class BiomeColor extends BiomeEvent
|
||||
{
|
||||
private final int originalColor;
|
||||
private int newColor;
|
||||
|
||||
public BiomeColor(Biome biome, int original)
|
||||
{
|
||||
super(biome);
|
||||
originalColor = original;
|
||||
setNewColor(original);
|
||||
}
|
||||
|
||||
public int getOriginalColor()
|
||||
{
|
||||
return originalColor;
|
||||
}
|
||||
|
||||
public int getNewColor()
|
||||
{
|
||||
return newColor;
|
||||
}
|
||||
|
||||
public void setNewColor(int newColor)
|
||||
{
|
||||
this.newColor = newColor;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when the village generator attempts to choose a block ID
|
||||
* based on the village's biome.
|
||||
*
|
||||
* You can cancel the event to override default values
|
||||
*/
|
||||
@HasResult
|
||||
public static class GetVillageBlockID extends BiomeEvent
|
||||
{
|
||||
private final BlockState original;
|
||||
private BlockState replacement;
|
||||
|
||||
public GetVillageBlockID(Biome biome, BlockState original)
|
||||
{
|
||||
super(biome);
|
||||
this.original = original;
|
||||
}
|
||||
|
||||
public BlockState getOriginal()
|
||||
{
|
||||
return original;
|
||||
}
|
||||
|
||||
public BlockState getReplacement()
|
||||
{
|
||||
return replacement;
|
||||
}
|
||||
|
||||
public void setReplacement(BlockState replacement)
|
||||
{
|
||||
this.replacement = replacement;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when a biome is queried for its grass color.
|
||||
*/
|
||||
public static class GetGrassColor extends BiomeColor
|
||||
{
|
||||
public GetGrassColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when a biome is queried for its grass color.
|
||||
*/
|
||||
public static class GetFoliageColor extends BiomeColor
|
||||
{
|
||||
public GetFoliageColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is fired when a biome is queried for its water color.
|
||||
*/
|
||||
public static class GetWaterColor extends BiomeColor
|
||||
{
|
||||
public GetWaterColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,54 +93,4 @@ public class WorldTypeEvent extends Event
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* InitBiomeGens is fired when vanilla Minecraft attempts to initialize the biome providers.<br>
|
||||
* This event is fired just during biome provider initialization in
|
||||
* {@link BiomeProvider#BiomeProvider(long, WorldType, String)}. <br>
|
||||
* <br>
|
||||
* {@link #seed} the seed of the world. <br>
|
||||
* {@link #originalBiomeGens} the array of GenLayers original intended for this Biome generation. <br>
|
||||
* {@link #newBiomeGens} the array of GenLayers that will now be used for this Biome generation. <br>
|
||||
* If {@link #newBiomeGens} is set to a new value, that value will be used for the Biome generator. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult} <br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.<br>
|
||||
**/
|
||||
public static class InitBiomeGens extends WorldTypeEvent
|
||||
{
|
||||
private final long seed;
|
||||
private final Layer[] originalBiomeGens;
|
||||
private Layer[] newBiomeGens;
|
||||
|
||||
public InitBiomeGens(WorldType worldType, long seed, Layer[] original)
|
||||
{
|
||||
super(worldType);
|
||||
this.seed = seed;
|
||||
originalBiomeGens = original;
|
||||
setNewBiomeGens(original.clone());
|
||||
}
|
||||
|
||||
public long getSeed()
|
||||
{
|
||||
return seed;
|
||||
}
|
||||
|
||||
public Layer[] getOriginalBiomeGens()
|
||||
{
|
||||
return originalBiomeGens;
|
||||
}
|
||||
|
||||
public Layer[] getNewBiomeGens()
|
||||
{
|
||||
return newBiomeGens;
|
||||
}
|
||||
|
||||
public void setNewBiomeGens(Layer[] newBiomeGens)
|
||||
{
|
||||
this.newBiomeGens = newBiomeGens;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user