mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Low hanging fruit: core.world, core.network, core.lib, core.crafting, some miscs
This commit is contained in:
1 parent
8591551a1b
commit
7ad1820fcb
21 files changed
+125
-49
No files matched your search
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.item.IRelic;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -73,4 +74,9 @@ public class AesirRingRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.item.IAncientWillContainer;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -73,4 +74,8 @@ public class AncientWillRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
+5
@@ -15,6 +15,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.item.ItemBlackHoleTalisman;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -66,4 +67,8 @@ public class BlackHoleTalismanExtractRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.mana.ILens;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.lens.ItemLens;
|
||||
@@ -81,4 +82,9 @@ public class CompositeLensRecipe implements IRecipe {
|
||||
public ItemStack getRecipeOutput() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
import vazkii.botania.api.item.ICosmeticBauble;
|
||||
|
||||
@@ -72,4 +73,9 @@ public class CosmeticAttachRecipe implements IRecipe {
|
||||
public ItemStack getRecipeOutput() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
import vazkii.botania.api.item.ICosmeticBauble;
|
||||
|
||||
@@ -64,4 +65,8 @@ public class CosmeticRemoveRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -100,4 +101,8 @@ public class HelmRevealingRecipe implements IRecipe {
|
||||
return helmItem == ModItems.manasteelHelm || helmItem == ModItems.terrasteelHelm || helmItem == ModItems.elementiumHelm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemKeepIvy;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
@@ -65,4 +66,8 @@ public class KeepIvyRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.mana.ILens;
|
||||
import vazkii.botania.common.item.lens.ItemLens;
|
||||
@@ -96,4 +97,8 @@ public class LensDyeingRecipe implements IRecipe {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -71,5 +72,8 @@ public class ManaGunClipRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.mana.ILens;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
|
||||
@@ -75,4 +76,8 @@ public class ManaGunLensRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
|
||||
public class ManaGunRemoveLensRecipe implements IRecipe {
|
||||
@@ -63,4 +64,8 @@ public class ManaGunRemoveLensRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.api.item.IPhantomInkable;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
@@ -66,4 +67,8 @@ public class PhantomInkRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemRegenIvy;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
@@ -82,4 +83,8 @@ public class RegenIvyRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
|
||||
@@ -67,4 +68,8 @@ public class SpecialFloatingFlowerRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
public class SpellClothRecipe implements IRecipe {
|
||||
@@ -71,4 +72,8 @@ public class SpellClothRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraPick;
|
||||
|
||||
@@ -68,4 +69,8 @@ public class TerraPickTippingRecipe implements IRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
|
||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.lib;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public final class LibMisc {
|
||||
|
||||
@@ -32,9 +32,7 @@ public final class LibMisc {
|
||||
// IMC Keys
|
||||
public static final String BLACKLIST_ITEM = "blackListItem";
|
||||
|
||||
public static final ForgeDirection[] CARDINAL_DIRECTIONS = new ForgeDirection[] {
|
||||
ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.EAST, ForgeDirection.WEST
|
||||
};
|
||||
public static final EnumFacing[] CARDINAL_DIRECTIONS = EnumFacing.HORIZONTALS;
|
||||
|
||||
public static final int[] CONTROL_CODE_COLORS = new int[] {
|
||||
0x000000, 0x0000AA, 0x00AA00, 0x00AAAA,
|
||||
|
||||
@@ -17,44 +17,44 @@ public final class LibObfuscation {
|
||||
|
||||
// EntityAINearestAttackableTarget
|
||||
public static final String[] TARGET_CLASS = new String[] { "targetClass", "field_75307_b", "a" };
|
||||
public static final String[] TARGET_ENTITY = new String[] { "targetEntity", "field_75309_a", "g" };
|
||||
public static final String[] TARGET_ENTITY = new String[] { "targetEntity", "field_75309_a", "d" };
|
||||
|
||||
// EntityAIAttackOnCollide
|
||||
public static final String[] CLASS_TARGET = new String[] { "classTarget", "field_75444_h", "g" };
|
||||
|
||||
// EntityAIAvoidEntity
|
||||
// EntityAIAvoidEntity // todo 1.8
|
||||
public static final String[] TARGET_ENTITY_CLASS = new String[] { "targetEntityClass", "field_75381_h", "i" };
|
||||
|
||||
// EntityCreeper
|
||||
public static final String[] TIME_SINCE_IGNITED = new String[] { "timeSinceIgnited", "field_70833_d", "bq" };
|
||||
public static final String[] TIME_SINCE_IGNITED = new String[] { "timeSinceIgnited", "field_70833_d", "c" };
|
||||
|
||||
// ThreadDownloadImageData
|
||||
public static final String[] TEXTURE_UPLOADED = new String[] { "textureUploaded", "field_110559_g", "i" };
|
||||
public static final String[] BUFFERED_IMAGE = new String[] { "bufferedImage", "field_110560_d", "g" };
|
||||
public static final String[] TEXTURE_UPLOADED = new String[] { "textureUploaded", "field_110559_g", "n" };
|
||||
public static final String[] BUFFERED_IMAGE = new String[] { "bufferedImage", "field_110560_d", "l" };
|
||||
|
||||
// Entity
|
||||
public static final String[] IS_IMMUNE_TO_FIRE = new String[] { "isImmuneToFire", "field_70178_ae", "ag" };
|
||||
public static final String[] IS_IMMUNE_TO_FIRE = new String[] { "isImmuneToFire", "field_70178_ae", "ab" };
|
||||
|
||||
// ItemReed
|
||||
public static final String[] REED_ITEM = new String[] { "field_150935_a", "a" };
|
||||
public static final String[] REED_ITEM = new String[] { "block", "field_150935_a", "a" };
|
||||
|
||||
// EntityAnimal
|
||||
public static final String[] IN_LOVE = new String[] { "inLove", "field_70881_d", "bp" };
|
||||
public static final String[] IN_LOVE = new String[] { "inLove", "field_70881_d", "bk" };
|
||||
|
||||
// EntityPlayer
|
||||
public static final String[] ITEM_IN_USE = new String[] { "itemInUse", "field_71074_e", "f" };
|
||||
public static final String[] ITEM_IN_USE_COUNT = new String[] { "itemInUseCount", "field_71072_f", "g" };
|
||||
public static final String[] ITEM_IN_USE = new String[] { "itemInUse", "field_71074_e", "g" };
|
||||
public static final String[] ITEM_IN_USE_COUNT = new String[] { "itemInUseCount", "field_71072_f", "h" };
|
||||
|
||||
// Potion
|
||||
public static final String[] IS_BAD_EFFECT = new String[] { "isBadEffect", "field_76418_K", "J" };
|
||||
public static final String[] IS_BAD_EFFECT = new String[] { "isBadEffect", "field_76418_K", "K" };
|
||||
|
||||
// EntityHorse
|
||||
public static final String[] HORSE_JUMP_STRENGTH = new String[] { "horseJumpStrength", "field_110271_bv", "bv" };
|
||||
public static final String[] HORSE_CHEST = new String[] { "horseChest", "field_110296_bG", "bG" };
|
||||
public static final String[] HORSE_JUMP_STRENGTH = new String[] { "horseJumpStrength", "field_110271_bv", "br" };
|
||||
public static final String[] HORSE_CHEST = new String[] { "horseChest", "field_110296_bG", "bC" };
|
||||
|
||||
// PlayerControllerMP
|
||||
public static final String[] NET_CLIENT_HANDLER = new String[] { "netClientHandler", "field_78774_b", "b" };
|
||||
public static final String[] CURRENT_GAME_TYPE = new String[] { "currentGameType", "field_78779_k", "k" };
|
||||
public static final String[] CURRENT_GAME_TYPE = new String[] { "currentGameType", "field_78779_k", "i" };
|
||||
|
||||
// MobSpawnerBaseLogic
|
||||
public static final String[] SPAWN_RANGE = new String[] { "spawnRange", "field_98290_m", "m" };
|
||||
@@ -62,7 +62,7 @@ public final class LibObfuscation {
|
||||
public static final String[] MAX_NEARBY_ENTITIES = new String[] { "maxNearbyEntities", "field_98292_k", "k" };
|
||||
public static final String[] MAX_SPAWN_DELAY = new String[] { "maxSpawnDelay", "field_98293_h", "h" };
|
||||
public static final String[] MIN_SPAWN_DELAY = new String[] { "minSpawnDelay", "field_98283_g", "g" };
|
||||
public static final String[] POTENTIAL_ENTITY_SPAWNS = new String[] { "potentialEntitySpawns", "field_98285_e", "e" };
|
||||
public static final String[] POTENTIAL_ENTITY_SPAWNS = new String[] { "potentialEntitySpawns", "field_98285_e", "e" }; // Todo 1.8 new name makes no sense -> "minecartToSpawn"
|
||||
|
||||
// GuiIngame
|
||||
public static final String[] REMAINING_HIGHLIGHT_TICKS = new String[] { "remainingHighlightTicks", "field_92017_k", "r" };
|
||||
@@ -75,11 +75,11 @@ public final class LibObfuscation {
|
||||
|
||||
// GuiChat
|
||||
public static final String[] INPUT_FIELD = new String[] { "inputField", "field_146415_a", "a" };
|
||||
public static final String[] COMPLETE_FLAG = new String[] { "field_146414_r", "r" };
|
||||
public static final String[] COMPLETE_FLAG = new String[] { "waitingOnAutocomplete", "field_146414_r", "r" };
|
||||
|
||||
// Entityliving
|
||||
public static final String[] GET_LIVING_SOUND = new String[] { "getLivingSound", "func_70639_aQ", "t" };
|
||||
public static final String[] GET_LIVING_SOUND = new String[] { "getLivingSound", "func_70639_aQ", "z" };
|
||||
|
||||
// TextureAtlasSprite
|
||||
public static final String[] ANIMATION_METADATA = new String[] { "animationMetadata", "field_110982_k", "j" };
|
||||
public static final String[] ANIMATION_METADATA = new String[] { "animationMetadata", "field_110982_k", "k" };
|
||||
}
|
||||
@@ -54,8 +54,8 @@ public final class SkyblockWorldEvents {
|
||||
World world = player.worldObj;
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(world)) {
|
||||
BlockPos coords = world.getSpawnPoint();
|
||||
if(world.getBlock(coords.posX, coords.posY - 4, coords.posZ) != Blocks.bedrock && world.provider.dimensionId == 0)
|
||||
spawnPlayer(player, coords.posX, coords.posY, coords.posZ, false);
|
||||
if(world.getBlockState(coords.down(4)).getBlock() != Blocks.bedrock && world.provider.getDimensionId() == 0)
|
||||
spawnPlayer(player, coords, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,12 +69,12 @@ public final class SkyblockWorldEvents {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(event.world)) {
|
||||
ItemStack equipped = event.entityPlayer.getCurrentEquippedItem();
|
||||
if(event.action == Action.RIGHT_CLICK_BLOCK && equipped == null && event.entityPlayer.isSneaking()) {
|
||||
Block block = event.world.getBlock(event.x, event.y, event.z);
|
||||
Block block = event.world.getBlockState(event.pos).getBlock();
|
||||
if(block == Blocks.grass || block == Blocks.dirt) {
|
||||
if(event.world.isRemote)
|
||||
event.entityPlayer.swingItem();
|
||||
else {
|
||||
event.world.playSoundEffect(event.x + 0.5, event.y + 0.5, event.z + 0.5, block.stepSound.getBreakSound(), block.stepSound.getVolume() * 0.4F, block.stepSound.getPitch() + (float) (Math.random() * 0.2 - 0.1));
|
||||
event.world.playSoundEffect(event.pos.getX() + 0.5, event.pos.getY() + 0.5, event.pos.getZ() + 0.5, block.stepSound.getBreakSound(), block.stepSound.getVolume() * 0.4F, block.stepSound.getFrequency() + (float) (Math.random() * 0.2 - 0.1));
|
||||
if(Math.random() < 0.8)
|
||||
event.entityPlayer.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.manaResource, 1, 21), false);
|
||||
}
|
||||
@@ -84,11 +84,7 @@ public final class SkyblockWorldEvents {
|
||||
|
||||
if(movingobjectposition != null) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && !event.world.isRemote) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
||||
if(event.world.getBlock(i, j, k).getMaterial() == Material.water) {
|
||||
if(event.world.getBlockState(event.pos).getBlock().getMaterial() == Material.water) {
|
||||
--equipped.stackSize;
|
||||
|
||||
if(equipped.stackSize <= 0)
|
||||
@@ -103,7 +99,7 @@ public final class SkyblockWorldEvents {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDrops(HarvestDropsEvent event) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(event.world) && event.block == Blocks.tallgrass) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(event.world) && event.state.getBlock() == Blocks.tallgrass) {
|
||||
ItemStack stackToRemove = null;
|
||||
for(ItemStack stack : event.drops)
|
||||
if(stack.getItem() == Items.wheat_seeds && event.world.rand.nextInt(10) == 0) {
|
||||
@@ -118,7 +114,7 @@ public final class SkyblockWorldEvents {
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnPlayer(EntityPlayer player, int x, int y, int z, boolean fabricated) {
|
||||
public static void spawnPlayer(EntityPlayer player, BlockPos pos, boolean fabricated) {
|
||||
NBTTagCompound data = player.getEntityData();
|
||||
if(!data.hasKey(EntityPlayer.PERSISTED_NBT_TAG))
|
||||
data.setTag(EntityPlayer.PERSISTED_NBT_TAG, new NBTTagCompound());
|
||||
@@ -127,12 +123,12 @@ public final class SkyblockWorldEvents {
|
||||
final boolean test = false;
|
||||
|
||||
if(test || !persist.getBoolean(TAG_HAS_OWN_ISLAND)) {
|
||||
createSkyblock(player.worldObj, x, y, z);
|
||||
createSkyblock(player.worldObj, pos);
|
||||
|
||||
if(player instanceof EntityPlayerMP) {
|
||||
EntityPlayerMP pmp = (EntityPlayerMP) player;
|
||||
pmp.setPositionAndUpdate(x + 0.5, y + 1.6, z + 0.5);
|
||||
pmp.setSpawnChunk(new BlockPos(x, y, z), true);
|
||||
pmp.setPositionAndUpdate(pos.getX() + 0.5, pos.getY() + 1.6, pos.getZ() + 0.5);
|
||||
pmp.setSpawnChunk(pos, true, 0); // todo 1.8 verify last parm
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.lexicon));
|
||||
}
|
||||
|
||||
@@ -154,14 +150,14 @@ public final class SkyblockWorldEvents {
|
||||
}
|
||||
}
|
||||
|
||||
public static void createSkyblock(World world, int x, int y, int z) {
|
||||
public static void createSkyblock(World world, BlockPos pos) {
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int j = 0; j < 4; j++)
|
||||
for(int k = 0; k < 3; k++)
|
||||
world.setBlock(x - 1 + i, y - 1 - j, z - 1 + k, j == 0 ? Blocks.grass : Blocks.dirt);
|
||||
world.setBlock(x - 1, y - 2, z, Blocks.flowing_water);
|
||||
world.setBlock(x + 1, y + 2, z + 1, ModBlocks.manaFlame);
|
||||
((TileManaFlame) world.getTileEntity(x + 1, y + 2, z + 1)).setColor(new Color(70 + world.rand.nextInt(185), 70 + world.rand.nextInt(185), 70 + world.rand.nextInt(185)).getRGB());
|
||||
world.setBlockState(pos.add(-1 + i, -1 - j, -1 + k), j == 0 ? Blocks.grass.getDefaultState() : Blocks.dirt.getDefaultState());
|
||||
world.setBlockState(pos.add(-1, -2, 0), Blocks.flowing_water.getDefaultState());
|
||||
world.setBlockState(pos.add(1, 2, 1), ModBlocks.manaFlame.getDefaultState());
|
||||
((TileManaFlame) world.getTileEntity(pos.add(1, 2, 1))).setColor(new Color(70 + world.rand.nextInt(185), 70 + world.rand.nextInt(185), 70 + world.rand.nextInt(185)).getRGB());
|
||||
|
||||
int[][] rootPositions = new int[][] {
|
||||
{ -1, -3, -1 },
|
||||
@@ -177,9 +173,9 @@ public final class SkyblockWorldEvents {
|
||||
{ +0, -6, +3 },
|
||||
};
|
||||
for(int[] root : rootPositions)
|
||||
world.setBlock(x + root[0], y + root[1], z + root[2], ModBlocks.root);
|
||||
world.setBlockState(pos.add(root[0], root[1], root[2]), ModBlocks.root.getDefaultState());
|
||||
|
||||
world.setBlock(x, y - 4, z, Blocks.bedrock);
|
||||
world.setBlockState(pos.down(4), Blocks.bedrock.getDefaultState());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,11 +32,6 @@ public class WorldTypeSkyblock extends WorldType {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVoidParticles(boolean flag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinimumSpawnHeight(World world) {
|
||||
return 86;
|
||||
|
||||
Reference in new issue
Block a user