mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 23:45:44 +00:00
1.9.4 Update.
Major things to note: Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86 Tile Entities are now packed in the ChunkData packet. Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to! Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to! Added support for package-info.java's containing @Nullable information for all MC code base.
This commit is contained in:
1 parent
5d5c005aae
commit
b9ac73b0f1
257 files changed
+2398
-1919
No files matched your search
@@ -14,7 +14,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
|
||||
import net.minecraft.entity.player.EntityPlayer.SleepResult;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -35,7 +35,7 @@ import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.storage.IPlayerFileData;
|
||||
@@ -162,7 +162,7 @@ public class ForgeEventFactory
|
||||
return event.getDroppedExperience();
|
||||
}
|
||||
|
||||
public static List<BiomeGenBase.SpawnListEntry> getPotentialSpawns(WorldServer world, EnumCreatureType type, BlockPos pos, List<BiomeGenBase.SpawnListEntry> oldList)
|
||||
public static List<Biome.SpawnListEntry> getPotentialSpawns(WorldServer world, EnumCreatureType type, BlockPos pos, List<Biome.SpawnListEntry> oldList)
|
||||
{
|
||||
WorldEvent.PotentialSpawns event = new WorldEvent.PotentialSpawns(world, type, pos, oldList);
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
@@ -369,7 +369,7 @@ public class ForgeEventFactory
|
||||
return true;
|
||||
}
|
||||
|
||||
public static EnumStatus onPlayerSleepInBed(EntityPlayer player, BlockPos pos)
|
||||
public static SleepResult onPlayerSleepInBed(EntityPlayer player, BlockPos pos)
|
||||
{
|
||||
PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(player, pos);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
|
||||
import net.minecraft.entity.player.EntityPlayer.SleepResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
**/
|
||||
public class PlayerSleepInBedEvent extends PlayerEvent
|
||||
{
|
||||
private EnumStatus result = null;
|
||||
private SleepResult result = null;
|
||||
private final BlockPos pos;
|
||||
|
||||
public PlayerSleepInBedEvent(EntityPlayer player, BlockPos pos)
|
||||
@@ -29,12 +29,12 @@ public class PlayerSleepInBedEvent extends PlayerEvent
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
public EnumStatus getResultStatus()
|
||||
public SleepResult getResultStatus()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(EnumStatus result)
|
||||
public void setResult(SleepResult result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.minecraftforge.event.terraingen;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
/**
|
||||
* BiomeEvent is fired whenever an event involving biomes occurs.<br>
|
||||
@@ -14,14 +14,14 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
**/
|
||||
public class BiomeEvent extends Event
|
||||
{
|
||||
private final BiomeGenBase biome;
|
||||
private final Biome biome;
|
||||
|
||||
public BiomeEvent(BiomeGenBase biome)
|
||||
public BiomeEvent(Biome biome)
|
||||
{
|
||||
this.biome = biome;
|
||||
}
|
||||
|
||||
public BiomeGenBase getBiome()
|
||||
public Biome getBiome()
|
||||
{
|
||||
return biome;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class BiomeEvent extends Event
|
||||
private final BiomeDecorator originalBiomeDecorator;
|
||||
private BiomeDecorator newBiomeDecorator;
|
||||
|
||||
public CreateDecorator(BiomeGenBase biome, BiomeDecorator original)
|
||||
public CreateDecorator(Biome biome, BiomeDecorator original)
|
||||
{
|
||||
super(biome);
|
||||
originalBiomeDecorator = original;
|
||||
@@ -80,7 +80,7 @@ public class BiomeEvent extends Event
|
||||
private final int originalColor;
|
||||
private int newColor;
|
||||
|
||||
public BiomeColor(BiomeGenBase biome, int original)
|
||||
public BiomeColor(Biome biome, int original)
|
||||
{
|
||||
super(biome);
|
||||
originalColor = original;
|
||||
@@ -115,7 +115,7 @@ public class BiomeEvent extends Event
|
||||
private final IBlockState original;
|
||||
private IBlockState replacement;
|
||||
|
||||
public GetVillageBlockID(BiomeGenBase biome, IBlockState original)
|
||||
public GetVillageBlockID(Biome biome, IBlockState original)
|
||||
{
|
||||
super(biome);
|
||||
this.original = original;
|
||||
@@ -142,7 +142,7 @@ public class BiomeEvent extends Event
|
||||
*/
|
||||
public static class GetGrassColor extends BiomeColor
|
||||
{
|
||||
public GetGrassColor(BiomeGenBase biome, int original)
|
||||
public GetGrassColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class BiomeEvent extends Event
|
||||
*/
|
||||
public static class GetFoliageColor extends BiomeColor
|
||||
{
|
||||
public GetFoliageColor(BiomeGenBase biome, int original)
|
||||
public GetFoliageColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class BiomeEvent extends Event
|
||||
*/
|
||||
public static class GetWaterColor extends BiomeColor
|
||||
{
|
||||
public GetWaterColor(BiomeGenBase biome, int original)
|
||||
public GetWaterColor(Biome biome, int original)
|
||||
{
|
||||
super(biome, original);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.Random;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class DeferredBiomeDecorator extends BiomeDecorator {
|
||||
@@ -16,13 +16,13 @@ public class DeferredBiomeDecorator extends BiomeDecorator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decorate(World par1World, Random par2Random, BiomeGenBase biome, BlockPos pos)
|
||||
public void decorate(World par1World, Random par2Random, Biome biome, BlockPos pos)
|
||||
{
|
||||
fireCreateEventAndReplace(biome);
|
||||
// On first call to decorate, we fire and substitute ourselves, if we haven't already done so
|
||||
biome.theBiomeDecorator.decorate(par1World, par2Random, biome, pos);
|
||||
}
|
||||
public void fireCreateEventAndReplace(BiomeGenBase biome)
|
||||
public void fireCreateEventAndReplace(Biome biome)
|
||||
{
|
||||
// Copy any configuration from us to the real instance.
|
||||
wrapped.bigMushroomsPerChunk = bigMushroomsPerChunk;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package net.minecraftforge.event.world;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
|
||||
/**
|
||||
* ChunkWatchEvent is fired when an event involving a chunk being watched occurs.<br>
|
||||
* If a method utilizes this {@link Event} as its parameter, the method will
|
||||
* If a method utilizes this {@link Event} as its parameter, the method will
|
||||
* receive every child event of this class.<br>
|
||||
* <br>
|
||||
* {@link #chunk} contains the ChunkCoordIntPair of the Chunk this event is affecting.<br>
|
||||
@@ -16,16 +16,16 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
**/
|
||||
public class ChunkWatchEvent extends Event
|
||||
{
|
||||
private final ChunkCoordIntPair chunk;
|
||||
private final ChunkPos chunk;
|
||||
private final EntityPlayerMP player;
|
||||
|
||||
public ChunkWatchEvent(ChunkCoordIntPair chunk, EntityPlayerMP player)
|
||||
|
||||
public ChunkWatchEvent(ChunkPos chunk, EntityPlayerMP player)
|
||||
{
|
||||
this.chunk = chunk;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public ChunkCoordIntPair getChunk()
|
||||
public ChunkPos getChunk()
|
||||
{
|
||||
return chunk;
|
||||
}
|
||||
@@ -48,9 +48,9 @@ public class ChunkWatchEvent extends Event
|
||||
**/
|
||||
public static class Watch extends ChunkWatchEvent
|
||||
{
|
||||
public Watch(ChunkCoordIntPair chunk, EntityPlayerMP player) { super(chunk, player); }
|
||||
public Watch(ChunkPos chunk, EntityPlayerMP player) { super(chunk, player); }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.<br>
|
||||
* This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in
|
||||
@@ -64,6 +64,6 @@ public class ChunkWatchEvent extends Event
|
||||
**/
|
||||
public static class UnWatch extends ChunkWatchEvent
|
||||
{
|
||||
public UnWatch(ChunkCoordIntPair chunkLocation, EntityPlayerMP player) { super(chunkLocation, player); }
|
||||
public UnWatch(ChunkPos chunkLocation, EntityPlayerMP player) { super(chunkLocation, player); }
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
|
||||
import net.minecraft.world.biome.Biome.SpawnListEntry;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
|
||||
Reference in new issue
Block a user