From dc3df3edd5843bde0c1335d6a8e460b2c832aa48 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Sat, 17 Jun 2017 08:12:18 +0300 Subject: full project files --- ihl/explosion/WorldSavedDataBlastWave.java | 108 ----------------------------- 1 file changed, 108 deletions(-) delete mode 100644 ihl/explosion/WorldSavedDataBlastWave.java (limited to 'ihl/explosion/WorldSavedDataBlastWave.java') diff --git a/ihl/explosion/WorldSavedDataBlastWave.java b/ihl/explosion/WorldSavedDataBlastWave.java deleted file mode 100644 index 73019b9..0000000 --- a/ihl/explosion/WorldSavedDataBlastWave.java +++ /dev/null @@ -1,108 +0,0 @@ -package ihl.explosion; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.world.WorldSavedData; - -public class WorldSavedDataBlastWave extends WorldSavedData { - Map> data = new HashMap>(256); - - public WorldSavedDataBlastWave(String name) - { - super(name); - } - - @Override - public void readFromNBT(NBTTagCompound nbt) - { - if(nbt.hasKey("entryList")) - { - NBTTagList entryList=nbt.getTagList("entryList", 10); - for(int i=0;i blastWaveArraySet= new HashSet(); - for(int i1=0;i1>> dataESI = data.entrySet().iterator(); - while(dataESI.hasNext()) - { - Entry> dataEntry = dataESI.next(); - Iterator bwArrayI = dataEntry.getValue().iterator(); - NBTTagCompound chunk = new NBTTagCompound(); - NBTTagList blastWaveList = new NBTTagList(); - while(bwArrayI.hasNext()) - { - NBTTagCompound blastWave = new NBTTagCompound(); - Integer[] bwArray = bwArrayI.next(); - blastWave.setInteger("ev", bwArray[0]); - blastWave.setInteger("sourceX", bwArray[1]); - blastWave.setInteger("sourceY", bwArray[2]); - blastWave.setInteger("sourceZ", bwArray[3]); - blastWave.setInteger("power", bwArray[4]); - blastWave.setInteger("directionX", bwArray[5]); - blastWave.setInteger("directionY", bwArray[6]); - blastWave.setInteger("directionZ", bwArray[7]); - blastWaveList.appendTag(blastWave); - } - chunk.setTag("blastWaveList", blastWaveList); - chunk.setLong("chunkHash", dataEntry.getKey()); - entryList.appendTag(chunk); - } - nbt.setTag("entryList", entryList); - } - - public void scheduleExplosionEffectsOnChunkLoad(long chunkXZKey, int ev, int sourceX, int sourceY, int sourceZ, int power1, int[] directionMask) - { - Set waves; - if(data.containsKey(chunkXZKey)) - { - waves=data.get(chunkXZKey); - } - else - { - waves=new HashSet(1024); - data.put(chunkXZKey, waves); - } - Integer[] wave = new Integer[8]; - wave[0]=ev; - wave[1]=sourceX; - wave[2]=sourceY; - wave[3]=sourceZ; - wave[4]=power1; - wave[5]=directionMask[0]; - wave[6]=directionMask[1]; - wave[7]=directionMask[2]; - waves.add(wave); - } -} -- cgit v1.2.3