Merge a few more fixes
This commit is contained in:
parent
27056da3e4
commit
0864e1061a
3 changed files with 25 additions and 4 deletions
|
@ -131,7 +131,7 @@ public class CommonWorldTickHandler
|
|||
|
||||
int dimensionId = world.provider.dimensionId;
|
||||
|
||||
//Credit to E. Beef :)
|
||||
//Credit to E. Beef
|
||||
if(chunkRegenMap.containsKey(dimensionId))
|
||||
{
|
||||
Queue<ChunkCoordIntPair> chunksToGen = chunkRegenMap.get(dimensionId);
|
||||
|
@ -152,6 +152,7 @@ public class CommonWorldTickHandler
|
|||
fmlRandom.setSeed((xSeed*nextChunk.chunkXPos + zSeed*nextChunk.chunkZPos) ^ world.getSeed());
|
||||
|
||||
Mekanism.genHandler.generate(fmlRandom, nextChunk.chunkXPos, nextChunk.chunkZPos, world, world.getChunkProvider(), world.getChunkProvider());
|
||||
Mekanism.logger.info("[Mekanism] Regenerating ores at chunk " + nextChunk);
|
||||
}
|
||||
|
||||
if(chunksToGen.isEmpty())
|
||||
|
|
|
@ -215,6 +215,7 @@ public class Mekanism
|
|||
/** A list of the usernames of players who have donated to Mekanism. */
|
||||
public static List<String> donators = new ArrayList<String>();
|
||||
|
||||
/** The server's world tick handler. */
|
||||
public static CommonWorldTickHandler worldTickHandler = new CommonWorldTickHandler();
|
||||
|
||||
/** The Mekanism world generation handler. */
|
||||
|
@ -1508,6 +1509,18 @@ public class Mekanism
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void chunkSave(ChunkDataEvent.Save event)
|
||||
{
|
||||
if(!event.world.isRemote)
|
||||
{
|
||||
NBTTagCompound nbtTags = event.getData();
|
||||
|
||||
nbtTags.setInteger("MekanismWorldGen", baseWorldGenVersion);
|
||||
nbtTags.setInteger("MekanismUserWorldGen", userWorldGenVersion);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public synchronized void onChunkDataLoad(ChunkDataEvent.Load event)
|
||||
{
|
||||
|
|
|
@ -10,14 +10,21 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
|
||||
public class BinRecipe implements IRecipe//, ICraftingHandler
|
||||
public class BinRecipe implements IRecipe
|
||||
{
|
||||
private static boolean registered;
|
||||
|
||||
public BinRecipe()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
if(!registered)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
registered = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,7 +121,7 @@ public class BinRecipe implements IRecipe//, ICraftingHandler
|
|||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCrafting(ItemCraftedEvent event) //EntityPlayer player, ItemStack item, IInventory craftMatrix)
|
||||
public void onCrafting(ItemCraftedEvent event)
|
||||
{
|
||||
if(getResult(event.craftMatrix) != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue