Inactive [MECH] HomeIsWhereTheHeartIs v1.3 - keybased protection, score and a reason for conflicts [1.2.5-R4]

Discussion in 'Inactive/Unsupported Plugins' started by Resident Emil, Dec 16, 2011.

  1. Offline

    Resident Emil


    HomeIsWhereTheHeartIs - keybased protection, score and a reason for conflicts:
    Version: v1.3.2

    [​IMG]

    What's the use of fortresses and castles if anybody can just mine right in? What's the use of labyrinths if anyone just mine right through them? Why build traps if people just bypass them by mining around them?
    I made this plugin because I got tired of the lack of game play mechanics in Minecraft.

    Basic premises of plugin:
    On first join find yourself in a indestructible room without escape. Select your spawn location by pushing any of four buttons (nort, east, south or west). Gather ten blocks of obsidian and build a heart for protection. In front of the heart you set the key (three blocks) and put one block of iron, gold or diamond to fuel the heart. As long as the three leftmost slots in your inventory is the same as the key you have permission within the hearts protected volume (radius configurable). Without the correct key the volume is protected by the level of protection offered by the choice of fuel. Put a sign on the heart and write a team name on the first line. Several hearts can have the same team name. Hearts do not need to share the key even if they belong to the same team. All iron, gold and diamond put in the chest behind the heart counts as team points. Points are calculated and displayed every time a chest behind a heart is opened. For players without the right key it becomes cumbersome to mine within a hearts protected volume. Also man made blocks/items (bricks, fence, doors, ovens, crafting tables etc) can't be destroyed by mining or be used (buttons, levers and pressure plates are excluded). However they are still vulnerable to TNT.

    What does this mean:
    • You can build amazing castles and bases that actually takes some cunning and fighting to break into.
    • TNT now matters!
    • Traps now matters too!
    • Should you mine and collect valuable material or should you attack and steal from other teams savings?
    • Should you use valuable material for score or to make tools?
    • Lots of room for betrayal and backstabing through distributing key to enemy, changing key without team mates knowledge, running off with amassed treasure etc.
    • No commands! Either you know the right key or you don't!
    • More than 30,000 possible key combinations.
    Features:


    • On first join players get to choose their spawn location on the server [north, east, south, west] (configurable distance).
    • Build heart to protect volume around heart (configurable radius).
    • Iron, Gold and Diamond block used as fuel for heart, each with different level of protection:
      Iron block - Items/manmade blocks unmineable and harder to mine for players without the right key.
      Gold block - Same as iron plus players without the right key can't build. Also no mobspawn above level 62 within hearts protected volume (configurable level).
      Diamond block - Same as gold but no mobspawn at all within hearts protected volume.
    • Each heart has a key for permission and a chest for score.
    • Each heart can be assigned to a team through a sign (Only first line on sign matters).
    • Keys are set in each players inventory (the three leftmost slots).
    • If two hearts overlap the oldest one has precedence.
    • Open the chest behind any heart to calculate and display score per team, based on iron, gold and diamond in heart-chests.
    • In protected areas mining is more cumbersome for players without the right key.
    • In protected areas man made blocks/items cannot be destroyed by mining (However they can still be destroyed by TNT).
    Instruction:


    Put HomeIsWhereTheHeartIs.jar in plugin directory.
    Start and stop server once to generate config file.

    Download The HomeIsWhereTheHeartIs Plugin Download from Dev Bukkit page

    Config.yml file with english translation Default config is now in English



    Known issues:
    • Sometimes the chunks for the selected spawn area is not loaded fast enough when chosen for the first time, and the player falls to his death. This shouldn't matter too much as all players have no items on join and a respawn puts the player back in the correct location.
    • This is my first ever Java programming. I have tried to squash all bugs but expect to find bugs/issues.
    • Also the settings bestFuelMobCancel, betterFuelMobNerf and useHeartChest are currently unused.
    Future development:
    • I would like to implement so that armor and TNT can not be carried at the same time. This because TNT now has a much more powerful role and being able to spot enemies likely to carry TNT would add to the game play.
    Changelog:

    Version 1.3.2

    Just tested on 1.2.5-R4, still works fine.
    Moved lots of previously hardcoded stuff to the config. The following are now configurable:
    • cancelMob: 50,51,52,53,54,55,56,57,58,59,60,61,62,63
    • breakProtectedItems: 25,26,27,28,29,33,34,45,47,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,77,84,85,91,93,94,95,96,98,101,107,108,109,112,113,114,116,117,118,120
    • useProtectedItems: 26,54,58,61,62,64,95,96,107,116,117
    • allowedBlocks: 46,51,77
    • blockSubstitution: 121>98,42>41,53>5,57>42,87>48,1>4,5>24,43>44,41>24,89>88,48>89,44>82,24>12,4>13
    • Fixed a couple of bugs where I accidentally (sloppily :)) used the default world without checking the actual world of the heart. This bugged out hearts in other worlds than the standard, made score only calculate contents of chests in the same world as the player and so on. I believe I have fixed them all.
    • This version creates a new config, so you should stop the server, delete (or move) your current config and then restart the server.
    Version 1.3.1
    • Updated to work with CB1.2.3-R0.2
    Version 1.3
    • New config value, useSpawnBox. Set to false if you do not want to use the room where players first spawn and choose their destination.
    • You MUST add the field useSpawnBox to the config.yml file. It should be directly below "Spawn:". Dont forget the two leading spaces. If you're not familiar with editing yml files it's better to stop the server, delete config.yml, update the .jar file and start the server again. Then a completely new config.yml file will be created.
    • Fuel consumption is implemented but not thouroughly tested. Set consumeFuel to true in config to enable. consumeCheckInterval sets how often the server should check if a heart has consumed its fuel. consumeTime is how long before a block of fuel is consumed. A value of 20 is one second. Default consumeTime is 24000 which is 20 minutes (One complete MC day cycle).
    • The best fuel in a heart is consumed first
    • Pressing a button no longer calculates and shows score. This is now done by using one of the chests on the backside of a heart. This means that you can not check score if you do not have access to a heart.
    Version 1.2
    • Default config now in English
    • Placing TNT in area protected by either gold or diamond fuel without having the right key now places primed TNT entity.
    Version 1.1

    • Releasing the plugin
     
    afistofirony, MeneXia and DrAgonmoray like this.
  2. Offline

    Resident Emil

  3. Offline

    jinS

    wow.. very nice.. very well thanks
     
  4. Offline

    Resident Emil

    Thanks.
    Hope you have fun with it. I just release a minor update. With the 1.1 release TNT could not be placed in a protected area (fueled by gold or diamond) unless you had the right key. This made TNT useless. I have now updated the plugin so that TNT placed in a protected area by player without the right key spawns a Primed TNT entity.
    Also the plugin now generates a config file translated to english by default.

    br,
    Emil

    PS. All files should be downloaded from the Dev Bukkit page.
     
  5. Offline

    DrAgonmoray

    Wow.

    I like this idea. Great job.
     
  6. Offline

    Resident Emil

    Now updated to v1.3
    FuelConsumption is implemented (though somwhat experimental).
    The "SpawnBox" is now optional.
    Buttons are no longer used to calculate and display score. Opening one of the chests on the backside of a heart now initiates score calculation and display.

    Check changelog above.

    Have fun!!

    PS. Am I doing something wrong? When will this be moved to Plugin releases?
     
  7. Offline

    md_5

    Great post, love it when people read the submissions. Except 1.1-R4 please
     
  8. Offline

    Resident Emil

    [Edit] md_5 Just saw your edit about R1.1-R4. I guess you mean I should update to latest bukkit release. Will do as soon as I have time.

    Thank you very much!
     
  9. Offline

    md_5

    The time is now!
    For R7 that is
     
  10. Offline

    Resident Emil

    @md_5​
    The plugin is now updated to work with CB1.2.3-R0.2 (#1390).​
    Have a nice day!​
    RE​
     
  11. Offline

    md_5

    I changed the title for you, approved
     
  12. Offline

    Resident Emil

    Thank you!
     
  13. Offline

    Resident Emil

    I have uploaded a new beta version (1.3.2 beta) at the Bukkit Dev site. This new version moves a lot of previously hard-coded stuff to the config file. With this version it is now possible to:
    • Specify what mob spawns are cancelled within the influence zone of a gold or diamond fueled heart
    • Specify what blocks are unbreakable within the influence zone of a heart
    • Specify what items cannot be used within the influence zone of a gold or diamond fueled heart
    • Specify what a block turns into when mined within the influence zone of a heart
    The config options are described in more detail in the files changelog.
    There are some debug info being written to the console:
    • What values are loaded into the array's for the above mentioned functionality
    • Whenever a mob is spawned or cancelled within a heart's influence zone
    I have sanity checked the functionality, but not much more. There might be issues due to these changes. If you find any, please report them.
    Have fun!
    RE
     
  14. Offline

    Drelnoch

    Hey, I really like the concept behind this mod, and I'd love to use it. However, I've found a serious bug that occurs after restarting the server when hearts exist in worlds other than the start world; i.e. the name specified in server.properties. This occurs both in the nether and in any worlds created with multiverse.

    Craftbukkit version: 1.2.4-R1
    Plugins Active: HomeIsWhereTheHeartIs V1.3.2 beta

    Spawn world is named "release".

    Error is as follows:
    Code:
    01:58:12 [SEVERE] Could not pass event CreatureSpawnEvent to RE-HomeIsWhereTheHeartIs
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:224)
            at net.minecraft.server.World.addEntity(World.java:890)
            at net.minecraft.server.SpawnerCreature.spawnEntities(SpawnerCreature.java:159)
            at net.minecraft.server.World.doTick(World.java:1739)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:541)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
         
    Caused by: java.lang.IllegalArgumentException: Cannot measure distance between release_nether and release
            at org.bukkit.Location.distanceSquared(Location.java:381)
            at org.bukkit.Location.distance(Location.java:364)
            at me.ResidentEmil.HomeIsWhereTheHeartIs.HomeIsWhereTheHeartIs.checkWithinHeartRange(HomeIsWhereTheHeartIs.java:218)
            at me.ResidentEmil.HomeIsWhereTheHeartIs.HomeIsWhereTheHeartIsEntityListener.onCreatureSpawn(HomeIsWhereTheHeartIsEntityListener.java:32)
            at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
            ... 9 more
    Steps taken to cause this bug:
    1: Entered nether, created heart
    2: Placed key, placed fuel (iron block)
    At this point, the Heart functions as expected.
    3: Stopped the server, restarted
    4: Logged back into the same area I logged out (in the heart area)
     
  15. Offline

    Resident Emil

    Hi,
    Nice to hear that you like the plugin. I will look into this error. I have had hearts in "other" worlds before with no problem, but something might have gone wrong with the latest release/bukkit releases.

    Hi,
    I just uploaded HomeIsWhereTheHeartIs v1.3.2 on the Dev Bukkit page. I found a couple of places where I sloppily used the default world for any heart, when reloading a heart from the hearts.tml file for example. It has now been corrected and should work correctly. I have been playing around with it and can't reproduce this error. This also fixed a number of other errors.

    Pay attention that I am not using any plugins like multiverse. I have however tested this in "world" and "nether" and I assume it works the same for multiverse worlds.

    Have fun!
    Resident Emil

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  16. Offline

    Resident Emil

    Hi,
    I just played some Minecraft for the first time in a while. I checked out my plugin and it still works well with the latest minecraft/bukkit version.

    Br,
    Resident Emil
     
  17. Offline

    AttestedFaun

    You spelled north wrong at first line under basic permissions of plugin.
     

Share This Page