Skip to content

Commit

Permalink
v2.0 - more decorative options!
Browse files Browse the repository at this point in the history
  • Loading branch information
DakotaPride committed Oct 9, 2024
1 parent ef84a09 commit 0d74c20
Show file tree
Hide file tree
Showing 72 changed files with 831 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,19 @@ public void fillItemList(NonNullList<ItemStack> output) {
output.add(GarnishedBlocks.NUMBING_PARCHMENT_BLOCK.asStack());
output.add(GarnishedBlocks.NUMBING_PARCHMENT_CARPET.asStack());

output.add(GarnishedBlocks.POLAR_BEAR_HIDE_BLOCK.asStack());
output.add(GarnishedBlocks.PACKED_POLAR_BEAR_HIDE_BLOCK.asStack());

output.add(GarnishedBlocks.AMBER_REMNANT_BLOCK.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_SLAB.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_STAIRS.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_WALL.asStack());

output.add(GarnishedBlocks.AMBER_REMNANT_BRICKS.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_BRICK_SLAB.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_BRICK_STAIRS.asStack());
output.add(GarnishedBlocks.AMBER_REMNANT_BRICK_WALL.asStack());

output.add(GarnishedBlocks.SEPIA_FUNGUS.asStack());
output.add(GarnishedBlocks.SOUL_ROOTS.asStack());
output.add(GarnishedBlocks.INCANDESCENT_LILY.asStack());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void finishUsingItem(Level level, LivingEntity entity, CallbackInfoRetur
// Sugar High functionality
GarnishedFoodValues.hasSugarHigh = entity.hasEffect(GarnishedEffects.SUGAR_HIGH);
// Freezing functionality
GarnishedFoodValues.hasFreezing = entity.hasEffect(GarnishedEffects.FREEZING);
GarnishedFoodValues.hasFreezing = entity.hasEffect(GarnishedEffects.FREEZING) || entity.isFreezing();
// Hunger functionality
GarnishedFoodValues.hasHunger = entity.hasEffect(MobEffects.HUNGER);
// Levitation functionality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.simibubi.create.content.decoration.palettes.ConnectedGlassPaneBlock;
import com.simibubi.create.content.decoration.palettes.WindowBlock;
import com.simibubi.create.foundation.block.connected.SimpleCTBehaviour;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.CreateRegistrate;
import com.tterrag.registrate.util.entry.BlockEntry;
Expand Down Expand Up @@ -89,6 +90,7 @@
import net.minecraft.world.level.material.MaterialColor;
import net.minecraft.world.level.material.PushReaction;

import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures;
import static net.dakotapride.garnished.registry.GarnishedCT.woodenWindowBlock;
import static net.dakotapride.garnished.registry.GarnishedCT.woodenWindowPaneBlock;

Expand Down Expand Up @@ -1625,29 +1627,78 @@ public static BlockEntry<WallBlock> masticsmoothwall(String colour0) {

public static final BlockEntry<Block> AMBER_REMNANT_BLOCK =
REGISTRATE.block("amber_remnant_block", Block::new)
.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<SlabBlock> AMBER_REMNANT_SLAB =
REGISTRATE.block("amber_remnant_slab", SlabBlock::new)
.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<AmberRemnantStairsBlock> AMBER_REMNANT_STAIRS =
REGISTRATE.block("amber_remnant_stairs", AmberRemnantStairsBlock::new)
.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<WallBlock> AMBER_REMNANT_WALL =
REGISTRATE.block("amber_remnant_wall", WallBlock::new)
.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();

public static final BlockEntry<Block> AMBER_REMNANT_BRICKS =
REGISTRATE.block("amber_remnant_bricks", Block::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<SlabBlock> AMBER_REMNANT_BRICK_SLAB =
REGISTRATE.block("amber_remnant_brick_slab", SlabBlock::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<AmberRemnantStairsBlock> AMBER_REMNANT_BRICK_STAIRS =
REGISTRATE.block("amber_remnant_brick_stairs", AmberRemnantStairsBlock::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();
public static final BlockEntry<WallBlock> AMBER_REMNANT_BRICK_WALL =
REGISTRATE.block("amber_remnant_brick_wall", WallBlock::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.explosionResistance(12.0F)).register();

public static final BlockEntry<Block> POLAR_BEAR_HIDE_BLOCK =
REGISTRATE.block("polar_bear_hide_block", Block::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.WHITE_WOOL)
.properties(p -> p.explosionResistance(1200.0F)).register();

public static final BlockEntry<Block> PACKED_POLAR_BEAR_HIDE_BLOCK =
REGISTRATE.block("packed_polar_bear_hide_block", Block::new)
//.onRegister(connectedTextures(() -> new SimpleCTBehaviour(GarnishedCT.AMBER_REMNANT_BLOCK)))
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
.simpleItem()
.initialProperties(() -> Blocks.WHITE_WOOL)
.properties(p -> p.explosionResistance(1200.0F)).register();

public static final BlockEntry<AnniversaryCakeBlock> ANNIVERSARY_CAKE =
REGISTRATE.block("anniversary_cake", AnniversaryCakeBlock::new)
.blockstate((ctx, pov) -> pov.simpleBlock(ctx.get(), AssetLookup.standardModel(ctx, pov)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private static CTSpriteShiftEntry vertical(String name) {
public static final CTSpriteShiftEntry SEPIA_WINDOW = vertical("sepia_window");
public static final CTSpriteShiftEntry NUT_WINDOW_PANE = vertical("nut_window");
public static final CTSpriteShiftEntry SEPIA_WINDOW_PANE = vertical("sepia_window");
public static final CTSpriteShiftEntry AMBER_REMNANT_BLOCK = omni("amber_remnant_block");
//public static final CTSpriteShiftEntry NUMBING_PARCHMENT = omni("numbing_parchment_block");

private static SpriteShiftEntry get(String originalLocation, String targetLocation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public enum GarnishedFoodValues implements IGarnishedUtilities {
// Nether
// Most nether foods cannot be under 6 nutrition value
// Most nether foods cannot be under 0.40 saturation value (40% of the nutrition value)
// A hard limit on most overworld foods for nutrition is set at 12
// A hard limit on most overworld foods for saturation is set at 0.85 (85% of the nutrition value)
// A hard limit on most nether foods for nutrition is set at 12
// A hard limit on most nether foods for saturation is set at 0.85 (85% of the nutrition value)
NETHER_MIN(6, 0.40f),
NETHER_MAX(12, 0.80f),
// End
// Most end foods cannot be under 10 nutrition value
// Most end foods cannot be under 0.55 saturation value (55% of the nutrition value)
// A hard limit on most overworld foods for nutrition is set at 16
// A hard limit on most overworld foods for saturation is set at 1.00 (100% of the nutrition value)
// A hard limit on most end foods for nutrition is set at 16
// A hard limit on most end foods for saturation is set at 1.00 (100% of the nutrition value)
END_MIN(10, 0.55f),
END_MAX(16, 1.00f);

Expand All @@ -59,11 +59,11 @@ private static int mod(float value, boolean isSaturation) {


public static final FoodProperties.Builder GENERIC_BOTTLED_FOOD_OR_DRINK = generic(3, 0.20f);
public static final FoodProperties GENERIC_BOTTLED_FOOD_OR_DRINK_build = generic(3, 0.20f).build();
public static final FoodProperties GENERIC_BOTTLED_FOOD_OR_DRINK_build = GENERIC_BOTTLED_FOOD_OR_DRINK.build();
public static final FoodProperties.Builder GENERIC_STEW_OR_BREW = generic(8, 0.60f);
public static final FoodProperties GENERIC_STEW_OR_BREW_build = generic(8, 0.60f).build();
public static final FoodProperties GENERIC_STEW_OR_BREW_build = GENERIC_STEW_OR_BREW.build();
public static final FoodProperties.Builder GENERIC_COOKIE = generic(4, 0.20f);
public static final FoodProperties GENERIC_COOKIE_build = generic(4, 0.20f).build();
public static final FoodProperties GENERIC_COOKIE_build = GENERIC_COOKIE.build();

// Overworld
public static final FoodProperties UNGARNISHED_NUT = ow_min().effect(new MobEffectInstance(MobEffects.CONFUSION, 240), 1.0f).build();
Expand Down Expand Up @@ -148,9 +148,12 @@ private static int mod(float value, boolean isSaturation) {
public static final FoodProperties MUESLI = generic(OVERWORLD_MAX.nutrition, 0.60f).build();
public static final FoodProperties GENERIC_DRIED_KELP = generic(2, 0.30f).fast().build();
public static final FoodProperties DRIED_DULSE_KELP = generic(4, GENERIC_DRIED_KELP.getSaturationModifier()).fast().build();
public static final FoodProperties VAST_BREW = generic(4, 0.30f).fast().build();
public static final FoodProperties VERMILION_STEW = generic(6, 0.40f).build();
public static final FoodProperties GALVANIC_HAUNTING = ow_max().build();
public static final FoodProperties VAST_BREW = generic(6, 0.30f)
.effect(new MobEffectInstance(MobEffects.WATER_BREATHING, tick * 20, 0), 0.50f).build();
public static final FoodProperties VERMILION_STEW = generic(7, 0.40f)
.effect(new MobEffectInstance(MobEffects.WATER_BREATHING, tick * 20, 0), 0.75f).build();
public static final FoodProperties GALVANIC_HAUNTING = ow_max()
.effect(new MobEffectInstance(MobEffects.WATER_BREATHING, tick * 20, 0), 1.0f).build();
public static final FoodProperties BEWILDERED_PASTRY = generic(6, 0.40f)
.effect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE, tick * 20, 0), 0.65f).build(); // 65% chance of occurring
public static final FoodProperties INCENDIARY_STEW = ow_max().build(); // Explodes on consumption - 100% chance of occurring
Expand All @@ -171,8 +174,8 @@ private static int mod(float value, boolean isSaturation) {
public static final FoodProperties VENERABLE_DELICACY = ow_max()
.effect(GarnishedFoodValues.triggerRegenerationFromSugarHigh(), 1.0f).build(); // 100% chance of occurring
public static final FoodProperties ICY_MASTIC_CHUNK = ow_min()
.effect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 100, 2), 1.0f)
.effect(new MobEffectInstance(MobEffects.REGENERATION, 160, 1), 1.0f).fast().build();
.effect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 100, 2), 1.0f) // 100% chance of occurring
.effect(new MobEffectInstance(MobEffects.REGENERATION, 160, 1), 1.0f).fast().build(); // 100% chance of occurring
public static final FoodProperties CASHEW_SORBET_SCOOP = generic(2, 0.10f)
.effect(GarnishedFoodValues.triggerRegenerationFromSugarHigh(), 0.65f).fast().build(); // 65% chance of occurring
public static final FoodProperties CASHEW_SORBET_DELIGHT = generic(8, 0.40f)
Expand Down Expand Up @@ -270,7 +273,7 @@ private static int mod(float value, boolean isSaturation) {
.effect(GarnishedFoodValues.triggerSlowFallingFromLevitation(), 0.80f).build(); // 80% chance of occurring
public static final FoodProperties SHELLED_DUMPLING = end_min()
.effect(GarnishedFoodValues.triggerSlowFallingFromLevitation(), 0.50f).build(); // 50% chance of occurring
// Exempt due to already providing an effect - negative or positive
// Exempt due to already providing an effect - negative or positive
public static final FoodProperties BOTTLED_ENDER_JELLY = GENERIC_BOTTLED_FOOD_OR_DRINK
.effect(new MobEffectInstance(GarnishedEffects.COGNATE, cognate_dur / 2, 1), 0.50f).build(); // 50% chance of occurring
public static final FoodProperties COSMIC_BREW = end_min()
Expand Down Expand Up @@ -383,9 +386,9 @@ public static MobEffectInstance triggerSlowFallingFromLevitation() {

public static MobEffectInstance triggerResistanceOrWeaknessFromRaids() {
if (hasBadOmen) {
// Do collect 200 dollars, and do pass GO :)
return new MobEffectInstance(MobEffects.WEAKNESS, tick * 36, 1);
} else {
// Do collect 200 dollars, and do pass GO :)
return new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, tick * 36, 1);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"type=bottom": {
"model": "garnished:block/amber_remnant_bricks_slab"
},
"type=double": {
"model": "garnished:block/amber_remnant_bricks"
},
"type=top": {
"model": "garnished:block/amber_remnant_bricks_slab_top"
}
}
}
Loading

0 comments on commit 0d74c20

Please sign in to comment.