GithubHelp home page GithubHelp logo

draylar / get-off-my-lawn Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 17.0 306 KB

Keep people off your lawn with claims! Built for Fabric.

Home Page: https://www.curseforge.com/minecraft/mc-mods/get-off-my-lawn

License: MIT License

Java 100.00%
hacktoberfest modding fabric fabricmc rtree minecraft

get-off-my-lawn's Introduction

Get Off My Lawn

Get Off My Lawn is a take on the popular concept of claims. It helps protect your stuff! It is built for Fabric on 1.15.2.

To get started, you'll have to craft a Claim Anchor. Each anchor has a different claim radius; after placing one, a box around it will be formed. This box is yours!

Makeshift, radius of 10

Reinforced, radius of 25

Glistening, radius of 50

Crystal, radius of 75

Emeradic, radius of 125

Withered, radius of 200

[NYI] To configure your claim, you can interact with the anchor block. A UI will appear that offers several configuration options:

  • The general settings tab can be used to define blanket permissions for non-specified players.
  • The player list can be used to define permissions for individual players

[NYI] To upgrade your claim, place an Anchor Augment next to the core Claim Anchor. Anchor Augments available include:

  • Creeper Explosion Nullifier: Prevents Creeper explosions from damaging terrain
  • Ender Binding: Prevents Enddermen from teleporting
  • Villager Core: Prevents Zombies from damaging Villagers
  • Missile Defense: Shoots trespassers in range
  • Visitor Greeter: MOTD to visitors
  • Trespasser Alarm: Alert when non-whitelisted people enter the claim
  • Angelic Aura: Regen to all players inside region
  • Withering Seal: Prevents wither status effect
  • Forceful Ejection: non-whitelisted players get launched out of the claim
  • Heaven's Wings: flight
  • Lake Spirit's Grace: water breathing, water sight, and better breathing
  • Defender's Right: pets & golems do 100% more damage to hostile mobs
  • Chaos Zone: Strength to all players inside region

To see claim areas, you'll have to craft a Goggles of (Claim) Revealing:

When this item equipped in the helmet slot, claim outlines become visible.

Protection Checks

Get Off My Lawn currently checks for claims when the following actions occur:

  • Player block break
  • Player block interaction
  • Player entity damage
  • Player entity interaction
  • TNT explodes

If the player does not own the claim, they are not allowed to finish (/start) the action. In the case of explosions, no blocks break.

Installation: Users

You'll need to install the Fabric Loader, Fabric API, and appropriate mod jar from the releases tab (or the CurseForge page).

Drop the mod jar and Fabric API into your /mods folder and boot up the game.

Installation: Developers

[NYI] Get Off My Lawn offers an API that allows you to:

  • Check areas for claims
  • Add custom Anchor Augments

To install the mod to your development environment:

build.gradle

repositories {
    maven { url 'https://jitpack.io' }
}

build.gradle

dependencies {
    modImplementation 'com.github.Draylar:get-off-my-lawn:${project.goml_version}'
}

gradle.properties

goml_version=master-SNAPSHOT

License

Get Off My Lawn is available under the MIT license. The project, code, and assets found in this repository are available for free public use.

get-off-my-lawn's People

Contributors

cominixo avatar draylar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

get-off-my-lawn's Issues

perma-flight after breaking flight augment

seems very much like after placing the flight augment, breaking it gives the player the ability to fly whenever they please wherever they please.
this appears to be the case too when placing a flight augment then upgrading the claim size.

also seems that the flight augment only activates after a player has left and re-entered the claim it's attached to

attack crash

get-off-my-lawn-1.16.4-1.3.1-beta
unfortunately looks like melee attacking mobs causes a client crash
https://pastebin.com/16hX3Ebz

i've tested with just this mod so pretty sure it's related to this... also maybe simply a left-click thing, i haven't tested too hard, the player doesn't need to be inside a clim when doing this to cause the crash

Config file to allow some interactions

I really would like to have a config added in the next version that would let me set what can be done in a claim, server side of course. This way players can defend themselves in claims from mobs and other thinks the like. I use a claim for spawn so no one destroys it, but one armored skelly in spawn and new players are getting killed. I know I can build a spawn but it is besides the point I am trying to make. Just some more customization would be nice

Claim blocks doesn't allow player that place it to access that claim.

The claim block is not allowing players on a server access there claim even if the block is broken by the admin and replaced by the player. The claim block is placed and the player that placed it cannot place any blocks or do anything in the claim even thought the claim block was placed by the same player.

[Suggestion] Change glasses recepie

THe glasses are an importat part of the mod and i belive its a bit to hard (or to much RNG if we hope for wondering traders) to get them, i would suggest changing the 2x leads to 2x strings

whitelist block/item/command interaction - enhancement

the need for such a thing has been touched upon re: graves but not explicitly suggested unless i'm not reading well enough.
having configurable actions in claims would be extremely useful for many more reasons than simply grave interactions.

Server side port-thingy

Hello! I'm interested in making and releasing "port"/modification of this mod as server side one (still fabric) with usage of my own Polymer library. However I want to ask if you would be okay with me publishing it on Curseforge/Modrinth. While I know that license allows this, I prefer to still ask just to be fair with you.

explosions inside claims 1.3.2

latest version is much better :) found a small detail that could be an issue.
exploding an end crystal next to a flight augment will destroy the augment but leave the player to fly inside the claim..
i did manage to somehow also get flight outside the claim once by upgrading the anchor partway through this process but i'm as yet unable to reproduce this

Anchor Augment not working

It says all players in the claim will be able to fly but even when I give them owner they are not able too.

Carrier Mod causes bugs in claims

carrier mod allows you to pick up blocks and carry them around (like endermen do).
https://www.curseforge.com/minecraft/mc-mods/carrier
if you pick up a claim block it breaks the bond between the claim and the block creating a claimed area that has no block. only way to remove this claimed area is using /goml remove but any claims that overlap this removed claim area are buggy and don't work properly, ie can't /addowner, cant /trust and some additions blocks like villager protection and regeneration will not function in the new claim area.
this also brings up the question can i reset the goml on my server with out recreating the entire world? as i would like to remove all claims and replace them with a fresh slate and this one area is buggy now.

Anchor augments cannot be destroyed. (Fabric, Better Minecraft modpack).

All of the claim anchor augments cannot be destroyed. I can destroy the anchor itself, but never the augment blocks. Using a withered claim anchor, with regeneration, chaos, and heavens wings augments. It allows me to destroy them only for a moment after I place them, any longer than that and they are no longer breakable. As an added bug, it does not detect when I leave the claim area. I retain permanent creative flight until I enter another dimension, and if I log out and log back in while in any dimension, I gain flight again.

[1.17] GOML Missing Blocks & Recipes for Multiplayer Server

Hi, I have a multiplayer server and the following blocks/recipes are missing:

Claim Augment

  • Creeper Explosion Nullifier
  • Missile Defense
  • Visitor Greeter
  • Trespasser Alarm
  • Forceful Ejection
  • Defender's Right

However, there are some issues:

  • Chaos Zone Claim Anchor does not provide the strength status effect on the player
  • UI does not show when right-clicking on the claim anchor

Note: I will perform some additional testing and update either on the comments or here on the main issue description

Infinite flight bug

When traveling through a nether portal within a claim that has the Angelic Aura augment, the flight does not get turned off once going through. That makes it so you have infinite flight within the nether. I expect because there are checks for leaving a claim and then turning flight off, but not for when you pass through a portal.

perma-flight after breaking augment and anchor

regarding 1.3.2-1.3.3 beta
here's another way to gain flight outside the confines of a claim..
place and anchor with flight augment on top.
place an end crystal next to the augment and blow it up.
relog and harvest the claim anchor.
fly anywhere :/
reposted from closed issue because i think it wasn't seen

Can't place anchors in old claims

I've destroyed my old gold claim anchor, then built a diamond anchor and replaced the old one. Replacing the claim was ok and i've craft the emerald one, tried to place it but i just cant, no messages, nothing except the block not placing

upgrades not used... when used

when using an upgrade to upgrade a claim anchor the upgrade remains in the hand.
i assume this is not intended but if it is can we have an option to have them disappear when used?
get-off-my-lawn-1.16.2-1.2.3-beta
fabric-api-0.30.0+1.16

Claim checks have duplicated code that could be simplified

Most claim checks, including all 4 in EventHandlers, have duplicated logic that could be abstracted to a separate method.

The method should take a World, BlockPos, and PlayerEntity, and return an ActionResult that shows whether the action was successful. If individual permissions appear, the two options are reverting this change or having some sort of ActionType enum (BLOCK_BREAK, BLOCK_INTERACT, ENTITY_ATTACK, ENTITY_INTERACT, etc) to check whether the player has permissions in that specific category.

Permanent Flight

When breaking the heaven_wings block,

26.09 18:39:05 [Server] Server thread/FATAL Error executing task on Server
26.09 18:39:05 [Server] INFO java.lang.NullPointerException: Cannot invoke "draylar.goml.entity.ClaimAnchorBlockEntity.removeChild(net.minecraft.class_2338)" because "this.parent" is null
26.09 18:39:05 [Server] INFO at draylar.goml.entity.ClaimAugmentBlockEntity.remove(ClaimAugmentBlockEntity.java:47) ~[get-off-my-lawn-1.17-1.4.0-beta.jar:?]
26.09 18:39:05 [Server] INFO at draylar.goml.block.ClaimAugmentBlock.method_9576(ClaimAugmentBlock.java:87) ~[get-off-my-lawn-1.17-1.4.0-beta.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_3225.method_14266(class_3225.java:247) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_3225.method_21717(class_3225.java:221) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_3225.method_14263(class_3225.java:196) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_3244.method_12066(class_3244.java:1012) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_2846.method_12361(class_2846.java:34) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_2846.method_11054(class_2846.java:8) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.class_1255.method_5383(class_1255.java:110) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:748) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:701) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
26.09 18:39:05 [Server] INFO at java.lang.Thread.run(Thread.java:831) [?:?]

I was very dissapointed this cant remove flight outside of the borders, so i went to delete the recipe via kubejs:

onEvent('recipes', event => {
  event.remove({id: 'goml:heaven_wings'})

But now that i broke the block, i can still fly.

Lack of giant Bees

"I read giant boxes as giant bees, and now I want to protect my bases with giant bees." - Prospector

New Anchor Augment: Bee Defense. Intruders will be attacked by an army of giant Bees.

1.16.5 on jitpack

I have goml included in my mod for 1.17.1 but i'd also like it for 1.16.5
Looks like 1.3.4 is in a failstate

(Suggest) server config

Server config limiting players to a few claims would be nice. Also something like preventing claims in certain dimensions

Universal Graves Compatibility

I had Patbox attempt to add GOML compatibillity to their mod Universal Graves, and unfortunately this did not work. Curious if you would be able to help us make this work. Currently using it on the All Of Fabric 4 public server. He thinks the issue might have to do with the grave being universal_graves:grave serverside, but client side its just minecraft:player_head. It would be nice to just be able to whitelist block ids in the config that GOML would ignore similar to Flan. But either method is fine.

Here is their compatibility code.
https://github.com/Patbox/UniversalGraves/blob/691dc53884a16caed607bb9bfee8ae56b946bb4f/src/main/java/eu/pb4/graves/compat/GomlCompat.java

infinity vert - enchancement

could we have the option to increase the claims to infinity vert so that other cannot dig under and explode tnt or build over and drop lava into claims (for examples)

Upgrade Kits do not have recipes

Upgrade Kits currently do not have recipes. This should be fixed, and the recipes should be similar to the standard Claim Anchor recipes (maybe substitute the Claim Anchor in the middle with an iron ingot?).

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.