Minecraft Data Packs / Other

[CLOSED] - Gen API

  • check_circle Functions
  • 20,657 views, 0 today
  • 1,772 downloads, 0 today
  • 54
  • 39
GenMode
Level 64 : High Grandmaster Stack
254
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:
- You must uninstall this datapack properly before you remove it.
- You can use this as a base for your datapacks too. I really dc what you do.
- THIS DATAPACK HAS BEEN DISCONTINUED

- This features page is incredibly outdated, it is guaranteed that this api doesn't work the same as it did when I made this
Successor(s)
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.

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:
- Gen's "Better Babies" Datapack
- Gen's "Better Farming" Datapack
- Gen's "Better Fishing" Datapack
- Gen's "Inventory Blocks"
- Gen's "Server Utilities"

Uninstall:
Uninstall Command:
/function api:uninstall
CompatibilityMinecraft 1.15
toMinecraft 1.20
Tags

18 Update Logs

Gen API 1.20 | Update: CLOSED : by GenMode 06/02/2024 11:00:40 pmJun 2nd, 2024

- this datapack has been closed
LOAD MORE LOGS
Comments have been disabled on this content.

Welcome