From 4b433d746f7bf85c99c0da92e12b65b055e351d7 Mon Sep 17 00:00:00 2001 From: soultek101 Date: Wed, 22 Oct 2014 12:49:20 -0400 Subject: [PATCH] Updated Tombstone XP drop and made big changes to Spike item --- .../projectzulu/common/DeathGamerules.java | 14 +- .../common/ProjectZulu_Blocks.java | 5 +- .../projectzulu/common/ProjectZulu_Core.java | 15 +- .../projectzulu/common/ProjectZulu_Mobs.java | 6 - .../common/UpdateEventHandler.java | 19 ++ .../projectzulu/common/UpdateMonitor.java | 98 ++++++++++ .../projectzulu/common/api/BlockList.java | 5 +- .../projectzulu/common/api/ItemList.java | 1 + .../common/blocks/ItemBlockRecipeManager.java | 15 +- .../common/blocks/ItemHammerTool.java | 12 +- .../projectzulu/common/blocks/ItemXPGem.java | 66 +++++++ .../common/blocks/PZFuelHandler.java | 3 +- .../SpikesDeclaration.java | 52 +++++- .../XPGemItemDeclaration.java | 29 +++ .../common/blocks/spike/BlockSpikes.java | 168 ++++++++++++++---- .../common/blocks/spike/TileEntitySpikes.java | 72 ++++++++ .../blocks/tombstone/BlockTombstone.java | 7 +- .../blocks/tombstone/TileEntityTombstone.java | 16 +- .../projectzulu/common/core/DefaultProps.java | 4 +- .../common/mobs/entity/EntityDuck.java | 3 - .../assets/projectzulublock/lang/en_US.lang | 7 +- .../assets/projectzulublock/lang/ru_RU.lang | 7 +- .../textures/blocks/spikes_iron.png | Bin 0 -> 299 bytes .../textures/blocks/spikes_iron_poison.png | Bin 0 -> 289 bytes .../textures/blocks/spikes_iron_sticky.png | Bin 0 -> 280 bytes .../textures/blocks/spikes_ivory.png | Bin 0 -> 315 bytes .../textures/blocks/spikes_ivory_poison.png | Bin 0 -> 297 bytes .../textures/blocks/spikes_ivory_sticky.png | Bin 0 -> 285 bytes .../textures/blocks/spikes_stone.png | Bin 0 -> 305 bytes .../textures/blocks/spikes_stone_poison.png | Bin 0 -> 291 bytes .../textures/blocks/spikes_stone_sticky.png | Bin 0 -> 283 bytes .../textures/blocks/spikes_wood.png | Bin 0 -> 302 bytes .../textures/blocks/spikes_wood_poison.png | Bin 0 -> 299 bytes .../textures/blocks/spikes_wood_sticky.png | Bin 0 -> 295 bytes .../projectzulublock/textures/items/xpgem.png | Bin 0 -> 510 bytes .../projectzulumob/textures/giantrat0.png | Bin 1688 -> 1665 bytes src/main/resources/mcmod.info | 2 +- 37 files changed, 545 insertions(+), 81 deletions(-) create mode 100644 src/main/java/com/stek101/projectzulu/common/UpdateEventHandler.java create mode 100644 src/main/java/com/stek101/projectzulu/common/UpdateMonitor.java create mode 100644 src/main/java/com/stek101/projectzulu/common/blocks/ItemXPGem.java create mode 100644 src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/XPGemItemDeclaration.java create mode 100644 src/main/java/com/stek101/projectzulu/common/blocks/spike/TileEntitySpikes.java create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron_poison.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron_sticky.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_poison.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_sticky.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_stone.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_stone_poison.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_stone_sticky.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_wood.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_wood_poison.png create mode 100644 src/main/resources/assets/projectzulublock/textures/blocks/spikes_wood_sticky.png create mode 100644 src/main/resources/assets/projectzulublock/textures/items/xpgem.png diff --git a/src/main/java/com/stek101/projectzulu/common/DeathGamerules.java b/src/main/java/com/stek101/projectzulu/common/DeathGamerules.java index 5f8fc4e..76e5f31 100644 --- a/src/main/java/com/stek101/projectzulu/common/DeathGamerules.java +++ b/src/main/java/com/stek101/projectzulu/common/DeathGamerules.java @@ -220,13 +220,19 @@ public void onPlayerDeath(PlayerDropsEvent event) { /* Get items/XP to drop and clear them from Player */ int xpDropped = 0; + if (dropXP) { if (!player.worldObj.isRemote) { + if (maxDropXP + percKeptXp > 100){ + ProjectZuluLog.warning("Warning : The total of MaxDropXP and percKeptXP is greater than 100. Resetting to default"); + maxDropXP = 100; + percKeptXp = 0; + } //xpDropped = player.experienceTotal; - xpDropped = player.experienceTotal * (maxDropXP/100); - int keptXp = (player.experienceTotal - xpDropped) * (percKeptXp / 100); - - xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped; + xpDropped = (int) (player.experienceTotal * ((float) maxDropXP/100)); + + int keptXp = (int) ((player.experienceTotal - xpDropped) * ((float) percKeptXp / 100)); + //xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped; redistributor.addExperience(player, keptXp >= 0 ? keptXp : 0); player.experienceLevel = 0; diff --git a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Blocks.java b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Blocks.java index db6a340..f429674 100644 --- a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Blocks.java +++ b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Blocks.java @@ -92,9 +92,10 @@ public void registration(ItemBlockManager manager) { new PalmTreeSlabDeclaration(), new PalmTreeDoubleSlabDeclaration(), new PalmTreeStairsDeclaration(), new PalmTreeLeavesDeclaration(), new PalmTreeSapling(), new CoconutDeclaration(), new QuickSandDeclaration(), new NightBloomDeclaration(), new CreeperBlossomDeclaration(), - new SpikesDeclaration(), new CampfireDeclaration(), new MobSkullsDeclaration(), + new SpikesDeclaration("Ivory"), new CampfireDeclaration(), new MobSkullsDeclaration(), new TombstoneDeclaration(), new UniversalFlowerPotDeclaration(), new BrewingStandSingleDeclaration(), - new BrewingStandTripleDeclaration()); + new BrewingStandTripleDeclaration(), new SpikesDeclaration("Wood"), new SpikesDeclaration("Stone"), + new SpikesDeclaration("Iron")); manager.addItemBlock(new AnkhDeclaration(), new AloeVeraSeedsDeclaration(), new WaterDropletDeclaration(), new CoconutMilkFragmentDeclaration(), new CoconutSeedDeclaration(), new CoconutShellDeclaration(), diff --git a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Core.java b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Core.java index 021d3a9..8333b81 100644 --- a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Core.java +++ b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Core.java @@ -88,6 +88,11 @@ public static int getNextDefaultEggID() { // public static PacketPipeline getPipeline() { // return packetPipeline; // } + + public static String Updates = ""; + public static boolean modOutDated = false; + public static boolean checkForUpdates = true; + //UpdateEventHandler UEH = new UpdateEventHandler(); @SidedProxy(clientSide = "com.stek101.projectzulu.common.ClientProxyProjectZulu", serverSide = "com.stek101.projectzulu.common.CommonProxyProjectZulu") public static CommonProxyProjectZulu proxy; @@ -110,6 +115,10 @@ public String getIdentifier() { @EventHandler public void preInit(FMLPreInitializationEvent event) { + //if (checkForUpdates) + // UpdateMonitor.checkForUpdates(); + //FMLCommonHandler.instance().bus().register(new UpdateEventHandler()); + modConfigDirectoryFile = event.getModConfigurationDirectory(); ProjectZuluLog.configureLogging(modConfigDirectoryFile); @@ -166,8 +175,7 @@ public void preInit(FMLPreInitializationEvent event) { ProjectZuluLog.info("Completed ItemBlock Registration"); ProjectZuluLog.info("Registering Entites"); - CustomEntityManager.INSTANCE.registerEntities(modConfigDirectoryFile); - + CustomEntityManager.INSTANCE.registerEntities(modConfigDirectoryFile); } private void attemptLoadModule(String classResourceName) { @@ -238,5 +246,6 @@ public void serverStart(FMLServerStartedEvent event) { moduleInfo.module.serverStart(event, modConfigDirectoryFile); } } - } + } + } diff --git a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Mobs.java b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Mobs.java index 33026b5..74bce20 100644 --- a/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Mobs.java +++ b/src/main/java/com/stek101/projectzulu/common/ProjectZulu_Mobs.java @@ -34,14 +34,8 @@ import com.stek101.projectzulu.common.mobs.entitydefaults.GreenFinchDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.HauntedArmorDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.HornbillDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseBeigeDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.HorseBlackDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseBrownDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseDarkBlackDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseDarkBrownDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseGreyDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.HorseRandomDeclaration; -import com.stek101.projectzulu.common.mobs.entitydefaults.HorseWhiteDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.LizardDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.LizardSpitDeclaration; import com.stek101.projectzulu.common.mobs.entitydefaults.MammothDeclaration; diff --git a/src/main/java/com/stek101/projectzulu/common/UpdateEventHandler.java b/src/main/java/com/stek101/projectzulu/common/UpdateEventHandler.java new file mode 100644 index 0000000..2d38892 --- /dev/null +++ b/src/main/java/com/stek101/projectzulu/common/UpdateEventHandler.java @@ -0,0 +1,19 @@ +package com.stek101.projectzulu.common; + +import net.minecraft.util.ChatComponentText; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; + +public class UpdateEventHandler { + + @SubscribeEvent + public void checkForUpdate(PlayerEvent.PlayerLoggedInEvent event) + { + if(ProjectZulu_Core.modOutDated) + { + event.player.addChatComponentMessage(new ChatComponentText("Attention : Your copy of the Project Zulu mod for MC 1.7.10 is Outdated. Please visit the Project Zulu for MC 1.7.10 thread in the Minecraft Forums to get the latest copy.")); + //event.player.addChatComponentMessage(new ChatComponentText("Changelog: http://www.yahoo.com")); + //event.player.addChatComponentMessage(new ChatComponentText(updates)); + } + } +} diff --git a/src/main/java/com/stek101/projectzulu/common/UpdateMonitor.java b/src/main/java/com/stek101/projectzulu/common/UpdateMonitor.java new file mode 100644 index 0000000..5473459 --- /dev/null +++ b/src/main/java/com/stek101/projectzulu/common/UpdateMonitor.java @@ -0,0 +1,98 @@ +package com.stek101.projectzulu.common; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; + +import com.stek101.projectzulu.common.core.DefaultProps; + +public class UpdateMonitor { + + + public static void checkForUpdates() + { + int currentVersion = DefaultProps.Version_Code; + int nextVersion = getLatest(); + if (currentVersion < nextVersion) + { + //ProjectZulu_Core.Updates = getUpdate(nextVersion); + ProjectZulu_Core.modOutDated = true; + } + else + { + ProjectZulu_Core.modOutDated = false; + } + } + + public static int getLatest() + { + try + { + URL url = new URL("http://soultek101.weebly.com/uploads/4/1/2/0/41209035/versioncontrol.txt"); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setRequestProperty("Content-Language", "en-US"); + connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"); + connection.setUseCaches(false); + connection.setDoInput(true); + connection.setDoOutput(true); + + InputStream is = connection.getInputStream(); + + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String line; + StringBuffer response = new StringBuffer(); + + while ((line = br.readLine()) != null) + { + response.append(line); + } + br.close(); + return Integer.parseInt(response.toString()); + } + catch (IOException e) + { + e.printStackTrace(); + } + return -1; + } + + /* private static String getUpdate(int version) + { + try + { + URL url = new URL("http://soultek101.weebly.com/uploads/4/1/2/0/41209035/versioncontrol.txt"); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + + connection.setRequestMethod("POST"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setRequestProperty("Content-Language", "en-US"); + connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"); + connection.setUseCaches(false); + connection.setDoInput(true); + connection.setDoOutput(true); + + InputStream is = connection.getInputStream(); + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String line; + StringBuffer response = new StringBuffer(); + + while ((line = br.readLine()) != null) + { + response.append(line); + } + br.close(); + return response.toString(); + } + catch (IOException e) + { + e.printStackTrace(); + } + return "Error"; + } */ + +} diff --git a/src/main/java/com/stek101/projectzulu/common/api/BlockList.java b/src/main/java/com/stek101/projectzulu/common/api/BlockList.java index 57d6de4..ce51c89 100644 --- a/src/main/java/com/stek101/projectzulu/common/api/BlockList.java +++ b/src/main/java/com/stek101/projectzulu/common/api/BlockList.java @@ -26,7 +26,10 @@ public enum BlockList { public static Optional creeperBlossom = Optional.absent(); public static Optional quickSand = Optional.absent(); - public static Optional spike = Optional.absent(); + public static Optional spike_ivory = Optional.absent(); + public static Optional spike_wood = Optional.absent(); + public static Optional spike_stone = Optional.absent(); + public static Optional spike_iron = Optional.absent(); public static Optional campfire = Optional.absent(); public static Optional mobHeads = Optional.absent(); public static Optional tombstone = Optional.absent(); diff --git a/src/main/java/com/stek101/projectzulu/common/api/ItemList.java b/src/main/java/com/stek101/projectzulu/common/api/ItemList.java index de96e1f..52b4b72 100644 --- a/src/main/java/com/stek101/projectzulu/common/api/ItemList.java +++ b/src/main/java/com/stek101/projectzulu/common/api/ItemList.java @@ -37,6 +37,7 @@ public enum ItemList { public static Optional hammerToolNether = Optional.absent(); public static Optional hammerToolDiamond = Optional.absent(); public static Optional hammerToolGold = Optional.absent(); + public static Optional xpGem = Optional.absent(); /* Armor */ public static Optional scaleArmorHead = Optional.absent(); diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/ItemBlockRecipeManager.java b/src/main/java/com/stek101/projectzulu/common/blocks/ItemBlockRecipeManager.java index 3af1fd5..4c9b00e 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/ItemBlockRecipeManager.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/ItemBlockRecipeManager.java @@ -42,6 +42,8 @@ public static void setupBlockModuleRecipies() { 'S' }, new OptionalItemStack(Items.gold_ingot), new OptionalItemStack(Items.stick)); addRecipe(new OptionalItemStack(ItemList.hammerToolDiamond), new String[] { "XSX", " S ", " S " }, new char[] { 'X', 'S' }, new OptionalItemStack(Items.diamond), new OptionalItemStack(Items.stick)); + addRecipe(new OptionalItemStack(ItemList.hammerToolDiamond), new String[] { "XSX", " S ", " S " }, new char[] { 'X', + 'S' }, new OptionalItemStack(Items.diamond), new OptionalItemStack(Items.stick)); /* Tombstone */ addRecipe(new OptionalItemStack(BlockList.tombstone), new String[] { "CCC", "CSC", "CCC" }, new char[] { 'C', @@ -143,8 +145,19 @@ public static void setupBlockModuleRecipies() { addShapelessRecipe( new OptionalItemStack(ItemList.genericCraftingItems, 2, ItemGenerics.Properties.Salt.meta()), new OptionalItemStack(Items.gunpowder)); - addRecipe(new OptionalItemStack(BlockList.spike), new String[] { " ", " ", "TTT" }, 'T', + + addRecipe(new OptionalItemStack(BlockList.spike_ivory), new String[] { " ", " ", "TTT" }, 'T', new OptionalItemStack(ItemList.genericCraftingItems, 1, ItemGenerics.Properties.Tusk.meta())); + + addRecipe(new OptionalItemStack(BlockList.spike_wood), new String[] { " ", " X ", "XXX" }, 'X', + new OptionalItemStack(Items.stick)); + + addRecipe(new OptionalItemStack(BlockList.spike_iron), new String[] { " ", " X ", "XXX" }, 'X', + new OptionalItemStack(Items.iron_ingot)); + + addRecipe(new OptionalItemStack(BlockList.spike_stone), new String[] { " ", " X ", "XXX" }, 'X', + new OptionalItemStack(Blocks.stone)); + addShapelessRecipe(new OptionalItemStack(Items.string), new OptionalItemStack(ItemList.genericCraftingItems, 1, ItemGenerics.Properties.RawFiber.meta()), new OptionalItemStack(ItemList.genericCraftingItems, 1, ItemGenerics.Properties.RawFiber.meta()), new OptionalItemStack(ItemList.genericCraftingItems, 1, diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/ItemHammerTool.java b/src/main/java/com/stek101/projectzulu/common/blocks/ItemHammerTool.java index 2d12ef3..e20eb8c 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/ItemHammerTool.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/ItemHammerTool.java @@ -16,14 +16,10 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -import com.google.common.base.Optional; import com.google.common.collect.Sets; import com.stek101.projectzulu.common.ProjectZulu_Core; import com.stek101.projectzulu.common.api.BlockList; -import com.stek101.projectzulu.common.api.ItemList; import com.stek101.projectzulu.common.core.DefaultProps; -import com.stek101.projectzulu.common.core.OptionalItemStack; - import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; @@ -293,11 +289,5 @@ else if (blockMetaData == 1){ } return true; } - - // @Override - // public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer entityplayer) { - - - - + } diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/ItemXPGem.java b/src/main/java/com/stek101/projectzulu/common/blocks/ItemXPGem.java new file mode 100644 index 0000000..e8fe504 --- /dev/null +++ b/src/main/java/com/stek101/projectzulu/common/blocks/ItemXPGem.java @@ -0,0 +1,66 @@ +package com.stek101.projectzulu.common.blocks; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import com.stek101.projectzulu.common.ProjectZulu_Core; +import com.stek101.projectzulu.common.core.DefaultProps; + +public class ItemXPGem extends Item { + private int storedXP; + private String playerName; + + public ItemXPGem(boolean full3D, String name, int xpAmount) { + /*maxStackSize = 64; + setMaxDamage(10); + setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab); + bFull3D = full3D; + setHasSubtypes(true); + setUnlocalizedName(name); + setTextureName(DefaultProps.blockKey + ":" + name); + this.storedXP = xpAmount;*/ + this(full3D, name, xpAmount, ""); + } + + public ItemXPGem(boolean full3D, String name, int xpAmount, String playerName) { + super(); + maxStackSize = 1; + setMaxDamage(10); + setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab); + bFull3D = full3D; + setHasSubtypes(true); + setUnlocalizedName(name); + setTextureName(DefaultProps.blockKey + ":" + name); + this.storedXP = xpAmount; + this.playerName = playerName; + } + + public void setStoredXP(int xpAmount){ + storedXP = xpAmount; + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (this.playerName != "") { + if (player.getDisplayName() == this.playerName) + { + player.addExperience(this.storedXP); + itemstack.damageItem(10, player); + } + else + { + System.out.println("Your are not the owner of this XP Gem. BEGONE!!!!"); + } + } + else{ + itemstack.damageItem(10, player); + } + return itemstack; + } + + + + +} \ No newline at end of file diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/PZFuelHandler.java b/src/main/java/com/stek101/projectzulu/common/blocks/PZFuelHandler.java index 5696219..94c5c71 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/PZFuelHandler.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/PZFuelHandler.java @@ -1,8 +1,9 @@ package com.stek101.projectzulu.common.blocks; +import net.minecraft.item.ItemStack; + import com.stek101.projectzulu.common.api.ItemList; -import net.minecraft.item.ItemStack; import cpw.mods.fml.common.IFuelHandler; public class PZFuelHandler implements IFuelHandler { diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/SpikesDeclaration.java b/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/SpikesDeclaration.java index 11d7372..8f07837 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/SpikesDeclaration.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/SpikesDeclaration.java @@ -1,12 +1,14 @@ package com.stek101.projectzulu.common.blocks.itemblockdeclarations; import net.minecraft.block.Block; +import net.minecraft.block.material.Material; import net.minecraftforge.common.config.Configuration; import com.google.common.base.Optional; import com.stek101.projectzulu.common.api.BlockList; import com.stek101.projectzulu.common.blocks.spike.BlockSpikes; import com.stek101.projectzulu.common.blocks.spike.RenderSpike; +import com.stek101.projectzulu.common.blocks.spike.TileEntitySpikes; import com.stek101.projectzulu.common.core.DefaultProps; import com.stek101.projectzulu.common.core.ProjectZuluLog; import com.stek101.projectzulu.common.core.itemblockdeclaration.BlockDeclaration; @@ -17,9 +19,11 @@ public class SpikesDeclaration extends BlockDeclaration { private int renderID = -1; - - public SpikesDeclaration() { - super("Spikes"); + private String material; + + public SpikesDeclaration(String mat) { + super("Spikes" + "_" + mat); + this.material = mat; } @Override @@ -30,17 +34,49 @@ protected void preCreateLoadConfig(Configuration config) { @Override protected boolean createBlock() { - BlockList.spike = Optional - .of(new BlockSpikes(renderID).setHardness(0.5F).setStepSound(Block.soundTypeMetal) - .setBlockName(name.toLowerCase()) + if (material == "Ivory") { + BlockList.spike_ivory = Optional + .of(new BlockSpikes(renderID).setBlockName(name.toLowerCase()) .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase())); + } + else if (material == "Wood") { + BlockList.spike_wood = Optional + .of(new BlockSpikes(renderID, Material.wood, 0).setBlockName(name.toLowerCase()) + .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase())); + } + else if (material == "Stone") { + BlockList.spike_stone = Optional + .of(new BlockSpikes(renderID, Material.rock, 0).setBlockName(name.toLowerCase()) + .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase())); + } + else if (material == "Iron") { + BlockList.spike_iron = Optional + .of(new BlockSpikes(renderID, Material.iron, 0).setBlockName(name.toLowerCase()) + .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase())); + } return true; } @Override protected void registerBlock() { - Block block = BlockList.spike.get(); - GameRegistry.registerBlock(block, name.toLowerCase()); + if (material == "Ivory") { + Block block = BlockList.spike_ivory.get(); + GameRegistry.registerBlock(block, name.toLowerCase()); + GameRegistry.registerTileEntity(TileEntitySpikes.class, "PZTileEntitySpikes"); + } else if (material == "Wood") { + Block block = BlockList.spike_wood.get(); + GameRegistry.registerBlock(block, name.toLowerCase()); + GameRegistry.registerTileEntity(TileEntitySpikes.class, "PZTileEntitySpikesW"); + } else if (material == "Stone") { + Block block = BlockList.spike_stone.get(); + GameRegistry.registerBlock(block, name.toLowerCase()); + GameRegistry.registerTileEntity(TileEntitySpikes.class, "PZTileEntitySpikesS"); + } else if (material == "Iron") { + Block block = BlockList.spike_iron.get(); + GameRegistry.registerBlock(block, name.toLowerCase()); + GameRegistry.registerTileEntity(TileEntitySpikes.class, "PZTileEntitySpikesI"); + } + //GameRegistry.registerTileEntity(TileEntitySpikes.class, "PZTileEntitySpikes"); } @Override diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/XPGemItemDeclaration.java b/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/XPGemItemDeclaration.java new file mode 100644 index 0000000..2143638 --- /dev/null +++ b/src/main/java/com/stek101/projectzulu/common/blocks/itemblockdeclarations/XPGemItemDeclaration.java @@ -0,0 +1,29 @@ +package com.stek101.projectzulu.common.blocks.itemblockdeclarations; + +import net.minecraft.item.Item; + +import com.google.common.base.Optional; +import com.stek101.projectzulu.common.api.ItemList; +import com.stek101.projectzulu.common.blocks.ItemXPGem; +import com.stek101.projectzulu.common.core.itemblockdeclaration.ItemDeclaration; + +import cpw.mods.fml.common.registry.GameRegistry; + +public class XPGemItemDeclaration extends ItemDeclaration { + + public XPGemItemDeclaration() { + super("XPGem"); + } + + @Override + protected boolean createItem() { + ItemList.xpGem = Optional.of(new ItemXPGem(false, name.toLowerCase(), 0)); + return true; + } + + @Override + protected void registerItem() { + Item item = ItemList.xpGem.get(); + GameRegistry.registerItem(item, name); + } +} \ No newline at end of file diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/spike/BlockSpikes.java b/src/main/java/com/stek101/projectzulu/common/blocks/spike/BlockSpikes.java index 374ce70..a34917e 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/spike/BlockSpikes.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/spike/BlockSpikes.java @@ -3,16 +3,19 @@ import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.IIcon; @@ -26,26 +29,50 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockSpikes extends Block { +public class BlockSpikes extends BlockContainer { - public static final String[] imageSuffix = new String[] { "", "_poison", "_sticky" }; - public int maxDamage; + public static final String[] imageSuffixB = new String[] { "", "_poison", "_sticky" }; + Material blockMaterial; + int defaultIvory; @SideOnly(Side.CLIENT) private IIcon[] icons; public final int renderID; - public BlockSpikes(int renderID) { - super(Material.iron); + public BlockSpikes(int renderID, Material mat, int defaultIvory) { + super(mat); setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab); disableStats(); - setBlockBounds(0f, 0.0F, 0.0f, 1.0f, 0.5f, 1.0f); - setHardness(0.5F); - setStepSound(Block.soundTypeMetal); - this.maxDamage = 5; + setBlockBounds(0f, 0.0F, 0.0f, 1.0f, 0.5f, 1.0f); + this.blockMaterial = mat; + this.defaultIvory = defaultIvory; + if (mat == Material.wood) { + setHardness(1.0F); + setResistance(2.0F); + setStepSound(Block.soundTypeWood); + } + else if (mat == Material.rock){ + setHardness(1.5F); + setStepSound(Block.soundTypeStone); + setResistance(4.0F); + } + else if (mat == Material.iron){ + setHardness(2.5F); + setResistance(6.0F); + setStepSound(Block.soundTypeMetal); + } + else { + setHardness(1.0F); + setResistance(2.0F); + setStepSound(Block.soundTypeGlass); + } this.renderID = renderID; } + + public BlockSpikes(int RenderID){ + this(RenderID, Material.rock, 1); + } @Override @SideOnly(Side.CLIENT) @@ -62,15 +89,16 @@ public IIcon getIcon(int par1, int par2) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { - this.icons = new IIcon[imageSuffix.length]; - for (int i = 0; i < this.icons.length; ++i) { - this.icons[i] = par1IconRegister.registerIcon(getTextureName() + imageSuffix[i]); - } + this.icons = new IIcon[imageSuffixB.length]; + for (int i = 0; i < this.icons.length; ++i) { + this.icons[i] = par1IconRegister.registerIcon(getTextureName() + imageSuffixB[i]); + } } @Override public void setBlockBoundsBasedOnState(IBlockAccess par1iBlockAccess, int par2, int par3, int par4) { - if (par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.fence + + if (par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.fence || par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.nether_brick_fence) { this.setBlockBounds(0.375f, 0.0F, 0.375f, 0.625f, 0.4f, 0.625f); @@ -136,7 +164,6 @@ public void setBlockBoundsBasedOnState(IBlockAccess par1iBlockAccess, int par2, break; } } - } @Override @@ -178,28 +205,62 @@ public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4 @Override public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { + EffectRenderer efrenderer = Minecraft.getMinecraft().effectRenderer; + if ((par5Entity instanceof EntityLiving || par5Entity instanceof EntityPlayer) && ((par5Entity.prevPosY > par3 + this.maxY * 0.9f && par5Entity.posY < par3 + this.maxY * 0.9f) || (par5Entity.prevPosX > par2 + 0.5 && par5Entity.posX < par2 + 0.5) || (par5Entity.prevPosZ > par4 + 0.5 && par5Entity.posZ < par4 + 0.5))) { - - /* Check if Spikes are Poison, If So Also Apply Posion with Damage */ + + /* Check if Spikes are Poison, If So Also Apply Poison with Damage */ if (par1World.getBlockMetadata(par2, par3, par4) > 5 && par1World.getBlockMetadata(par2, par3, par4) < 12) { + if (par5Entity instanceof EntityLiving) ((EntityLiving) par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 40, 1)); + + if (par5Entity instanceof EntityPlayer && !par5Entity.isSneaking()) + ((EntityPlayer) par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 40, 1)); } + if (par1World.getBlockMetadata(par2, par3, par4) > 11) { + if (par5Entity instanceof EntityLiving) ((EntityLiving) par5Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 40, 4)); + + if (par5Entity instanceof EntityPlayer && !par5Entity.isSneaking()) + ((EntityPlayer) par5Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 40, 4)); } - par5Entity.attackEntityFrom(DamageSource.generic, 2); - - //maxDamage = maxDamage - 1; - //System.out.println("spike damage is " + maxDamage); - /* if (this.maxDamage <= 0) { - par1World.spawnParticle("blockdust_" + Block.getIdFromBlock(this) + '_' + par1World.getBlockMetadata(par2, par3, par4), - par2+0.5, par3+1.0, par4+0.5, 0.0D, 0.0D, 0.0D); - par1World.playSoundAtEntity(par5Entity, "random.break", 1.0F, 1.0F); - par1World.setBlockToAir(par2, par3, par4); - this.maxDamage = 5; - } */ + + if (!par5Entity.isSneaking()) { + + if (par5Entity.isSprinting()) { + par5Entity.attackEntityFrom(DamageSource.generic, 6); + } + else + { + par5Entity.attackEntityFrom(DamageSource.generic, 2); + } + + if (par1World.isRemote) { + Random rand = new Random(); + par1World.spawnParticle("crit", par5Entity.posX, par5Entity.posY, par5Entity.posZ, 0.0D, 0.0D, 0.0D); + for (int i = 0; i < 6; i++) { + par1World.spawnParticle("crit", par2 + rand.nextDouble(), par3 + 1 + rand.nextDouble()*0.2, par4 + rand.nextDouble(), 0, 0, 0); + } + } + + TileEntity tileEntity = par1World.getTileEntity(par2, par3, par4); + + if (tileEntity != null && tileEntity instanceof TileEntitySpikes) { + ((TileEntitySpikes) tileEntity).setDamage(1); + //System.out.println("Spike max damage is " + ((TileEntitySpikes) tileEntity).getMaxDmg()); + //System.out.println("Spike current damage is " + ((TileEntitySpikes) tileEntity).getCurrDamage()); + + if (((TileEntitySpikes) tileEntity).getCurrDamage() > ((TileEntitySpikes) tileEntity).getMaxDmg()) { + efrenderer.addBlockDestroyEffects((int)par2 - 1, (int)par3 + 1, (int)par4, Blocks.iron_block, 0); + par1World.playSoundAtEntity(par5Entity, "random.break", 1.0F, 1.0F); + par1World.removeTileEntity(par2, par3, par4); + par1World.setBlockToAir(par2, par3, par4); + } + } + } } super.onEntityCollidedWithBlock(par1World, par2, par3, par4, par5Entity); } @@ -207,6 +268,12 @@ public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int p @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { + int maxSpikeDmg; + int currSpikeDmg; + + TileEntity tileEntityO = par1World.getTileEntity(par2, par3, par4); + maxSpikeDmg = ((TileEntitySpikes) tileEntityO).getMaxDmg(); + currSpikeDmg = ((TileEntitySpikes) tileEntityO).getCurrDamage(); /* Check if Item is Poison Droplet, is so Make Poisonous */ if (par5EntityPlayer.inventory.getCurrentItem() != null @@ -223,8 +290,10 @@ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, E /* If not Poison (meta<6) increase by 6, if sticky(>11) reduce by 6 */ if (par1World.getBlockMetadata(par2, par3, par4) < 6) { + par1World.removeTileEntity(par2, par3, par4); par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 6, 3); } else { + par1World.removeTileEntity(par2, par3, par4); par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) - 6, 3); } } @@ -241,11 +310,18 @@ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, E /* If not Poison or Sticky (meta<6) increase by 12, if Poison(>6 & <11) increase by 6 */ if (par1World.getBlockMetadata(par2, par3, par4) < 6) { + par1World.removeTileEntity(par2, par3, par4); par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 12, 3); } else { + par1World.removeTileEntity(par2, par3, par4); par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 6, 3); } } + + TileEntity tileEntityC = par1World.getTileEntity(par2, par3, par4); + ((TileEntitySpikes) tileEntityC).setMaxDmg(maxSpikeDmg); + ((TileEntitySpikes) tileEntityC).setCurrDamage(currSpikeDmg); + return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9); } @@ -310,6 +386,38 @@ public boolean canPlaceSpikeOn(World world, int x, int y, int z) { || id == Blocks.piston_head || id == Blocks.sticky_piston; } } - + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + int maxSpikeDmgCap = 50; + + if (this.blockMaterial == Material.wood) + { + maxSpikeDmgCap = 50; + } + else if (this.blockMaterial == Material.rock) + { + if (this.defaultIvory == 0){ + maxSpikeDmgCap = 50; + } else { + maxSpikeDmgCap = 90; + } + } + else if (this.blockMaterial == Material.iron) + { + maxSpikeDmgCap = 175; + } + + return new TileEntitySpikes(maxSpikeDmgCap); + } + + /** + * ejects contained items into the world, and notifies neighbours of an update, as appropriate + */ + @Override + public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) { + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } } diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/spike/TileEntitySpikes.java b/src/main/java/com/stek101/projectzulu/common/blocks/spike/TileEntitySpikes.java new file mode 100644 index 0000000..074a8fe --- /dev/null +++ b/src/main/java/com/stek101/projectzulu/common/blocks/spike/TileEntitySpikes.java @@ -0,0 +1,72 @@ +package com.stek101.projectzulu.common.blocks.spike; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +public class TileEntitySpikes extends TileEntity{ + private int spikeMaxDmg = 0; + private int spikeCurDmg = 0; + private static final String NBT_SPIKE_MAX_DMG = "SpikeMaxDamage"; + private static final String NBT_SPIKE_CUR_DMG = "SpikeCurrDamage"; + private NBTTagCompound nbtag = new NBTTagCompound(); + + public TileEntitySpikes(int maxDamage){ + this.spikeMaxDmg = maxDamage; + } + + public TileEntitySpikes(){ + + } + + public void setMaxDmg(int maxDmg){ + this.spikeMaxDmg = maxDmg; + } + + public int getMaxDmg(){ + return this.spikeMaxDmg; + } + + public void setDamage(int damage){ + this.spikeCurDmg = this.spikeCurDmg + damage; + } + + public int getCurrDamage(){ + return this.spikeCurDmg; + } + + public void setCurrDamage(int currDmg){ + this.spikeCurDmg = currDmg; + } + + @Override + public void readFromNBT(NBTTagCompound nbt){ + super.readFromNBT(nbt); + this.spikeMaxDmg = nbt.getInteger(NBT_SPIKE_MAX_DMG); + this.spikeCurDmg = nbt.getInteger(NBT_SPIKE_CUR_DMG); + } + + @Override + public void writeToNBT(NBTTagCompound nbt){ + super.writeToNBT(nbt); + nbt.setInteger(NBT_SPIKE_MAX_DMG, spikeMaxDmg); + nbt.setInteger(NBT_SPIKE_CUR_DMG, spikeCurDmg); + } + + @Override + public Packet getDescriptionPacket(){ + NBTTagCompound tileTag = new NBTTagCompound(); + this.writeToNBT(tileTag); + //return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 0, tileTag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 4, tileTag); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound tag = pkt.func_148857_g(); + readFromNBT(tag); + } + +} diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/BlockTombstone.java b/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/BlockTombstone.java index 316c95f..936a62d 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/BlockTombstone.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/BlockTombstone.java @@ -6,7 +6,7 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -33,6 +33,7 @@ public BlockTombstone(Class par2Class) { setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var5, 0.5F + var4); setHardness(0.5F); setStepSound(Block.soundTypeMetal); + } /** @@ -138,10 +139,10 @@ public void breakBlock(World par1World, int par2, int par3, int par4, Block par5 TileEntity tileEntity = par1World.getTileEntity(par2, par3, par4); if (tileEntity != null && tileEntity instanceof TileEntityTombstone) { - + par1World.spawnEntityInWorld(new EntityXPOrb(par1World, (double)par2 + 0.5D, (double)par3 + 0.5D, (double)par4 + 0.5D, ((TileEntityTombstone) tileEntity).dropXP())); ((TileEntityTombstone) tileEntity).spawnItemsNearPlayer(par1World, par2, par3, par4); } super.breakBlock(par1World, par2, par3, par4, par5, par6); - } + } } diff --git a/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/TileEntityTombstone.java b/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/TileEntityTombstone.java index 4dbcb94..53ce87c 100644 --- a/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/TileEntityTombstone.java +++ b/src/main/java/com/stek101/projectzulu/common/blocks/tombstone/TileEntityTombstone.java @@ -5,8 +5,6 @@ import java.util.List; import java.util.Random; -import com.stek101.projectzulu.common.ProjectZulu_Core; - import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; @@ -18,6 +16,9 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; + +import com.stek101.projectzulu.common.ProjectZulu_Core; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -75,13 +76,20 @@ public void giveItemsToPlayer(EntityPlayer player) { } } + /* Spawn and reset XP amount */ + public int dropXP(){ + int droppedXP = experience; + experience =0; + return droppedXP; + } + /* Spawn items in Tombstone near Player */ public void spawnItemsNearPlayer(World world, int par1, int par2, int par3) { Random rand = new Random(); EntityPlayer player = ProjectZulu_Core.proxy.getClientPlayer(); Side side = FMLCommonHandler.instance().getEffectiveSide(); - player.addExperience(experience); - experience = 0; + //player.addExperience(experience); + //experience = 0; Iterator unSortIterator = deathItems.iterator(); diff --git a/src/main/java/com/stek101/projectzulu/common/core/DefaultProps.java b/src/main/java/com/stek101/projectzulu/common/core/DefaultProps.java index 8d96fff..e2983c8 100644 --- a/src/main/java/com/stek101/projectzulu/common/core/DefaultProps.java +++ b/src/main/java/com/stek101/projectzulu/common/core/DefaultProps.java @@ -1,10 +1,12 @@ package com.stek101.projectzulu.common.core; + public class DefaultProps { /* ModIDs, Dependencies, and Version */ public static final String DesiredBefore = "after:ExtrabiomesXL@"; - public static final String VERSION_STRING = "1.7.10-1.3e"; + public static final String VERSION_STRING = "1.7.10-1.3f"; + public static final int Version_Code = 1710135; public static final String CoreModId = "ProjectZulu|Core"; public static final String BlocksModId = "ProjectZulu|Block"; public static final String MobsModId = "ProjectZulu|Mob"; diff --git a/src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityDuck.java b/src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityDuck.java index 2ad4c38..cbb38a5 100644 --- a/src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityDuck.java +++ b/src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityDuck.java @@ -16,7 +16,6 @@ import net.minecraft.world.World; import com.google.common.base.Optional; -import com.stek101.projectzulu.common.api.BlockList; import com.stek101.projectzulu.common.api.CustomEntityList; import com.stek101.projectzulu.common.api.ItemList; import com.stek101.projectzulu.common.core.DefaultProps; @@ -30,8 +29,6 @@ import com.stek101.projectzulu.common.mobs.entityai.EntityAITempt; import com.stek101.projectzulu.common.mobs.entityai.EntityAIWander; -import cpw.mods.fml.common.Loader; - public class EntityDuck extends EntityGenericAnimal implements IAnimals { private EntityAFightorFlight EAFF; diff --git a/src/main/resources/assets/projectzulublock/lang/en_US.lang b/src/main/resources/assets/projectzulublock/lang/en_US.lang index 5974091..d20b4a1 100644 --- a/src/main/resources/assets/projectzulublock/lang/en_US.lang +++ b/src/main/resources/assets/projectzulublock/lang/en_US.lang @@ -11,7 +11,11 @@ tile.palmtreesapling.name=Palm Tree Sapling tile.quicksand.name=QuickSand tile.nightbloom.name=NightBloom tile.creeperblossom.name=Creeper Blossom -tile.spikes.name=Ivory Spikes +tile.spikes.name=Ivory Spikes Trap +tile.spikes_ivory.name=Ivory Spikes Trap +tile.spikes_iron.name=Iron Spikes Trap +tile.spikes_wood.name=Wood Spikes Trap +tile.spikes_stone.name=Stone Spikes Trap tile.woodcampfire.name=Wood Campfire tile.stonecampfire.name=Stone Campfire tile.litcampfire.name=Lit Wood Campfire @@ -135,6 +139,7 @@ item.hammertoolstone.name=Stone Hammer Tool item.hammertooliron.name=Iron Hammer Tool item.hammertoolgold.name=Gold Hammer Tool item.hammertooldiamond.name=Diamond Hammer Tool +item.xpgem.name=XP Gem potion.shining=Bubbling potion.incendiary=Incendiary diff --git a/src/main/resources/assets/projectzulublock/lang/ru_RU.lang b/src/main/resources/assets/projectzulublock/lang/ru_RU.lang index 114de8d..1fc86dd 100644 --- a/src/main/resources/assets/projectzulublock/lang/ru_RU.lang +++ b/src/main/resources/assets/projectzulublock/lang/ru_RU.lang @@ -11,7 +11,11 @@ tile.palmtreesapling.name=Пальмовый саженец tile.quicksand.name=Зыбучий песок tile.nightbloom.name=Ночной цветок tile.creeperblossom.name=Жуткий цветок -tile.spikes.name=Шипы из слоновой кости +tile.spikes.name=Кот Шипы +tile.spikes_ivory.name=Кот Шипы +tile.spikes_iron.name=Утюг Шипы +tile.spikes_wood.name=Дерево Шипы +tile.spikes_stone.name=Камень Шипы tile.woodcampfire.name=Деревянный костёр tile.stonecampfire.name=Каменный костёр tile.litcampfire.name=Зажжённый деревянный костёр @@ -135,6 +139,7 @@ item.hammertoolstone.name=Камень молоток инструмент item.hammertooliron.name=Утюг молоток инструмент item.hammertoolgold.name=Золото инструмент молоток item.hammertooldiamond.name=Алмазный молоток инструмент +item.xpgem.name=XP камень potion.shining=Кипение potion.incendiary=Зажигательность diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron.png new file mode 100644 index 0000000000000000000000000000000000000000..a8435e20b7524572d4dd43700037a645dda3d2f6 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&$#E=^Z=lmm7Xq+ zAr}5``!;eNau9Iot=CCX>=0mLbYyYdAiyo?vhl-foi&g4eO1#r$(fY;@IX;@e){vg z57*bfF0wIQ`PXmz=dYg|?qsv%T%Rp>{@)tz+)9qcYxIT6QknU7*YY2__wmX;7p3^# zlQR-RVop@v-4mq~y?8FGnuP0nx8UoqnXaThWq!BqgMe^&$Jg&KN*SMBo;kZzT)2Pp ri`;`LCf|gYxz4DV(|I-Zstx1jok#baKDOiz(9sN@u6{1-oD!M<#AS9G literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron_poison.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_iron_poison.png new file mode 100644 index 0000000000000000000000000000000000000000..6d43fd513c26e8957c823f932da9464b229e1d09 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DkxK$!8B)5ZfpL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33J>#Bd(*uBN=6kw0 zhFJI~ORzS}F1cp>r`_lzvx;PcZ{bCjw*Qya{SFEo&ob~ZoWjYjU>L*ZJd>m0G(*gz z05z5d7B4ktgAfi^o=9f1tvm{TS4&zR9J*O7>G)>fIXRI+0f%sIHigD*$I^Bv7(A#u zbR?lGv9WWV7>@%}=~UAMP6>H6wo43$dV>|DE?hmt>c!oC(8Pns!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((G*1`D z5DWig3D#!0E1&*nW1O*d-i+G;#XXjmr3)WDS6d$zza;lSUPZb#9> z%)-995)CY`w6Yb10_=Qvau}`%SC~1o?4GEK1 UiD*xl1au*Tr>mdKI;Vst05OGHc>n+a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory.png new file mode 100644 index 0000000000000000000000000000000000000000..964fb86df0447a053c4b59fba5bac05b04592731 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+L6~vJ#O${~L5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33J>#Bd(*uBNc6z!v zhFJI~ORzS}%2@7uYCpwOjzO~E>oY+&4RQMeY0@4%(=DcSGCbFN=PJl@>kOL^bD~1D zgcc9mi>!kTcS9B^xy|5q$XQ_^k+6dy<pElVG;1g+-z$CgU}4i<>ESwj}IS7 zcyyxZMAk#5zrwQ*nt1Rm6I5XnW=~uY{Y#X`=uD literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_poison.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_poison.png new file mode 100644 index 0000000000000000000000000000000000000000..c675c409c8edecf4f8323070fbcfaa3cb1612e57 GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((a!(h> z5DWig3D#!WCD)Aqv>TmdR*`J*ExgFm_P=|&?_q)CSq2`4Q#jcb3}e`wXL2;0W{7zd zpvKa`;-%(n5W?Zg6Ul70l}EwvYDvq3iI1aaIKJ5`{p|43#-uklt~4=vFo;AbNFBMq zFZ-x>Idpwfw;TLAsWO;Z@lc)aT6(^ns&M*EsZJq{A88ajT mlxOfxecagT{NwUJW(L{k8x~4Ge6j-QWCl-HKbLh*2~7YK+++p- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_sticky.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_ivory_sticky.png new file mode 100644 index 0000000000000000000000000000000000000000..dced4bcb4fbc7a8077df9abed500fe5d68ea78bb GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&$#E=^Z=lm*`6+r zAr}7060FT~S3du5-*kdSMY6&7Bg?}7-P3&!iyY4~2r!(|%AjBT88nr~#ApK0%AK6+#0%2tL23>F&}G~F&=Tfr{g zti{&#_t-Kq9tS4l=U)yv%Xs{6>}=$1kZSVPjag8iWbDE$(2y}h!b7=-e{%E6*gZM7 a>KV4`%<&cF+!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&$#E=^Z=lm^`0({ zAr}5``#16(R^V}&?XqeW-{06YH@C1fH#56+uUy{8Sa&g$p1875J#xnJxs9je_pb}` zy8LZU)>_`L7v7dXozs51@>&YJF y4@YiZs@!h-X3pfP%(@!lvI6;>1s;*b z3=DkxK$!8B)5ZfpL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33J>#Bd(*uBN7J9lk zhFJK&?LW)KWXRK^+|=>@CAW^#!R{|NW~Z_)d@lF9Z|h{=&Gy^aZ7T~DQa+UmY5e{A z+UmYW_g_DG*^Jh9>!%WrrSs+7BGz!NDUW!w=3b+mxHabkBR|!Qqtm$8>Ll*4OON!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((Oivfb z5DWje{f2yp6?j}Pm#o~hC5!KLgyAOE(vBl%PRMeW7)tFPK<(VA(+a9wlR$_3#UK8q^c`~1&vskXdF!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&$#E=^Z=lmHJ&bx zAr}7060FU#YhLR8<4>K$Zsw<>evct%TO-ebG>)+8iNY+M4~5!|1QR^7?Ya~K1eHB_ zS{id4R~SevSj{@yVy~9yQL_n36C^m4vkxp2TeD-o3gbEfkL*T~#v=|ASsdbKTN4@^1KHa8|)^hJ^>u>?i{UPLq_jM%4zt$qkxJod=INCOKHDnQZMTIQx{7F+nOt p!3SuO8s8y@t-A~gIqYBAGdTU&W30c|v;^pG22WQ%mvv4FO#pn9ULODe literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulublock/textures/blocks/spikes_wood_poison.png b/src/main/resources/assets/projectzulublock/textures/blocks/spikes_wood_poison.png new file mode 100644 index 0000000000000000000000000000000000000000..5f7d8cec0fe3694c390cf976e6611c044901c28b GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((N>3NZ z5DWig3D#!WCD)Aqv>TmdR*`J*ExgFm_Fr0kT5?CSsl*bAQ!UIBB=njW`mh{GWzZ|s z5N2{Pj@QNEsb|&~$lq(7~<* z6Azgq$CiolSbbW2ph=<1w|t{Zy(d!ya|c^ygCx_GWT)WM9M@y!2{0^kWNXTpkTxOa nu?U-i^r}wz$XxfjEA!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((QcoAh z5DWig3D#!0E1&lnruzSA>qaL5g<3r2Dm>QU5e+CvDd>Ohj!8O5f zMbZWdv8@RVLK!D`n7!A$)DvU4^+#BZ&5R+7BcP8{;~&4Lu5wIqr4z#$0XG3&Vdl)1 jkBvoH28A5Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc00(qQO+^RY1_BT` zGxJpD=Kufz7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGmPe!Pyhe{TuDShR5(w~ zkH1R-Q2@u^(h~hC4Nd(d2qA-@hDbprL+={8p`oaup>!0B%0+N-=m$YVgOLyzT7!`d zM@v6Wp(}`rD@pDuIq2KHrxz3)URxjd!h^@>!+Yfavfo5Nmrm8z+1y&cu>lo-V>@EX zmBd+XnFMsP3_0X$95LmhsDB42N=#t09bn=o@Kn&C7B1Kel(>M$O|Nz2hg_}VHF^YX zItewqi1JnxCm90$yxU&jBX@&JI0bEP9q*?CwA=#n2LzS9G2F)kEYi}^RyR%34i?ZA z5#f>t5jBLFw^=N&J!2{If&j_D*`7p~bHzCCS_fi^z((?YY#hlN!XbiQ34ZPp4&R1F zfMP^el}RQB?_8LYec;^J;N21n(SWr~F#_{N4+~7(x-s}LgmM2B8~wt-@J@pO#fbDA z_p%oVvIqQV3A{@}|H!rt*~EyLqmns$@}D5&3&@~JDvZJOGynhq07*qoM6N<$f`kUm AOaK4? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/projectzulumob/textures/giantrat0.png b/src/main/resources/assets/projectzulumob/textures/giantrat0.png index c03690d9b1caf36a8d8fd5dcae24fa602f995d8b..7740e28d942962e6f11eeb2f636b3e1bd9c1b1a9 100644 GIT binary patch delta 1573 zcmV+=2HN?U4S@}iB#|)~3cvsW4!{9w)``nGHI7Hd{5@HVFRtlLx~~$6k;m==cBZk%h1#@7zJ*8f+(q zQ4)aQ5kw0lwBY&#FrBwG8}8L?+n~P$+D1P~aQ5heEDO&Md>4Z`eH7Y|IeA!)Qf4P@Cjv%DPu5FYBQ5y#Bw$m;Nb-*BcDsM~ zh4+*l;e(>sjEN-oK{%^Acptd|z1ULbw(7C}Q+P*sSGbSs{QRXEEs})w=SES4n?K&D z^p`6#bSAHpI#Ld9V{G_w0YQEB^io(mzF1D1bs|TPoh1Qfx3+FQ6)SO&pgj=&7DAX^ zTl=S@;tE86XKwDJS$!02cCK8x-noBz^~+~PHzSNvxpq#T>^_VS4Ty;;>%8wTeeAza z`Xqq;>XG4>gvT1uA>uIB&8^k`Ncmo_(C)c1Loib?W0>P4Kz|Dvx%c$>cdkJ0f6;3> z!lOcA&#L=ZNL_y|FLxhu6{5Q(&--G51`udAd6onO9odED7t3|u^Na-k8&sCy?EhQUB}0!kbUZ z^#6xEx6S|=Qw9mxGs36)Pr-l90RBEBBjf*p`XFjp~OPWDtu(2dn@jzh9>}q{d@!o+>_#aeOH2|Ea(WSl*YzNc< z2|DeNWF#A-F8;uyAFFT>HpoY5*XoDyJzVginpNQSyf5XvOwB5G_=808-zbb~Uc&3B z-zU4*srl~08n>@!eguCseIeWqtUXBmy<-c}83fuA!IF*p*H#Y41k~aK@!ne(LL1er zf|Q-7npOG^31EG;fNEaC>ma`L$!=8h-Gwzy@R^!;p%?^tDLTsRV8Ne6C#@cWY(Z!3 zXVjfLu^9VN+K8;*m*Ly}>eCOx^|#kU(^btXXtU?4W{(6i_A!4UQ}YsaeG}DucR|B` z8YU1pzWzJ=q&jK!Si1z>>aUL^Pc6QuNX-r@s(Fc&O^Ry1yTG~0(I;eCV9hca)MBmh zb@;NW(b5!jrdQveHfpmwj<#9CU)8+CFlD%^`D9^E!uhPF-f>Yb0bq*vfk>@w^+46v zFQc`IJ$2Yd2YY{Jn0ioCNx@RYzJMQfY%|)%_@WtUn3Hh6ZKzB}Q2Zv3VA(z(^$VQs z1(+4;31YN1DN7yEPM&R8EL%U>qaNxJe-Y_{jm;* z^UU#&QO6O5MDRx&p3zy*vG*qfPujG5>ad^@P|ErJgin78MmlYC3h_3OcA9iBzGy}o z-cj`tU)OOoNd*;>1m$K;*ko646V`vD_d1e*dM!cg$0OwQnc3uGmk&daE(!5PGt#I# z3uiY4ZxT$k328GGJWm3j+7r-c$~KjcFPbsE;7=yP8K|O+jEszojEszojEu>nDE*px*nDe$pFC7=a-IT{eKe@05bNTIRDb=#q5H} zRwXN_S}n}zO^iPcx)Vc_0Kj=T(HsfQxjq1_%t`0TwNndu+AI?}<>*-u zPFkSWL*W;k)s zKSCUSPoIC~3RJ#CnKC!F+%xlou9iI#($?RS86I#IQg%n44~9w=z|m~-EC_HqvWqJ( z=j*=bS$}c-tKFkoKH8=*LBJkC_X_!}-q`qF?l;{m-z4RSfRGIE{KiH+1Bg=}>1}{y zl8{ZVT=}lOu&^F7fMkf);luCE$-OKq2~!Dkw(zbvAIF7EAWQB6x&K|R%yi2DTGnbE zI&_V4W<2Y>m9w9qy=@7Q-#VSQpOWtlWVoH5o>c4YW0y}_3Wge;#!#gD0QrTql$-O+2p=J#~c~P7?G)Zj&gYwRef(k$36|?2n=8ToqbY+w05jtoNn!xXOgE@-&e%4LyW4P zBc>Chs_!i@ZglnuSr%BcOa`@DEqoikZfv$xIi2+C$5Th`cGpptCHz&@bBt1ltEx{H zW+aTyTIvlKCl__m=k8BXz=Je+0wfY>i^wih5Plmo