Skip to content

Commit

Permalink
Final changes for v0.2.0
Browse files Browse the repository at this point in the history
- Fixed fabric version crashing in Minecraft 1.18x
- Added new custom license
  • Loading branch information
Tschipcraft committed Aug 12, 2023
1 parent 02a56ea commit e7ea447
Show file tree
Hide file tree
Showing 11 changed files with 210 additions and 103 deletions.
73 changes: 52 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
MIT License

Copyright (c) 2022 Tschipcraft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Tschipcraft's Custom License for Minecraft Mods, Data Packs and Resource Packs
Version 1.0 - 2023

TL;DR - Not exhaustive, please read the whole license for detailed information:
- Don't steal, don't re-upload, don't spread misinformation.
- Monetized videos, livestreams with this or about this pack and inclusion in modpacks are allowed, as long as credit is given by linking back to official download locations.
- Only use parts or the entire mod in your project, if you ask me and I say yes.

Copyright © 2023 Tschipcraft

This license shall be included in all copies or substantial portions of this project.


Permitted Uses:

1. You are PERMITTED to freely use this project on singleplayer worlds and multiplayer worlds/servers in your Minecraft game.

2. You are PERMITTED to modify this project's code for personal use or on your own private servers.

3. You are PERMITTED to view this project's code, take reference, and learn from it.

4. You are PERMITTED to create content (e.g., videos, livestreams) covering and showcasing this project on websites such as YouTube, Twitch, Instagram, TikTok, etc., or on your own website, IF you provide a prominent link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/make_bubbles_pop), [CurseForge](https://www.curseforge.com/minecraft/mc-mods/make-bubbles-pop), [Modrinth](https://modrinth.com/mod/make_bubbles_pop)) in the description or an easily accessible place. You may also monetize this content.

5. You are PERMITTED to include this project in your modpack, IF you link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/make_bubbles_pop), [CurseForge](https://www.curseforge.com/minecraft/mc-mods/make-bubbles-pop), [Modrinth](https://modrinth.com/mod/make_bubbles_pop)), or by simply adding this project in the embedded or included mods sections directly on Modrinth and/or CurseForge.

6. You are PERMITTED to use parts or the whole project in your own project (Mod, Data Pack, Resource Pack, Map, Server, etc.), IF you obtain explicit permission from the creator (Tschipcraft) first. To request permission, please contact me via email at tschipcraft@gmail.com or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), or Discord (@tschipo) and include detailed information about your intentions.


Prohibited Uses:

1. You may NOT redistribute or re-upload this project, modified or unmodified.

2. You may NOT redistribute single parts, files, or standalones of this project.

3. You may NOT claim that this project was made by you.

4. You may NOT spread misinformation about this project, including but not limited to promising not implemented features or support for an unsupported Minecraft version.


Liability and Warranty:

This project is provided "as is," without warranty of any kind, expressed or implied. In no event shall the creator (Tschipcraft) be held liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the project or the use or other dealings in the project.

All works of Tschipcraft are of and owned by Tschipcraft.

By using this project, you agree to abide by the terms of this license. Any violation of the terms will result in the termination of the rights granted hereunder.

Exceptions to this license may be granted, if you have a special case, contact me via email at tschipcraft@gmail.com or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), or Discord (@tschipo) and include detailed information about your intentions.

This license shall be governed by and construed in accordance with the laws of Germany. Any legal action or proceeding arising under or in connection with this license shall be brought exclusively in the courts of Germany.

This license is subject to change. The latest version of this license will be available at https://github.com/Tschipcraft/make_bubbles_pop/blob/master/LICENSE, and your continued use of the project after changes happen, will constitute your acceptance of the changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This branch hosts the old fabric and the backported forge version.

This client-side mod makes bubble particles pop
and completely overhauls their behavior to make them rise realistically to the water surface.
It also adds bubble particles to opening chests and explosions underwater.
It also adds bubble particles to opening chests, opening barrels and explosions underwater.

Should be compatible with every other mod.

Expand Down
73 changes: 52 additions & 21 deletions fabric/LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
MIT License

Copyright (c) 2022 Tschipcraft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Tschipcraft's Custom License for Minecraft Mods, Data Packs and Resource Packs
Version 1.0 - 2023

TL;DR - Not exhaustive, please read the whole license for detailed information:
- Don't steal, don't re-upload, don't spread misinformation.
- Monetized videos, livestreams with this or about this pack and inclusion in modpacks are allowed, as long as credit is given by linking back to official download locations.
- Only use parts or the entire mod in your project, if you ask me and I say yes.

Copyright © 2023 Tschipcraft

This license shall be included in all copies or substantial portions of this project.


Permitted Uses:

1. You are PERMITTED to freely use this project on singleplayer worlds and multiplayer worlds/servers in your Minecraft game.

2. You are PERMITTED to modify this project's code for personal use or on your own private servers.

3. You are PERMITTED to view this project's code, take reference, and learn from it.

4. You are PERMITTED to create content (e.g., videos, livestreams) covering and showcasing this project on websites such as YouTube, Twitch, Instagram, TikTok, etc., or on your own website, IF you provide a prominent link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/make_bubbles_pop), [CurseForge](https://www.curseforge.com/minecraft/mc-mods/make-bubbles-pop), [Modrinth](https://modrinth.com/mod/make_bubbles_pop)) in the description or an easily accessible place. You may also monetize this content.

5. You are PERMITTED to include this project in your modpack, IF you link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/make_bubbles_pop), [CurseForge](https://www.curseforge.com/minecraft/mc-mods/make-bubbles-pop), [Modrinth](https://modrinth.com/mod/make_bubbles_pop)), or by simply adding this project in the embedded or included mods sections directly on Modrinth and/or CurseForge.

6. You are PERMITTED to use parts or the whole project in your own project (Mod, Data Pack, Resource Pack, Map, Server, etc.), IF you obtain explicit permission from the creator (Tschipcraft) first. To request permission, please contact me via email at tschipcraft@gmail.com or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), or Discord (@tschipo) and include detailed information about your intentions.


Prohibited Uses:

1. You may NOT redistribute or re-upload this project, modified or unmodified.

2. You may NOT redistribute single parts, files, or standalones of this project.

3. You may NOT claim that this project was made by you.

4. You may NOT spread misinformation about this project, including but not limited to promising not implemented features or support for an unsupported Minecraft version.


Liability and Warranty:

This project is provided "as is," without warranty of any kind, expressed or implied. In no event shall the creator (Tschipcraft) be held liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the project or the use or other dealings in the project.

All works of Tschipcraft are of and owned by Tschipcraft.

By using this project, you agree to abide by the terms of this license. Any violation of the terms will result in the termination of the rights granted hereunder.

Exceptions to this license may be granted, if you have a special case, contact me via email at tschipcraft@gmail.com or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), or Discord (@tschipo) and include detailed information about your intentions.

This license shall be governed by and construed in accordance with the laws of Germany. Any legal action or proceeding arising under or in connection with this license shall be brought exclusively in the courts of Germany.

This license is subject to change. The latest version of this license will be available at https://github.com/Tschipcraft/make_bubbles_pop/blob/master/LICENSE, and your continued use of the project after changes happen, will constitute your acceptance of the changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.Random;

/**
* This mixin injects into the BarrelBlock class to add bubbles to opening barrels underwater.
*/
Expand All @@ -28,12 +30,13 @@ public void injectBubbles(BlockState state, World world, BlockPos pos, PlayerEnt
boolean bl = world != null;
if (bl && world.isClient) {
if (world.isWater(pos.up()) && !state.get(BarrelBlock.OPEN)) {
Random random = new Random();
// A barrel block has been opened underwater by the current player
// Sadly I haven't found a way to play particles and sound when other players open the barrel
Direction facing = state.contains(BarrelBlock.FACING) ? state.get(BarrelBlock.FACING) : Direction.NORTH;

if (facing != Direction.DOWN) {
for (int i = 0; i < 6 + world.random.nextInt(12); i++) {
for (int i = 0; i < 6 + random.nextInt(12); i++) {
float xOffset = 0f;
float yOffset = 0f;
float zOffset = 0f;
Expand All @@ -48,40 +51,40 @@ public void injectBubbles(BlockState state, World world, BlockPos pos, PlayerEnt
xOffset = .5f;
yOffset = .5f;
zOffset = 0f;
xOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
yOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
zVelocityRand = -world.random.nextFloat();
xOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
yOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
zVelocityRand = -random.nextFloat();
} else if (facing == Direction.SOUTH) {
xOffset = .5f;
yOffset = .5f;
zOffset = 1f;
xOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
yOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
zVelocityRand = world.random.nextFloat();
xOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
yOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
zVelocityRand = random.nextFloat();
} else if (facing == Direction.EAST) {
xOffset = 1f;
yOffset = .5f;
zOffset = .5f;
yOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
zOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
xVelocityRand = world.random.nextFloat();
yOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
zOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
xVelocityRand = random.nextFloat();
} else if (facing == Direction.WEST) {
xOffset = 0f;
yOffset = .5f;
zOffset = .5f;
yOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
zOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
xVelocityRand = -world.random.nextFloat();
yOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
zOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
xVelocityRand = -random.nextFloat();
} else if (facing == Direction.UP) {
xOffset = .5f;
yOffset = 1.5f;
zOffset = .5f;
xOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
yOffsetRand = -(world.random.nextFloat() / 2f);
zOffsetRand = (world.random.nextFloat() - world.random.nextFloat()) * .3f;
xOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
yOffsetRand = -(random.nextFloat() / 2f);
zOffsetRand = (random.nextFloat() - random.nextFloat()) * .3f;
}

world.addParticle(ParticleTypes.BUBBLE, pos.getX() + xOffset + xOffsetRand, pos.getY() + yOffset + yOffsetRand, pos.getZ() + zOffset + zOffsetRand, xVelocityRand, .05f + world.random.nextFloat() * .05f, zVelocityRand);
world.addParticle(ParticleTypes.BUBBLE, pos.getX() + xOffset + xOffsetRand, pos.getY() + yOffset + yOffsetRand, pos.getZ() + zOffset + zOffsetRand, xVelocityRand, .05f + random.nextFloat() * .05f, zVelocityRand);
}
world.playSound(pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_BUBBLE_COLUMN_WHIRLPOOL_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1.4f, false);
}
Expand Down
Loading

0 comments on commit e7ea447

Please sign in to comment.