-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6c614c
commit b69dc72
Showing
31 changed files
with
6,927 additions
and
6,839 deletions.
There are no files selected for viewing
12,935 changes: 6,468 additions & 6,467 deletions
12,935
src/main/generated/.cache/97a4721ed155c6fdfa3ad558e447c8340a205f56
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
src/main/generated/.cache/ea38d437bba961a39355c1fcb8fe7bfeb267e512
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.21 Pre-Release 3 2024-06-10T00:13:35.9478522 Extravaganza!/Language (en_us) | ||
75fbb3bf2fef742445d19535da9f8c92f1a44be6 assets\extravaganza\lang\en_us.json | ||
// 1.21 Release Candidate 1 2024-06-11T20:24:08.0816653 Extravaganza!/Language (en_us) | ||
6ef37e2cdcc172a3e835e91ec18b2a4ea8fb9589 assets\extravaganza\lang\en_us.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/main/generated/assets/extravaganza/models/item/ball_pool_content.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "extravaganza:block/ball_pool_content" | ||
} | ||
"parent": "extravaganza:block/ball_pool_content" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/generated/assets/extravaganza/models/item/pinata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parent": "extravaganza:block/pinata" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/com/mmodding/extravaganza/ExtravaganzaColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.mmodding.extravaganza; | ||
|
||
import com.mmodding.extravaganza.entity.FestiveBallEntity; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.util.StringIdentifiable; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public enum ExtravaganzaColor implements StringIdentifiable { | ||
|
||
BLACK, BLUE, BROWN, CYAN, | ||
GRAY, GREEN, LIGHT_BLUE, LIGHT_GRAY, | ||
LIME, MAGENTA, ORANGE, PINK, | ||
PURPLE, RED, WHITE, YELLOW, | ||
PLANT, TOMATO, TEAR, NYMPH; // ModFest Carnival Colors | ||
|
||
public static final List<ExtravaganzaColor> VALUES = Arrays.stream(ExtravaganzaColor.values()).toList(); | ||
|
||
public static ExtravaganzaColor fromString(@NotNull String identifier) { | ||
return ExtravaganzaColor.valueOf(identifier.toUpperCase()); | ||
} | ||
|
||
@Override | ||
public String asString() { | ||
return this.name().toLowerCase(); | ||
} | ||
|
||
public ItemStack createBallStack() { | ||
return Registries.ITEM.get(Extravaganza.createId(this.asString() + "_festive_ball")).getDefaultStack(); | ||
} | ||
|
||
public FestiveBallEntity createBallEntity(World world, Entity owner) { | ||
return new FestiveBallEntity(this, world, owner); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/java/com/mmodding/extravaganza/block/PinataBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.mmodding.extravaganza.block; | ||
|
||
import com.mojang.serialization.MapCodec; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.block.HorizontalFacingBlock; | ||
import net.minecraft.item.ItemPlacementContext; | ||
import net.minecraft.state.StateManager; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.Direction; | ||
import net.minecraft.world.WorldAccess; | ||
import net.minecraft.world.WorldView; | ||
|
||
public class PinataBlock extends HorizontalFacingBlock { | ||
|
||
public static final MapCodec<PinataBlock> CODEC = PinataBlock.createCodec(PinataBlock::new); | ||
|
||
public PinataBlock(Settings settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
protected MapCodec<? extends HorizontalFacingBlock> getCodec() { | ||
return PinataBlock.CODEC; | ||
} | ||
|
||
@Override | ||
protected boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { | ||
return Block.sideCoversSmallSquare(world, pos.up(), Direction.DOWN) && !world.isWater(pos); | ||
} | ||
|
||
@Override | ||
protected BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { | ||
return direction == Direction.UP && !this.canPlaceAt(state, world, pos) | ||
? Blocks.AIR.getDefaultState() | ||
: super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos); | ||
} | ||
|
||
@Override | ||
public BlockState getPlacementState(ItemPlacementContext ctx) { | ||
return this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite()); | ||
} | ||
|
||
@Override | ||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) { | ||
builder.add(FACING); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/mmodding/extravaganza/client/init/ExtravaganzaParticles.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.mmodding.extravaganza.client.init; | ||
|
||
import com.mmodding.extravaganza.client.particle.ConfettiParticle; | ||
import com.mmodding.extravaganza.init.ExtravaganzaParticleTypes; | ||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; | ||
|
||
public class ExtravaganzaParticles { | ||
|
||
public static void register() { | ||
ParticleFactoryRegistry.getInstance().register(ExtravaganzaParticleTypes.CONFETTI, ConfettiParticle.Factory::new); | ||
ParticleFactoryRegistry.getInstance().register(ExtravaganzaParticleTypes.CONFETTI_SHAKE, ConfettiParticle.Factory::new); | ||
ParticleFactoryRegistry.getInstance().register(ExtravaganzaParticleTypes.CONFETTI_SHATTER, ConfettiParticle.Factory::new); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/com/mmodding/extravaganza/client/particle/ConfettiParticle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.mmodding.extravaganza.client.particle; | ||
|
||
import com.mmodding.extravaganza.init.ExtravaganzaParticleTypes; | ||
import com.mmodding.extravaganza.particle.ConfettiParticleEffect; | ||
import net.minecraft.client.particle.*; | ||
import net.minecraft.client.world.ClientWorld; | ||
|
||
public class ConfettiParticle extends AscendingParticle { | ||
|
||
protected ConfettiParticle(ClientWorld world, double x, double y, double z, float randomVelocityXMultiplier, float randomVelocityYMultiplier, float randomVelocityZMultiplier, double velocityX, double velocityY, double velocityZ, float scaleMultiplier, SpriteProvider spriteProvider, float colorMultiplier, int baseMaxAge, float gravityStrength, boolean collidesWithWorld) { | ||
super(world, x, y, z, randomVelocityXMultiplier, randomVelocityYMultiplier, randomVelocityZMultiplier, velocityX, velocityY, velocityZ, scaleMultiplier, spriteProvider, colorMultiplier, baseMaxAge, gravityStrength, collidesWithWorld); | ||
} | ||
|
||
public static class Factory implements ParticleFactory<ConfettiParticleEffect> { | ||
|
||
private final SpriteProvider spriteProvider; | ||
|
||
public Factory(SpriteProvider spriteProvider) { | ||
this.spriteProvider = spriteProvider; | ||
} | ||
|
||
public Particle createParticle(ConfettiParticleEffect effect, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) { | ||
float multiplier; | ||
if (effect.getType().equals(ExtravaganzaParticleTypes.CONFETTI_SHAKE)) { | ||
multiplier = 0.6f; | ||
} | ||
else if (effect.getType().equals(ExtravaganzaParticleTypes.CONFETTI_SHATTER)) { | ||
multiplier = 0.3f; | ||
} | ||
else { | ||
multiplier = 0.1f; | ||
} | ||
ConfettiParticle particle = new ConfettiParticle(clientWorld, d, e, f, multiplier, multiplier, multiplier, 0.0f, 0.0f, 0.0f, 1.0f, this.spriteProvider, 1.0f, 30, 0.1f, true); | ||
particle.setAlpha(effect.getAlpha()); | ||
particle.setColor(effect.getRed(), effect.getGreen(), effect.getBlue()); | ||
return particle; | ||
} | ||
} | ||
} |
Oops, something went wrong.