• check_circle Functions
  • check_circle Loot Tables
  • 8,126 views, 85 today
  • 531 downloads, 12 today
  • 23
  • 13
  • 1
GenMode avatar GenMode
Level 50 : Grandmaster Terraformer
94
This is just an API to store functions I'll often use for datapacks so that it doesn't clutter anyone's scoreboard list. I'll be adding more as they come up


Notes:
- The file downloaded CONTAINS the datapack. It is not the datapack itself.
- You must uninstall this datapack properly before you remove it.
- Works in 1.15 & 1.16
- You can use this as a base for your datapacks too. I really dc what you do.

Features:
Entity Tags:
Chunk Loading
- Tag an entity with "gen.ChunkLoad" and it will continue to load the chunk it is in. Once its removed the chunk will unload itself unless another chunkloader is in the same chunk.

Custom Crafting GUI
- Tag an entity that is in the same coordinates of a 3x9 storage container with the tag "gen.Crafter" and it will get a crafting table GUI. These really are just retextured white dye so it is recommended you use "GenData Textures" version 0.6 and up unless a resourcepack is provided with equivalent textures.
[Credit to https://stevertus.com/tools/gui for this, I didn't invent it myself it's too high level for me.]

Item Hitbox
- Any entity designated with the tag "gen.Hitbox" will be given a high defense stat, will be despawned when hit, and will despawn when another is in the same block as it. This allows for a very handy hitbox for items like lamps or crops. Alternatively add "gen.HitboxNull" to it as well to allow multiple hitboxes in the same location.

Invisibility
- Tag an entity that can be affected by potion effects and give it the "gen.Invisible" tag and it will be truly invisible for as long as it has the tag on it. No potion swirls or anything.

Entity Illumination
- This is mainly for fixing a bug in minecraft where an armor stand will turn dark when inside a block which screws with textures when you're developing custom blocks. Giving it the "gen.Illuminate" continuously sets the entity on fire fixing that issue. Please don't give this tag to your friends' in-game pets.

Fire Immunity
- Give an entity the tag "gen.FireRez" and it will be fire resistant for as long as it has the tag.

Light Detection
- Give an entity the tag "gen.Light" and it will get a score between 0-15 on the scoreboard objective "gen.Light" based on its light level. 0 is the darkest and 15 is the lightest.

Pushable Markers
- Armor Stands can often be used to be skins for custom blocks but what happens if it gets pushed by a piston? Well now any armor stand with the tag "gen.Pushable" will also be moved in the direction the piston is pushing it.

Item Tags:

Food Saturation
- For food items I have the tag "gen.Saturate:Xb". Any cookie or potion consumed with this tag will add saturation as if eating a larger meal. Replace the "X" with a number between 1-20 to set the added value



Item Frame Alignment
- If an item frame has an item inside it with the tag "gen.Align:Xb", it will align the direction it is facing according to the number X is replaced with.



Pig Rejection
- Since Carrots on Sticks are the most popular item to use as custom tools, this mechanic makes it so that while holding a tool with the tag "gen.Gadget:1b" a player cannot ride pigs. This is so that the Carrot on a Stick cannot break or if it is set to unbreakable then the mechanic cannot be exploited for infinite pig rides.

Scoreboard Tools:
API Detection
- Sets score on a scoreboard for $$gen.Api on objective gen.Install to 116 by default so that it can be detected if "Gen API" can be detected by other datapacks

Click Detection
- Added scoreboard "gen.Click" which goes up in score every time you right-click with a Carrot on a Stick. It clears itself once you get to a score of 2, which can be useful for creating right-click events for custom items.

Countdown Timers
- Added three timer scores on scoreboard objective "gen.Timer" with the names "$gen.Delay1", "gen.Delay2", & "gen.Delay3" which continuously count down. They time 0.5sec, 1sec, and 5sec respectively and are useful for when you need to run commands without running them every tick

Death Detection
- All players get a score of 1 on the objective "gen.Death" the moment they die which is set to 0 a moment later

Entity Despawning
- Any entity with the scoreboard score of 2 or more on the objective "gen.Remove" will be removed from the game. No drops, no death animation, no puff of smoke. Just gone. Please do not use this on players because it will not go well.

Player ID
- Upon first joining the world all players will be assigned a unique scoreboard ID on the objective "gen.ID". This can be used to specify players in commands

Version Detection
- This doesn't exactly detect your Minecraft Version, but it by defailt sets itself to 1.16. If a player is in creative mode they will see an option on reload to change its version though which makes it possible to have datapacks that can withstand command changes in minecraft updates.

Datapacks that use Gen API:
Uninstall:
Uninstall Command:
/function api:uninstall
CompatibilityMinecraft 1.15
toMinecraft 1.16
Tags

7 Update Logs

Gen API 1.16 - Update:0.6 : 07/06/2021 8:50:49 pmJul 6th

Item Tags:
- Updated GenTag:{Effect:{Saturation:X}}
- Updated GenTag:{Type:"gen:gadget"}
- Added GenTag:{Fireproof:true}

Entity Tags:
- Updated tag gen.Crafter
- Updated tag gen.FireRez
- Updated tag gen.Invisible
- Updated tag gen.Illuminate

Scores
- Added gen.Shift score
- Changed gen.Hitbox to be a score instead
- Made it that any Hitbox with the score of 2 cannot be fed cookies (for parrots)

Mechanics:
- Added "light_furnace"
- Added "catch_item"
LOAD MORE LOGS

Create an account or sign in to comment.

1
08/07/2020 6:23 pm
Level 50 : Grandmaster Terraformer
GenMode
GenMode avatar
Bugs:
If anyone finds any bugs in this datapack I'd greatly appreciate it. It'll allow me to go back and fix the issue myself in a future update and improve everyone's experience when using it
Planet Minecraft

Website

© 2010 - 2021
www.planetminecraft.com

Welcome