Giter Site home page Giter Site logo

wmcalliance / creepair Goto Github PK

View Code? Open in Web Editor NEW
1.0 8.0 0.0 43 KB

1.20.2 compatible Spigot plugin. Repairs creeper holes soon after they're formed, above ground, leaving your landscape clean for new players to explore.

License: Mozilla Public License 2.0

Java 100.00%
minecraft minecraft-plugin spigotmc bukkit-plugin spigot-plugin java

creepair's Introduction

Creepair

This plugin was originally coded by jamietech for us.

Basically, the goal of this plugin is to repair natural creeper-exploded blocks near, or above, ground level.

Much of the detail was coded by modwizcode and thanks to her, this plugin is fully functioning.

creepair's People

Contributors

blaneyxyz avatar wizardcm avatar

Stargazers

Sebastian Beckmann avatar

Watchers

Lucian avatar Lunaphied avatar James Cloos avatar  avatar Penguin avatar Samuel Faunt avatar  avatar  avatar

creepair's Issues

Exploded blocks don't drop

This is a limitation of the current method, but basically non-natural blocks get destroyed, don't regen and don't drop. They should drop.

// Example code to reference (creepers destroy ONLY glass with this)
@EventHandler
public void onEntityExplode(EntityExplodeEvent event) {
    if (event.getEntity() instanceof Creeper) {
        for (Block block : new ArrayList<Block>(event.blockList()))
            if(block.getType() == Material.GLASS) {
                event.blockList().remove(block);
            }
        }
    }
}

When blocks repair randomly, blocks can get lost

This has two use cases;

  1. falling blocks (sand and gravel) - when placed in the air, they fall, but don't get replaced a second time - so there are less blocks in the end than there were to begin with
  2. 'safe' blocks (non-natural) when they drop their items - they get covered up by regenerating blocks and then lost inside the rebuilt hole

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.