Skip to content

Commit

Permalink
1.20.3 (#410)
Browse files Browse the repository at this point in the history
* New chat message changes

* Update Client.cs

* Update clientbound packets

* Update serverbound packets

* Fix up used packets

* :crackyep:

* Update protocol

* Update assets

* Fix sgen

* Short grass

* No notification

* Update BlocksRegistry.cs

* Oopsie fix packets
  • Loading branch information
Tides authored Dec 7, 2023
1 parent 6e89baa commit 694c50d
Show file tree
Hide file tree
Showing 103 changed files with 93,299 additions and 69,485 deletions.
5 changes: 0 additions & 5 deletions Obsidian.API/Crafting/Builders/Interfaces/IHasNotification.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace Obsidian.API.Crafting.Builders.Interfaces;
public interface IPatternedRecipe : IHasNotification<ShapedRecipe>
public interface IPatternedRecipe
{
public IPatternedRecipe WithKey(char key, params ItemStack[] items);

Expand Down
10 changes: 0 additions & 10 deletions Obsidian.API/Crafting/Builders/ShapedRecipeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ public sealed class ShapedRecipeBuilder : BaseRecipeBuilder<ShapedRecipe>, IPatt

private readonly Dictionary<char, Ingredient> key = [];

private bool showNotification;

private ShapedRecipeBuilder(CraftingBookCategory category) => this.category = category;

public static IPatternedRecipe Create(CraftingBookCategory category) => new ShapedRecipeBuilder(category);
Expand Down Expand Up @@ -41,13 +39,6 @@ public IGroupedRecipe<ShapedRecipe> WithPattern(params string[] pattern)
return this;
}

public IPatternedRecipe HasNotification(bool show = true)
{
this.showNotification = show;

return this;
}

public override ShapedRecipe Build()
{
if (this.pattern.Count <= 0)
Expand All @@ -65,7 +56,6 @@ public override ShapedRecipe Build()
Pattern = new ReadOnlyCollection<string>(new List<string>(this.pattern)),
Key = new ReadOnlyDictionary<char, Ingredient>(new Dictionary<char, Ingredient>(this.key)),
Category = this.category,
ShowNotification = this.showNotification,
};
}

Expand Down
2 changes: 0 additions & 2 deletions Obsidian.API/Crafting/ShapedRecipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ public sealed class ShapedRecipe : IRecipeWithResult

public required IReadOnlyDictionary<char, Ingredient> Key { get; init; }

public required bool ShowNotification { get; init; }

internal ShapedRecipe() { }
}
5 changes: 3 additions & 2 deletions Obsidian.API/Utilities/Extensions.StringManipulation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -71,10 +72,10 @@ public static string ToPascalCase(this string snakeCase)
public static bool IsEmpty(this string value) => value.Length == 0;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNullOrEmpty(this string value) => string.IsNullOrEmpty(value);
public static bool IsNullOrEmpty([AllowNull]this string value) => string.IsNullOrEmpty(value);

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNullOrWhitespace(this string value) => string.IsNullOrWhiteSpace(value);
public static bool IsNullOrWhitespace([AllowNull]this string value) => string.IsNullOrWhiteSpace(value);

public static string Capitalize(this string value)
{
Expand Down
11 changes: 11 additions & 0 deletions Obsidian.API/_Enums/BlockInteraction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Obsidian.API;
public enum BlockInteraction
{
Keep,

Destroy,

DestroyWithDecay,

TriggerBlock
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Obsidian.API;

public enum EClickAction
public enum ClickAction
{
/// <summary>
/// Opens the given URL in the default web browser. Ignored if the player has opted to disable links in chat;
Expand Down
2 changes: 2 additions & 0 deletions Obsidian.API/_Enums/EntityType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public enum EntityType : int
Blaze,
BlockDisplay,
Boat,
Breeze,
Camel,
Cat,
CaveSpider,
Expand Down Expand Up @@ -114,6 +115,7 @@ public enum EntityType : int
Vindicator,
WanderingTrader,
Warden,
WindCharge,
Witch,
Wither,
WitherSkeleton,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Obsidian.API;

public enum EHoverAction
public enum HoverAction
{
/// <summary>
/// Shows a raw JSON text component.
Expand Down
148 changes: 77 additions & 71 deletions Obsidian.API/_Enums/ParticleType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,75 +26,81 @@ public enum ParticleType : int
EntityEffect = 21,
ExplosionEmitter = 22,
Explosion = 23,
SonicBoom = 24,
FallingDust = 25,
Firework = 26,
Fishing = 27,
Flame = 28,
CherryLeaves = 29,
SculkSoul = 30,
SculkCharge = 31,
SculkChargePop = 32,
SoulFireFlame = 33,
Soul = 34,
Flash = 35,
HappyVillager = 36,
Composter = 37,
Heart = 38,
InstantEffect = 39,
Item = 40,
Vibration = 41,
ItemSlime = 42,
ItemSnowball = 43,
LargeSmoke = 44,
Lava = 45,
Mycelium = 46,
Note = 47,
Poof = 48,
Portal = 49,
Rain = 50,
Smoke = 51,
Sneeze = 52,
Spit = 53,
SquidInk = 54,
SweepAttack = 55,
TotemOfUndying = 56,
Underwater = 57,
Splash = 58,
Witch = 59,
BubblePop = 60,
CurrentDown = 61,
BubbleColumnUp = 62,
Nautilus = 63,
Dolphin = 64,
CampfireCosySmoke = 65,
CampfireSignalSmoke = 66,
DrippingHoney = 67,
FallingHoney = 68,
LandingHoney = 69,
FallingNectar = 70,
FallingSporeBlossom = 71,
Ash = 72,
CrimsonSpore = 73,
WarpedSpore = 74,
SporeBlossomAir = 75,
DrippingObsidianTear = 76,
FallingObsidianTear = 77,
LandingObsidianTear = 78,
ReversePortal = 79,
WhiteAsh = 80,
SmallFlame = 81,
Snowflake = 82,
DrippingDripstoneLava = 83,
FallingDripstoneLava = 84,
DrippingDripstoneWater = 85,
FallingDripstoneWater = 86,
GlowSquidInk = 87,
Glow = 88,
WaxOn = 89,
WaxOff = 90,
ElectricSpark = 91,
Scrape = 92,
Shriek = 93,
EggCrack = 94,
Gust = 24,
GustEmitter = 25,
SonicBoom = 26,
FallingDust = 27,
Firework = 28,
Fishing = 29,
Flame = 30,
CherryLeaves = 31,
SculkSoul = 32,
SculkCharge = 33,
SculkChargePop = 34,
SoulFireFlame = 35,
Soul = 36,
Flash = 37,
HappyVillager = 38,
Composter = 39,
Heart = 40,
InstantEffect = 41,
Item = 42,
Vibration = 43,
ItemSlime = 44,
ItemSnowball = 45,
LargeSmoke = 46,
Lava = 47,
Mycelium = 48,
Note = 49,
Poof = 50,
Portal = 51,
Rain = 52,
Smoke = 53,
WhiteSmoke = 54,
Sneeze = 55,
Spit = 56,
SquidInk = 57,
SweepAttack = 58,
TotemOfUndying = 59,
Underwater = 60,
Splash = 61,
Witch = 62,
BubblePop = 63,
CurrentDown = 64,
BubbleColumnUp = 65,
Nautilus = 66,
Dolphin = 67,
CampfireCosySmoke = 68,
CampfireSignalSmoke = 69,
DrippingHoney = 70,
FallingHoney = 71,
LandingHoney = 72,
FallingNectar = 73,
FallingSporeBlossom = 74,
Ash = 75,
CrimsonSpore = 76,
WarpedSpore = 77,
SporeBlossomAir = 78,
DrippingObsidianTear = 79,
FallingObsidianTear = 80,
LandingObsidianTear = 81,
ReversePortal = 82,
WhiteAsh = 83,
SmallFlame = 84,
Snowflake = 85,
DrippingDripstoneLava = 86,
FallingDripstoneLava = 87,
DrippingDripstoneWater = 88,
FallingDripstoneWater = 89,
GlowSquidInk = 90,
Glow = 91,
WaxOn = 92,
WaxOff = 93,
ElectricSpark = 94,
Scrape = 95,
Shriek = 96,
EggCrack = 97,
DustPlume = 98,
GustDust = 99,
TrialSpawnerDetection = 100,
}
5 changes: 4 additions & 1 deletion Obsidian.API/_Enums/ProtocolVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@ public enum ProtocolVersion
v1_20 = 763,

[Description("1.20.2")]
v1_20_2 = 764
v1_20_2 = 764,

[Description("1.20.3")]
v1_20_3 = 765
}
Loading

0 comments on commit 694c50d

Please sign in to comment.