mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added Entity, Item and Block palletes for 1.17/1 and 1.18/1. Added pallete generators as a command line option. Fixed a minor warning with AttackBot
This commit is contained in:
parent
6986902938
commit
61a682a69b
16 changed files with 4488 additions and 72 deletions
|
|
@ -100,11 +100,15 @@ namespace MinecraftClient.ChatBots
|
|||
}
|
||||
}
|
||||
}
|
||||
// check entity distance and health again
|
||||
if (shouldAttackEntity(entitiesToAttack[priorityEntity]))
|
||||
|
||||
if (entitiesToAttack.ContainsKey(priorityEntity))
|
||||
{
|
||||
InteractEntity(priorityEntity, 1); // hit the entity!
|
||||
SendAnimation(Inventory.Hand.MainHand); // Arm animation
|
||||
// check entity distance and health again
|
||||
if (shouldAttackEntity(entitiesToAttack[priorityEntity]))
|
||||
{
|
||||
InteractEntity(priorityEntity, 1); // hit the entity!
|
||||
SendAnimation(Inventory.Hand.MainHand); // Arm animation
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
1119
MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs
Normal file
1119
MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs
Normal file
File diff suppressed because it is too large
Load diff
1120
MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs
Normal file
1120
MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -14,7 +14,7 @@ namespace MinecraftClient.Inventory
|
|||
{
|
||||
Unknown = -2, // Unsupported item type (Forge mod custom item...)
|
||||
Null = -1, // Unspecified item type (Used in the network protocol)
|
||||
|
||||
|
||||
AcaciaBoat,
|
||||
AcaciaButton,
|
||||
AcaciaDoor,
|
||||
|
|
@ -33,6 +33,9 @@ namespace MinecraftClient.Inventory
|
|||
ActivatorRail,
|
||||
Air,
|
||||
Allium,
|
||||
AmethystBlock,
|
||||
AmethystCluster,
|
||||
AmethystShard,
|
||||
AncientDebris,
|
||||
Andesite,
|
||||
AndesiteSlab,
|
||||
|
|
@ -42,6 +45,10 @@ namespace MinecraftClient.Inventory
|
|||
Apple,
|
||||
ArmorStand,
|
||||
Arrow,
|
||||
AxolotlBucket,
|
||||
AxolotlSpawnEgg,
|
||||
Azalea,
|
||||
AzaleaLeaves,
|
||||
AzureBluet,
|
||||
BakedPotato,
|
||||
Bamboo,
|
||||
|
|
@ -51,14 +58,15 @@ namespace MinecraftClient.Inventory
|
|||
BatSpawnEgg,
|
||||
Beacon,
|
||||
Bedrock,
|
||||
Beef,
|
||||
Beehive,
|
||||
BeeNest,
|
||||
BeeSpawnEgg,
|
||||
Beef,
|
||||
Beehive,
|
||||
Beetroot,
|
||||
BeetrootSeeds,
|
||||
BeetrootSoup,
|
||||
Bell,
|
||||
BigDripleaf,
|
||||
BirchBoat,
|
||||
BirchButton,
|
||||
BirchDoor,
|
||||
|
|
@ -76,6 +84,7 @@ namespace MinecraftClient.Inventory
|
|||
BirchWood,
|
||||
BlackBanner,
|
||||
BlackBed,
|
||||
BlackCandle,
|
||||
BlackCarpet,
|
||||
BlackConcrete,
|
||||
BlackConcretePowder,
|
||||
|
|
@ -84,18 +93,19 @@ namespace MinecraftClient.Inventory
|
|||
BlackShulkerBox,
|
||||
BlackStainedGlass,
|
||||
BlackStainedGlassPane,
|
||||
BlackTerracotta,
|
||||
BlackWool,
|
||||
Blackstone,
|
||||
BlackstoneSlab,
|
||||
BlackstoneStairs,
|
||||
BlackstoneWall,
|
||||
BlackTerracotta,
|
||||
BlackWool,
|
||||
BlastFurnace,
|
||||
BlazePowder,
|
||||
BlazeRod,
|
||||
BlazeSpawnEgg,
|
||||
BlueBanner,
|
||||
BlueBed,
|
||||
BlueCandle,
|
||||
BlueCarpet,
|
||||
BlueConcrete,
|
||||
BlueConcretePowder,
|
||||
|
|
@ -121,12 +131,13 @@ namespace MinecraftClient.Inventory
|
|||
Bread,
|
||||
BrewingStand,
|
||||
Brick,
|
||||
Bricks,
|
||||
BrickSlab,
|
||||
BrickStairs,
|
||||
BrickWall,
|
||||
Bricks,
|
||||
BrownBanner,
|
||||
BrownBed,
|
||||
BrownCandle,
|
||||
BrownCarpet,
|
||||
BrownConcrete,
|
||||
BrownConcretePowder,
|
||||
|
|
@ -143,9 +154,13 @@ namespace MinecraftClient.Inventory
|
|||
BubbleCoralBlock,
|
||||
BubbleCoralFan,
|
||||
Bucket,
|
||||
BuddingAmethyst,
|
||||
Bundle,
|
||||
Cactus,
|
||||
Cake,
|
||||
Calcite,
|
||||
Campfire,
|
||||
Candle,
|
||||
Carrot,
|
||||
CarrotOnAStick,
|
||||
CartographyTable,
|
||||
|
|
@ -165,6 +180,7 @@ namespace MinecraftClient.Inventory
|
|||
Chicken,
|
||||
ChickenSpawnEgg,
|
||||
ChippedAnvil,
|
||||
ChiseledDeepslate,
|
||||
ChiseledNetherBricks,
|
||||
ChiseledPolishedBlackstone,
|
||||
ChiseledQuartzBlock,
|
||||
|
|
@ -181,6 +197,10 @@ namespace MinecraftClient.Inventory
|
|||
CoalBlock,
|
||||
CoalOre,
|
||||
CoarseDirt,
|
||||
CobbledDeepslate,
|
||||
CobbledDeepslateSlab,
|
||||
CobbledDeepslateStairs,
|
||||
CobbledDeepslateWall,
|
||||
Cobblestone,
|
||||
CobblestoneSlab,
|
||||
CobblestoneStairs,
|
||||
|
|
@ -204,8 +224,13 @@ namespace MinecraftClient.Inventory
|
|||
CookedRabbit,
|
||||
CookedSalmon,
|
||||
Cookie,
|
||||
CopperBlock,
|
||||
CopperIngot,
|
||||
CopperOre,
|
||||
Cornflower,
|
||||
CowSpawnEgg,
|
||||
CrackedDeepslateBricks,
|
||||
CrackedDeepslateTiles,
|
||||
CrackedNetherBricks,
|
||||
CrackedPolishedBlackstoneBricks,
|
||||
CrackedStoneBricks,
|
||||
|
|
@ -230,12 +255,16 @@ namespace MinecraftClient.Inventory
|
|||
CrimsonTrapdoor,
|
||||
Crossbow,
|
||||
CryingObsidian,
|
||||
CutCopper,
|
||||
CutCopperSlab,
|
||||
CutCopperStairs,
|
||||
CutRedSandstone,
|
||||
CutRedSandstoneSlab,
|
||||
CutSandstone,
|
||||
CutSandstoneSlab,
|
||||
CyanBanner,
|
||||
CyanBed,
|
||||
CyanCandle,
|
||||
CyanCarpet,
|
||||
CyanConcrete,
|
||||
CyanConcretePowder,
|
||||
|
|
@ -284,6 +313,23 @@ namespace MinecraftClient.Inventory
|
|||
DeadTubeCoralBlock,
|
||||
DeadTubeCoralFan,
|
||||
DebugStick,
|
||||
Deepslate,
|
||||
DeepslateBrickSlab,
|
||||
DeepslateBrickStairs,
|
||||
DeepslateBrickWall,
|
||||
DeepslateBricks,
|
||||
DeepslateCoalOre,
|
||||
DeepslateCopperOre,
|
||||
DeepslateDiamondOre,
|
||||
DeepslateEmeraldOre,
|
||||
DeepslateGoldOre,
|
||||
DeepslateIronOre,
|
||||
DeepslateLapisOre,
|
||||
DeepslateRedstoneOre,
|
||||
DeepslateTileSlab,
|
||||
DeepslateTileStairs,
|
||||
DeepslateTileWall,
|
||||
DeepslateTiles,
|
||||
DetectorRail,
|
||||
Diamond,
|
||||
DiamondAxe,
|
||||
|
|
@ -311,6 +357,7 @@ namespace MinecraftClient.Inventory
|
|||
DragonHead,
|
||||
DriedKelp,
|
||||
DriedKelpBlock,
|
||||
DripstoneBlock,
|
||||
Dropper,
|
||||
DrownedSpawnEgg,
|
||||
Egg,
|
||||
|
|
@ -323,20 +370,24 @@ namespace MinecraftClient.Inventory
|
|||
EnchantedGoldenApple,
|
||||
EnchantingTable,
|
||||
EndCrystal,
|
||||
EnderChest,
|
||||
EnderEye,
|
||||
EndermanSpawnEgg,
|
||||
EndermiteSpawnEgg,
|
||||
EnderPearl,
|
||||
EndPortalFrame,
|
||||
EndRod,
|
||||
EndStone,
|
||||
EndStoneBricks,
|
||||
EndStoneBrickSlab,
|
||||
EndStoneBrickStairs,
|
||||
EndStoneBrickWall,
|
||||
EndStoneBricks,
|
||||
EnderChest,
|
||||
EnderEye,
|
||||
EnderPearl,
|
||||
EndermanSpawnEgg,
|
||||
EndermiteSpawnEgg,
|
||||
EvokerSpawnEgg,
|
||||
ExperienceBottle,
|
||||
ExposedCopper,
|
||||
ExposedCutCopper,
|
||||
ExposedCutCopperSlab,
|
||||
ExposedCutCopperStairs,
|
||||
Farmland,
|
||||
Feather,
|
||||
FermentedSpiderEye,
|
||||
|
|
@ -354,6 +405,8 @@ namespace MinecraftClient.Inventory
|
|||
FlintAndSteel,
|
||||
FlowerBannerPattern,
|
||||
FlowerPot,
|
||||
FloweringAzalea,
|
||||
FloweringAzaleaLeaves,
|
||||
FoxSpawnEgg,
|
||||
Furnace,
|
||||
FurnaceMinecart,
|
||||
|
|
@ -365,9 +418,18 @@ namespace MinecraftClient.Inventory
|
|||
GlassPane,
|
||||
GlisteringMelonSlice,
|
||||
GlobeBannerPattern,
|
||||
GlowBerries,
|
||||
GlowInkSac,
|
||||
GlowItemFrame,
|
||||
GlowLichen,
|
||||
GlowSquidSpawnEgg,
|
||||
Glowstone,
|
||||
GlowstoneDust,
|
||||
GoatSpawnEgg,
|
||||
GoldBlock,
|
||||
GoldIngot,
|
||||
GoldNugget,
|
||||
GoldOre,
|
||||
GoldenApple,
|
||||
GoldenAxe,
|
||||
GoldenBoots,
|
||||
|
|
@ -380,9 +442,6 @@ namespace MinecraftClient.Inventory
|
|||
GoldenPickaxe,
|
||||
GoldenShovel,
|
||||
GoldenSword,
|
||||
GoldIngot,
|
||||
GoldNugget,
|
||||
GoldOre,
|
||||
Granite,
|
||||
GraniteSlab,
|
||||
GraniteStairs,
|
||||
|
|
@ -393,6 +452,7 @@ namespace MinecraftClient.Inventory
|
|||
Gravel,
|
||||
GrayBanner,
|
||||
GrayBed,
|
||||
GrayCandle,
|
||||
GrayCarpet,
|
||||
GrayConcrete,
|
||||
GrayConcretePowder,
|
||||
|
|
@ -405,6 +465,7 @@ namespace MinecraftClient.Inventory
|
|||
GrayWool,
|
||||
GreenBanner,
|
||||
GreenBed,
|
||||
GreenCandle,
|
||||
GreenCarpet,
|
||||
GreenConcrete,
|
||||
GreenConcretePowder,
|
||||
|
|
@ -418,6 +479,7 @@ namespace MinecraftClient.Inventory
|
|||
Grindstone,
|
||||
GuardianSpawnEgg,
|
||||
Gunpowder,
|
||||
HangingRoots,
|
||||
HayBlock,
|
||||
HeartOfTheSea,
|
||||
HeavyWeightedPressurePlate,
|
||||
|
|
@ -437,6 +499,7 @@ namespace MinecraftClient.Inventory
|
|||
InfestedChiseledStoneBricks,
|
||||
InfestedCobblestone,
|
||||
InfestedCrackedStoneBricks,
|
||||
InfestedDeepslate,
|
||||
InfestedMossyStoneBricks,
|
||||
InfestedStone,
|
||||
InfestedStoneBricks,
|
||||
|
|
@ -484,6 +547,7 @@ namespace MinecraftClient.Inventory
|
|||
LapisBlock,
|
||||
LapisLazuli,
|
||||
LapisOre,
|
||||
LargeAmethystBud,
|
||||
LargeFern,
|
||||
LavaBucket,
|
||||
Lead,
|
||||
|
|
@ -495,8 +559,10 @@ namespace MinecraftClient.Inventory
|
|||
LeatherLeggings,
|
||||
Lectern,
|
||||
Lever,
|
||||
Light,
|
||||
LightBlueBanner,
|
||||
LightBlueBed,
|
||||
LightBlueCandle,
|
||||
LightBlueCarpet,
|
||||
LightBlueConcrete,
|
||||
LightBlueConcretePowder,
|
||||
|
|
@ -509,6 +575,7 @@ namespace MinecraftClient.Inventory
|
|||
LightBlueWool,
|
||||
LightGrayBanner,
|
||||
LightGrayBed,
|
||||
LightGrayCandle,
|
||||
LightGrayCarpet,
|
||||
LightGrayConcrete,
|
||||
LightGrayConcretePowder,
|
||||
|
|
@ -520,11 +587,13 @@ namespace MinecraftClient.Inventory
|
|||
LightGrayTerracotta,
|
||||
LightGrayWool,
|
||||
LightWeightedPressurePlate,
|
||||
LightningRod,
|
||||
Lilac,
|
||||
LilyOfTheValley,
|
||||
LilyPad,
|
||||
LimeBanner,
|
||||
LimeBed,
|
||||
LimeCandle,
|
||||
LimeCarpet,
|
||||
LimeConcrete,
|
||||
LimeConcretePowder,
|
||||
|
|
@ -541,6 +610,7 @@ namespace MinecraftClient.Inventory
|
|||
Loom,
|
||||
MagentaBanner,
|
||||
MagentaBed,
|
||||
MagentaCandle,
|
||||
MagentaCarpet,
|
||||
MagentaConcrete,
|
||||
MagentaConcretePowder,
|
||||
|
|
@ -555,6 +625,7 @@ namespace MinecraftClient.Inventory
|
|||
MagmaCream,
|
||||
MagmaCubeSpawnEgg,
|
||||
Map,
|
||||
MediumAmethystBud,
|
||||
Melon,
|
||||
MelonSeeds,
|
||||
MelonSlice,
|
||||
|
|
@ -562,14 +633,16 @@ namespace MinecraftClient.Inventory
|
|||
Minecart,
|
||||
MojangBannerPattern,
|
||||
MooshroomSpawnEgg,
|
||||
MossBlock,
|
||||
MossCarpet,
|
||||
MossyCobblestone,
|
||||
MossyCobblestoneSlab,
|
||||
MossyCobblestoneStairs,
|
||||
MossyCobblestoneWall,
|
||||
MossyStoneBricks,
|
||||
MossyStoneBrickSlab,
|
||||
MossyStoneBrickStairs,
|
||||
MossyStoneBrickWall,
|
||||
MossyStoneBricks,
|
||||
MuleSpawnEgg,
|
||||
MushroomStem,
|
||||
MushroomStew,
|
||||
|
|
@ -581,6 +654,7 @@ namespace MinecraftClient.Inventory
|
|||
MusicDiscFar,
|
||||
MusicDiscMall,
|
||||
MusicDiscMellohi,
|
||||
MusicDiscOtherside,
|
||||
MusicDiscPigstep,
|
||||
MusicDiscStal,
|
||||
MusicDiscStrad,
|
||||
|
|
@ -592,11 +666,16 @@ namespace MinecraftClient.Inventory
|
|||
NautilusShell,
|
||||
NetherBrick,
|
||||
NetherBrickFence,
|
||||
NetherBricks,
|
||||
NetherBrickSlab,
|
||||
NetherBrickStairs,
|
||||
NetherBrickWall,
|
||||
NetherBricks,
|
||||
NetherGoldOre,
|
||||
NetherQuartzOre,
|
||||
NetherSprouts,
|
||||
NetherStar,
|
||||
NetherWart,
|
||||
NetherWartBlock,
|
||||
NetheriteAxe,
|
||||
NetheriteBlock,
|
||||
NetheriteBoots,
|
||||
|
|
@ -609,12 +688,7 @@ namespace MinecraftClient.Inventory
|
|||
NetheriteScrap,
|
||||
NetheriteShovel,
|
||||
NetheriteSword,
|
||||
NetherQuartzOre,
|
||||
Netherrack,
|
||||
NetherSprouts,
|
||||
NetherStar,
|
||||
NetherWart,
|
||||
NetherWartBlock,
|
||||
NoteBlock,
|
||||
OakBoat,
|
||||
OakButton,
|
||||
|
|
@ -636,6 +710,7 @@ namespace MinecraftClient.Inventory
|
|||
OcelotSpawnEgg,
|
||||
OrangeBanner,
|
||||
OrangeBed,
|
||||
OrangeCandle,
|
||||
OrangeCarpet,
|
||||
OrangeConcrete,
|
||||
OrangeConcretePowder,
|
||||
|
|
@ -648,6 +723,10 @@ namespace MinecraftClient.Inventory
|
|||
OrangeTulip,
|
||||
OrangeWool,
|
||||
OxeyeDaisy,
|
||||
OxidizedCopper,
|
||||
OxidizedCutCopper,
|
||||
OxidizedCutCopperSlab,
|
||||
OxidizedCutCopperStairs,
|
||||
PackedIce,
|
||||
Painting,
|
||||
PandaSpawnEgg,
|
||||
|
|
@ -657,13 +736,14 @@ namespace MinecraftClient.Inventory
|
|||
PetrifiedOakSlab,
|
||||
PhantomMembrane,
|
||||
PhantomSpawnEgg,
|
||||
PigSpawnEgg,
|
||||
PiglinBannerPattern,
|
||||
PiglinBruteSpawnEgg,
|
||||
PiglinSpawnEgg,
|
||||
PigSpawnEgg,
|
||||
PillagerSpawnEgg,
|
||||
PinkBanner,
|
||||
PinkBed,
|
||||
PinkCandle,
|
||||
PinkCarpet,
|
||||
PinkConcrete,
|
||||
PinkConcretePowder,
|
||||
|
|
@ -678,6 +758,7 @@ namespace MinecraftClient.Inventory
|
|||
Piston,
|
||||
PlayerHead,
|
||||
Podzol,
|
||||
PointedDripstone,
|
||||
PoisonousPotato,
|
||||
PolarBearSpawnEgg,
|
||||
PolishedAndesite,
|
||||
|
|
@ -685,15 +766,19 @@ namespace MinecraftClient.Inventory
|
|||
PolishedAndesiteStairs,
|
||||
PolishedBasalt,
|
||||
PolishedBlackstone,
|
||||
PolishedBlackstoneBricks,
|
||||
PolishedBlackstoneBrickSlab,
|
||||
PolishedBlackstoneBrickStairs,
|
||||
PolishedBlackstoneBrickWall,
|
||||
PolishedBlackstoneBricks,
|
||||
PolishedBlackstoneButton,
|
||||
PolishedBlackstonePressurePlate,
|
||||
PolishedBlackstoneSlab,
|
||||
PolishedBlackstoneStairs,
|
||||
PolishedBlackstoneWall,
|
||||
PolishedDeepslate,
|
||||
PolishedDeepslateSlab,
|
||||
PolishedDeepslateStairs,
|
||||
PolishedDeepslateWall,
|
||||
PolishedDiorite,
|
||||
PolishedDioriteSlab,
|
||||
PolishedDioriteStairs,
|
||||
|
|
@ -705,11 +790,12 @@ namespace MinecraftClient.Inventory
|
|||
Porkchop,
|
||||
Potato,
|
||||
Potion,
|
||||
PowderSnowBucket,
|
||||
PoweredRail,
|
||||
Prismarine,
|
||||
PrismarineBricks,
|
||||
PrismarineBrickSlab,
|
||||
PrismarineBrickStairs,
|
||||
PrismarineBricks,
|
||||
PrismarineCrystals,
|
||||
PrismarineShard,
|
||||
PrismarineSlab,
|
||||
|
|
@ -723,6 +809,7 @@ namespace MinecraftClient.Inventory
|
|||
PumpkinSeeds,
|
||||
PurpleBanner,
|
||||
PurpleBed,
|
||||
PurpleCandle,
|
||||
PurpleCarpet,
|
||||
PurpleConcrete,
|
||||
PurpleConcretePowder,
|
||||
|
|
@ -750,8 +837,15 @@ namespace MinecraftClient.Inventory
|
|||
RabbitStew,
|
||||
Rail,
|
||||
RavagerSpawnEgg,
|
||||
RawCopper,
|
||||
RawCopperBlock,
|
||||
RawGold,
|
||||
RawGoldBlock,
|
||||
RawIron,
|
||||
RawIronBlock,
|
||||
RedBanner,
|
||||
RedBed,
|
||||
RedCandle,
|
||||
RedCarpet,
|
||||
RedConcrete,
|
||||
RedConcretePowder,
|
||||
|
|
@ -759,10 +853,10 @@ namespace MinecraftClient.Inventory
|
|||
RedGlazedTerracotta,
|
||||
RedMushroom,
|
||||
RedMushroomBlock,
|
||||
RedNetherBricks,
|
||||
RedNetherBrickSlab,
|
||||
RedNetherBrickStairs,
|
||||
RedNetherBrickWall,
|
||||
RedNetherBricks,
|
||||
RedSand,
|
||||
RedSandstone,
|
||||
RedSandstoneSlab,
|
||||
|
|
@ -771,17 +865,18 @@ namespace MinecraftClient.Inventory
|
|||
RedShulkerBox,
|
||||
RedStainedGlass,
|
||||
RedStainedGlassPane,
|
||||
RedTerracotta,
|
||||
RedTulip,
|
||||
RedWool,
|
||||
Redstone,
|
||||
RedstoneBlock,
|
||||
RedstoneLamp,
|
||||
RedstoneOre,
|
||||
RedstoneTorch,
|
||||
RedTerracotta,
|
||||
RedTulip,
|
||||
RedWool,
|
||||
Repeater,
|
||||
RepeatingCommandBlock,
|
||||
RespawnAnchor,
|
||||
RootedDirt,
|
||||
RoseBush,
|
||||
RottenFlesh,
|
||||
Saddle,
|
||||
|
|
@ -794,10 +889,11 @@ namespace MinecraftClient.Inventory
|
|||
SandstoneStairs,
|
||||
SandstoneWall,
|
||||
Scaffolding,
|
||||
SculkSensor,
|
||||
Scute,
|
||||
Seagrass,
|
||||
SeaLantern,
|
||||
SeaPickle,
|
||||
Seagrass,
|
||||
Shears,
|
||||
SheepSpawnEgg,
|
||||
Shield,
|
||||
|
|
@ -813,8 +909,11 @@ namespace MinecraftClient.Inventory
|
|||
SlimeBall,
|
||||
SlimeBlock,
|
||||
SlimeSpawnEgg,
|
||||
SmallAmethystBud,
|
||||
SmallDripleaf,
|
||||
SmithingTable,
|
||||
Smoker,
|
||||
SmoothBasalt,
|
||||
SmoothQuartz,
|
||||
SmoothQuartzSlab,
|
||||
SmoothQuartzStairs,
|
||||
|
|
@ -827,8 +926,8 @@ namespace MinecraftClient.Inventory
|
|||
SmoothStone,
|
||||
SmoothStoneSlab,
|
||||
Snow,
|
||||
Snowball,
|
||||
SnowBlock,
|
||||
Snowball,
|
||||
SoulCampfire,
|
||||
SoulLantern,
|
||||
SoulSand,
|
||||
|
|
@ -840,6 +939,7 @@ namespace MinecraftClient.Inventory
|
|||
SpiderSpawnEgg,
|
||||
SplashPotion,
|
||||
Sponge,
|
||||
SporeBlossom,
|
||||
SpruceBoat,
|
||||
SpruceButton,
|
||||
SpruceDoor,
|
||||
|
|
@ -855,17 +955,17 @@ namespace MinecraftClient.Inventory
|
|||
SpruceStairs,
|
||||
SpruceTrapdoor,
|
||||
SpruceWood,
|
||||
Spyglass,
|
||||
SquidSpawnEgg,
|
||||
Stick,
|
||||
StickyPiston,
|
||||
Stone,
|
||||
StoneAxe,
|
||||
StoneBricks,
|
||||
StoneBrickSlab,
|
||||
StoneBrickStairs,
|
||||
StoneBrickWall,
|
||||
StoneBricks,
|
||||
StoneButton,
|
||||
Stonecutter,
|
||||
StoneHoe,
|
||||
StonePickaxe,
|
||||
StonePressurePlate,
|
||||
|
|
@ -873,6 +973,7 @@ namespace MinecraftClient.Inventory
|
|||
StoneSlab,
|
||||
StoneStairs,
|
||||
StoneSword,
|
||||
Stonecutter,
|
||||
StraySpawnEgg,
|
||||
StriderSpawnEgg,
|
||||
String,
|
||||
|
|
@ -902,6 +1003,7 @@ namespace MinecraftClient.Inventory
|
|||
TallGrass,
|
||||
Target,
|
||||
Terracotta,
|
||||
TintedGlass,
|
||||
TippedArrow,
|
||||
Tnt,
|
||||
TntMinecart,
|
||||
|
|
@ -917,6 +1019,7 @@ namespace MinecraftClient.Inventory
|
|||
TubeCoral,
|
||||
TubeCoralBlock,
|
||||
TubeCoralFan,
|
||||
Tuff,
|
||||
TurtleEgg,
|
||||
TurtleHelmet,
|
||||
TurtleSpawnEgg,
|
||||
|
|
@ -944,12 +1047,33 @@ namespace MinecraftClient.Inventory
|
|||
WarpedTrapdoor,
|
||||
WarpedWartBlock,
|
||||
WaterBucket,
|
||||
WaxedCopperBlock,
|
||||
WaxedCutCopper,
|
||||
WaxedCutCopperSlab,
|
||||
WaxedCutCopperStairs,
|
||||
WaxedExposedCopper,
|
||||
WaxedExposedCutCopper,
|
||||
WaxedExposedCutCopperSlab,
|
||||
WaxedExposedCutCopperStairs,
|
||||
WaxedOxidizedCopper,
|
||||
WaxedOxidizedCutCopper,
|
||||
WaxedOxidizedCutCopperSlab,
|
||||
WaxedOxidizedCutCopperStairs,
|
||||
WaxedWeatheredCopper,
|
||||
WaxedWeatheredCutCopper,
|
||||
WaxedWeatheredCutCopperSlab,
|
||||
WaxedWeatheredCutCopperStairs,
|
||||
WeatheredCopper,
|
||||
WeatheredCutCopper,
|
||||
WeatheredCutCopperSlab,
|
||||
WeatheredCutCopperStairs,
|
||||
WeepingVines,
|
||||
WetSponge,
|
||||
Wheat,
|
||||
WheatSeeds,
|
||||
WhiteBanner,
|
||||
WhiteBed,
|
||||
WhiteCandle,
|
||||
WhiteCarpet,
|
||||
WhiteConcrete,
|
||||
WhiteConcretePowder,
|
||||
|
|
@ -975,6 +1099,7 @@ namespace MinecraftClient.Inventory
|
|||
WrittenBook,
|
||||
YellowBanner,
|
||||
YellowBed,
|
||||
YellowCandle,
|
||||
YellowCarpet,
|
||||
YellowConcrete,
|
||||
YellowConcretePowder,
|
||||
|
|
@ -990,6 +1115,6 @@ namespace MinecraftClient.Inventory
|
|||
ZombieHorseSpawnEgg,
|
||||
ZombieSpawnEgg,
|
||||
ZombieVillagerSpawnEgg,
|
||||
ZombifiedPiglinSpawnEgg,
|
||||
ZombifiedPiglinSpawnEgg
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,11 +50,13 @@ namespace MinecraftClient.Inventory
|
|||
ItemType[] t =
|
||||
{
|
||||
ItemType.AcaciaBoat,
|
||||
ItemType.AxolotlBucket,
|
||||
ItemType.BirchBoat,
|
||||
ItemType.BlackBed,
|
||||
ItemType.BlackShulkerBox,
|
||||
ItemType.BlueBed,
|
||||
ItemType.BlueShulkerBox,
|
||||
ItemType.Bundle,
|
||||
ItemType.Bow,
|
||||
ItemType.BrownBed,
|
||||
ItemType.BrownShulkerBox,
|
||||
|
|
@ -142,6 +144,7 @@ namespace MinecraftClient.Inventory
|
|||
ItemType.MusicDiscFar,
|
||||
ItemType.MusicDiscMall,
|
||||
ItemType.MusicDiscMellohi,
|
||||
ItemType.MusicDiscOtherside,
|
||||
ItemType.MusicDiscStal,
|
||||
ItemType.MusicDiscStrad,
|
||||
ItemType.MusicDiscWait,
|
||||
|
|
@ -152,6 +155,7 @@ namespace MinecraftClient.Inventory
|
|||
ItemType.PinkBed,
|
||||
ItemType.PinkShulkerBox,
|
||||
ItemType.Potion,
|
||||
ItemType.PowderSnowBucket,
|
||||
ItemType.PufferfishBucket,
|
||||
ItemType.PurpleBed,
|
||||
ItemType.PurpleShulkerBox,
|
||||
|
|
@ -166,6 +170,7 @@ namespace MinecraftClient.Inventory
|
|||
ItemType.SkullBannerPattern,
|
||||
ItemType.SplashPotion,
|
||||
ItemType.SpruceBoat,
|
||||
ItemType.Spyglass,
|
||||
ItemType.StoneAxe,
|
||||
ItemType.StoneHoe,
|
||||
ItemType.StonePickaxe,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
/// </remarks>
|
||||
public static class BlockPaletteGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Generate mapping from Minecraft blocks.json
|
||||
/// </summary>
|
||||
/// <param name="blocksJsonFile">path to blocks.json</param>
|
||||
/// <remarks>java -cp minecraft_server.jar net.minecraft.data.Main --reports</remarks>
|
||||
/// <returns>state => block name mappings</returns>
|
||||
public static void GenerateBlockPallete(string blocksJsonFile)
|
||||
{
|
||||
BlockPaletteGenerator.JsonToClass(blocksJsonFile, "Palette", "Material");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate mapping from Minecraft blocks.json
|
||||
/// </summary>
|
||||
|
|
@ -33,6 +44,9 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
/// <returns>state => block name mappings</returns>
|
||||
public static void JsonToClass(string blocksJsonFile, string outputClass, string outputEnum = null)
|
||||
{
|
||||
string outputPalettePath = Path.Combine(Path.GetDirectoryName(blocksJsonFile), outputClass + "XXX.cs");
|
||||
string outputEnumPath = Path.Combine(Path.GetDirectoryName(blocksJsonFile), outputEnum + "XXX.cs");
|
||||
|
||||
HashSet<int> knownStates = new HashSet<int>();
|
||||
Dictionary<string, HashSet<int>> blocks = new Dictionary<string, HashSet<int>>();
|
||||
|
||||
|
|
@ -70,7 +84,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
"",
|
||||
"namespace MinecraftClient.Mapping.BlockPalettes",
|
||||
"{",
|
||||
" public class PaletteXXX : PaletteMapping",
|
||||
" public class PaletteXXX : BlockPalette",
|
||||
" {",
|
||||
" private static Dictionary<int, Material> materials = new Dictionary<int, Material>();",
|
||||
"",
|
||||
|
|
@ -121,7 +135,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
"}"
|
||||
});
|
||||
|
||||
File.WriteAllLines(outputClass, outFile);
|
||||
File.WriteAllLines(outputPalettePath, outFile);
|
||||
|
||||
if (outputEnum != null)
|
||||
{
|
||||
|
|
@ -138,7 +152,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
" }",
|
||||
"}"
|
||||
});
|
||||
File.WriteAllLines(outputEnum, outFile);
|
||||
File.WriteAllLines(outputEnumPath, outFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1468
MinecraftClient/Mapping/BlockPalettes/Palette117.cs
Normal file
1468
MinecraftClient/Mapping/BlockPalettes/Palette117.cs
Normal file
File diff suppressed because it is too large
Load diff
132
MinecraftClient/Mapping/EntityPalettes/EntityPalette117.cs
Normal file
132
MinecraftClient/Mapping/EntityPalettes/EntityPalette117.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MinecraftClient.Mapping.EntityPalettes
|
||||
{
|
||||
public class EntityPalette117 : EntityPalette
|
||||
{
|
||||
private static Dictionary<int, EntityType> mappings = new Dictionary<int, EntityType>();
|
||||
|
||||
static EntityPalette117()
|
||||
{
|
||||
mappings[0] = EntityType.AreaEffectCloud;
|
||||
mappings[1] = EntityType.ArmorStand;
|
||||
mappings[2] = EntityType.Arrow;
|
||||
mappings[3] = EntityType.Axolotl;
|
||||
mappings[4] = EntityType.Bat;
|
||||
mappings[5] = EntityType.Bee;
|
||||
mappings[6] = EntityType.Blaze;
|
||||
mappings[7] = EntityType.Boat;
|
||||
mappings[8] = EntityType.Cat;
|
||||
mappings[9] = EntityType.CaveSpider;
|
||||
mappings[10] = EntityType.Chicken;
|
||||
mappings[11] = EntityType.Cod;
|
||||
mappings[12] = EntityType.Cow;
|
||||
mappings[13] = EntityType.Creeper;
|
||||
mappings[14] = EntityType.Dolphin;
|
||||
mappings[15] = EntityType.Donkey;
|
||||
mappings[16] = EntityType.DragonFireball;
|
||||
mappings[17] = EntityType.Drowned;
|
||||
mappings[18] = EntityType.ElderGuardian;
|
||||
mappings[19] = EntityType.EndCrystal;
|
||||
mappings[20] = EntityType.EnderDragon;
|
||||
mappings[21] = EntityType.Enderman;
|
||||
mappings[22] = EntityType.Endermite;
|
||||
mappings[23] = EntityType.Evoker;
|
||||
mappings[24] = EntityType.EvokerFangs;
|
||||
mappings[25] = EntityType.ExperienceOrb;
|
||||
mappings[26] = EntityType.EyeOfEnder;
|
||||
mappings[27] = EntityType.FallingBlock;
|
||||
mappings[28] = EntityType.FireworkRocket;
|
||||
mappings[29] = EntityType.Fox;
|
||||
mappings[30] = EntityType.Ghast;
|
||||
mappings[31] = EntityType.Giant;
|
||||
mappings[32] = EntityType.GlowItemFrame;
|
||||
mappings[33] = EntityType.GlowSquid;
|
||||
mappings[34] = EntityType.Goat;
|
||||
mappings[35] = EntityType.Guardian;
|
||||
mappings[36] = EntityType.Hoglin;
|
||||
mappings[37] = EntityType.Horse;
|
||||
mappings[38] = EntityType.Husk;
|
||||
mappings[39] = EntityType.Illusioner;
|
||||
mappings[40] = EntityType.IronGolem;
|
||||
mappings[41] = EntityType.Item;
|
||||
mappings[42] = EntityType.ItemFrame;
|
||||
mappings[43] = EntityType.Fireball;
|
||||
mappings[44] = EntityType.LeashKnot;
|
||||
mappings[45] = EntityType.LightningBolt;
|
||||
mappings[46] = EntityType.Llama;
|
||||
mappings[47] = EntityType.LlamaSpit;
|
||||
mappings[48] = EntityType.MagmaCube;
|
||||
mappings[49] = EntityType.Marker;
|
||||
mappings[50] = EntityType.Minecart;
|
||||
mappings[51] = EntityType.ChestMinecart;
|
||||
mappings[52] = EntityType.CommandBlockMinecart;
|
||||
mappings[53] = EntityType.FurnaceMinecart;
|
||||
mappings[54] = EntityType.HopperMinecart;
|
||||
mappings[55] = EntityType.SpawnerMinecart;
|
||||
mappings[56] = EntityType.TntMinecart;
|
||||
mappings[57] = EntityType.Mule;
|
||||
mappings[58] = EntityType.Mooshroom;
|
||||
mappings[59] = EntityType.Ocelot;
|
||||
mappings[60] = EntityType.Painting;
|
||||
mappings[61] = EntityType.Panda;
|
||||
mappings[62] = EntityType.Parrot;
|
||||
mappings[63] = EntityType.Phantom;
|
||||
mappings[64] = EntityType.Pig;
|
||||
mappings[65] = EntityType.Piglin;
|
||||
mappings[66] = EntityType.PiglinBrute;
|
||||
mappings[67] = EntityType.Pillager;
|
||||
mappings[68] = EntityType.PolarBear;
|
||||
mappings[69] = EntityType.Tnt;
|
||||
mappings[70] = EntityType.Pufferfish;
|
||||
mappings[71] = EntityType.Rabbit;
|
||||
mappings[72] = EntityType.Ravager;
|
||||
mappings[73] = EntityType.Salmon;
|
||||
mappings[74] = EntityType.Sheep;
|
||||
mappings[75] = EntityType.Shulker;
|
||||
mappings[76] = EntityType.ShulkerBullet;
|
||||
mappings[77] = EntityType.Silverfish;
|
||||
mappings[78] = EntityType.Skeleton;
|
||||
mappings[79] = EntityType.SkeletonHorse;
|
||||
mappings[80] = EntityType.Slime;
|
||||
mappings[81] = EntityType.SmallFireball;
|
||||
mappings[82] = EntityType.SnowGolem;
|
||||
mappings[83] = EntityType.Snowball;
|
||||
mappings[84] = EntityType.SpectralArrow;
|
||||
mappings[85] = EntityType.Spider;
|
||||
mappings[86] = EntityType.Squid;
|
||||
mappings[87] = EntityType.Stray;
|
||||
mappings[88] = EntityType.Strider;
|
||||
mappings[89] = EntityType.Egg;
|
||||
mappings[90] = EntityType.EnderPearl;
|
||||
mappings[91] = EntityType.ExperienceBottle;
|
||||
mappings[92] = EntityType.Potion;
|
||||
mappings[93] = EntityType.Trident;
|
||||
mappings[94] = EntityType.TraderLlama;
|
||||
mappings[95] = EntityType.TropicalFish;
|
||||
mappings[96] = EntityType.Turtle;
|
||||
mappings[97] = EntityType.Vex;
|
||||
mappings[98] = EntityType.Villager;
|
||||
mappings[99] = EntityType.Vindicator;
|
||||
mappings[100] = EntityType.WanderingTrader;
|
||||
mappings[101] = EntityType.Witch;
|
||||
mappings[102] = EntityType.Wither;
|
||||
mappings[103] = EntityType.WitherSkeleton;
|
||||
mappings[104] = EntityType.WitherSkull;
|
||||
mappings[105] = EntityType.Wolf;
|
||||
mappings[106] = EntityType.Zoglin;
|
||||
mappings[107] = EntityType.Zombie;
|
||||
mappings[108] = EntityType.ZombieHorse;
|
||||
mappings[109] = EntityType.ZombieVillager;
|
||||
mappings[110] = EntityType.ZombifiedPiglin;
|
||||
mappings[111] = EntityType.Player;
|
||||
mappings[112] = EntityType.FishingBobber;
|
||||
}
|
||||
|
||||
protected override Dictionary<int, EntityType> GetDict()
|
||||
{
|
||||
return mappings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,59 +17,62 @@ namespace MinecraftClient.Mapping
|
|||
AreaEffectCloud,
|
||||
ArmorStand,
|
||||
Arrow,
|
||||
Axolotl,
|
||||
Bat,
|
||||
Bee,
|
||||
Blaze,
|
||||
Boat,
|
||||
Cat,
|
||||
CaveSpider,
|
||||
ChestMinecart,
|
||||
Chicken,
|
||||
Cod,
|
||||
CommandBlockMinecart,
|
||||
Cow,
|
||||
Creeper,
|
||||
Dolphin,
|
||||
Donkey,
|
||||
DragonFireball,
|
||||
Drowned,
|
||||
Egg,
|
||||
ElderGuardian,
|
||||
EndCrystal,
|
||||
EnderDragon,
|
||||
Enderman,
|
||||
Endermite,
|
||||
EnderPearl,
|
||||
Evoker,
|
||||
EvokerFangs,
|
||||
ExperienceBottle,
|
||||
ExperienceOrb,
|
||||
EyeOfEnder,
|
||||
FallingBlock,
|
||||
Fireball,
|
||||
FireworkRocket,
|
||||
FishingBobber,
|
||||
Fox,
|
||||
FurnaceMinecart,
|
||||
Ghast,
|
||||
Giant,
|
||||
GlowItemFrame,
|
||||
GlowSquid,
|
||||
Goat,
|
||||
Guardian,
|
||||
Hoglin,
|
||||
HopperMinecart,
|
||||
Horse,
|
||||
Husk,
|
||||
Illusioner,
|
||||
IronGolem,
|
||||
Item,
|
||||
ItemFrame,
|
||||
Fireball,
|
||||
LeashKnot,
|
||||
LightningBolt,
|
||||
Llama,
|
||||
LlamaSpit,
|
||||
MagmaCube,
|
||||
Marker,
|
||||
Minecart,
|
||||
Mooshroom,
|
||||
ChestMinecart,
|
||||
CommandBlockMinecart,
|
||||
FurnaceMinecart,
|
||||
HopperMinecart,
|
||||
SpawnerMinecart,
|
||||
TntMinecart,
|
||||
Mule,
|
||||
Mooshroom,
|
||||
Ocelot,
|
||||
Painting,
|
||||
Panda,
|
||||
|
|
@ -79,9 +82,8 @@ namespace MinecraftClient.Mapping
|
|||
Piglin,
|
||||
PiglinBrute,
|
||||
Pillager,
|
||||
Player,
|
||||
PolarBear,
|
||||
Potion,
|
||||
Tnt,
|
||||
Pufferfish,
|
||||
Rabbit,
|
||||
Ravager,
|
||||
|
|
@ -94,18 +96,19 @@ namespace MinecraftClient.Mapping
|
|||
SkeletonHorse,
|
||||
Slime,
|
||||
SmallFireball,
|
||||
Snowball,
|
||||
SnowGolem,
|
||||
SpawnerMinecart,
|
||||
Snowball,
|
||||
SpectralArrow,
|
||||
Spider,
|
||||
Squid,
|
||||
Stray,
|
||||
Strider,
|
||||
Tnt,
|
||||
TntMinecart,
|
||||
TraderLlama,
|
||||
Egg,
|
||||
EnderPearl,
|
||||
ExperienceBottle,
|
||||
Potion,
|
||||
Trident,
|
||||
TraderLlama,
|
||||
TropicalFish,
|
||||
Turtle,
|
||||
Vex,
|
||||
|
|
@ -122,5 +125,7 @@ namespace MinecraftClient.Mapping
|
|||
ZombieHorse,
|
||||
ZombieVillager,
|
||||
ZombifiedPiglin,
|
||||
Player,
|
||||
FishingBobber,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ namespace MinecraftClient.Mapping
|
|||
{
|
||||
switch (e)
|
||||
{
|
||||
case EntityType.GlowItemFrame:
|
||||
case EntityType.Item:
|
||||
case EntityType.ItemFrame:
|
||||
case EntityType.EyeOfEnder:
|
||||
|
|
|
|||
|
|
@ -46,8 +46,11 @@
|
|||
RedSand,
|
||||
Gravel,
|
||||
GoldOre,
|
||||
DeepslateGoldOre,
|
||||
IronOre,
|
||||
DeepslateIronOre,
|
||||
CoalOre,
|
||||
DeepslateCoalOre,
|
||||
NetherGoldOre,
|
||||
OakLog,
|
||||
SpruceLog,
|
||||
|
|
@ -79,10 +82,13 @@
|
|||
JungleLeaves,
|
||||
AcaciaLeaves,
|
||||
DarkOakLeaves,
|
||||
AzaleaLeaves,
|
||||
FloweringAzaleaLeaves,
|
||||
Sponge,
|
||||
WetSponge,
|
||||
Glass,
|
||||
LapisOre,
|
||||
DeepslateLapisOre,
|
||||
LapisBlock,
|
||||
Dispenser,
|
||||
Sandstone,
|
||||
|
|
@ -164,6 +170,7 @@
|
|||
Chest,
|
||||
RedstoneWire,
|
||||
DiamondOre,
|
||||
DeepslateDiamondOre,
|
||||
DiamondBlock,
|
||||
CraftingTable,
|
||||
Wheat,
|
||||
|
|
@ -195,6 +202,7 @@
|
|||
AcaciaPressurePlate,
|
||||
DarkOakPressurePlate,
|
||||
RedstoneOre,
|
||||
DeepslateRedstoneOre,
|
||||
RedstoneTorch,
|
||||
RedstoneWallTorch,
|
||||
StoneButton,
|
||||
|
|
@ -264,6 +272,7 @@
|
|||
PumpkinStem,
|
||||
MelonStem,
|
||||
Vine,
|
||||
GlowLichen,
|
||||
OakFenceGate,
|
||||
BrickStairs,
|
||||
StoneBrickStairs,
|
||||
|
|
@ -276,6 +285,9 @@
|
|||
EnchantingTable,
|
||||
BrewingStand,
|
||||
Cauldron,
|
||||
WaterCauldron,
|
||||
LavaCauldron,
|
||||
PowderSnowCauldron,
|
||||
EndPortal,
|
||||
EndPortalFrame,
|
||||
EndStone,
|
||||
|
|
@ -284,6 +296,7 @@
|
|||
Cocoa,
|
||||
SandstoneStairs,
|
||||
EmeraldOre,
|
||||
DeepslateEmeraldOre,
|
||||
EnderChest,
|
||||
TripwireHook,
|
||||
Tripwire,
|
||||
|
|
@ -393,6 +406,7 @@
|
|||
DarkOakStairs,
|
||||
SlimeBlock,
|
||||
Barrier,
|
||||
Light,
|
||||
IronTrapdoor,
|
||||
Prismarine,
|
||||
PrismarineBricks,
|
||||
|
|
@ -777,5 +791,126 @@
|
|||
ChiseledNetherBricks,
|
||||
CrackedNetherBricks,
|
||||
QuartzBricks,
|
||||
Candle,
|
||||
WhiteCandle,
|
||||
OrangeCandle,
|
||||
MagentaCandle,
|
||||
LightBlueCandle,
|
||||
YellowCandle,
|
||||
LimeCandle,
|
||||
PinkCandle,
|
||||
GrayCandle,
|
||||
LightGrayCandle,
|
||||
CyanCandle,
|
||||
PurpleCandle,
|
||||
BlueCandle,
|
||||
BrownCandle,
|
||||
GreenCandle,
|
||||
RedCandle,
|
||||
BlackCandle,
|
||||
CandleCake,
|
||||
WhiteCandleCake,
|
||||
OrangeCandleCake,
|
||||
MagentaCandleCake,
|
||||
LightBlueCandleCake,
|
||||
YellowCandleCake,
|
||||
LimeCandleCake,
|
||||
PinkCandleCake,
|
||||
GrayCandleCake,
|
||||
LightGrayCandleCake,
|
||||
CyanCandleCake,
|
||||
PurpleCandleCake,
|
||||
BlueCandleCake,
|
||||
BrownCandleCake,
|
||||
GreenCandleCake,
|
||||
RedCandleCake,
|
||||
BlackCandleCake,
|
||||
AmethystBlock,
|
||||
BuddingAmethyst,
|
||||
AmethystCluster,
|
||||
LargeAmethystBud,
|
||||
MediumAmethystBud,
|
||||
SmallAmethystBud,
|
||||
Tuff,
|
||||
Calcite,
|
||||
TintedGlass,
|
||||
PowderSnow,
|
||||
SculkSensor,
|
||||
OxidizedCopper,
|
||||
WeatheredCopper,
|
||||
ExposedCopper,
|
||||
CopperBlock,
|
||||
CopperOre,
|
||||
DeepslateCopperOre,
|
||||
OxidizedCutCopper,
|
||||
WeatheredCutCopper,
|
||||
ExposedCutCopper,
|
||||
CutCopper,
|
||||
OxidizedCutCopperStairs,
|
||||
WeatheredCutCopperStairs,
|
||||
ExposedCutCopperStairs,
|
||||
CutCopperStairs,
|
||||
OxidizedCutCopperSlab,
|
||||
WeatheredCutCopperSlab,
|
||||
ExposedCutCopperSlab,
|
||||
CutCopperSlab,
|
||||
WaxedCopperBlock,
|
||||
WaxedWeatheredCopper,
|
||||
WaxedExposedCopper,
|
||||
WaxedOxidizedCopper,
|
||||
WaxedOxidizedCutCopper,
|
||||
WaxedWeatheredCutCopper,
|
||||
WaxedExposedCutCopper,
|
||||
WaxedCutCopper,
|
||||
WaxedOxidizedCutCopperStairs,
|
||||
WaxedWeatheredCutCopperStairs,
|
||||
WaxedExposedCutCopperStairs,
|
||||
WaxedCutCopperStairs,
|
||||
WaxedOxidizedCutCopperSlab,
|
||||
WaxedWeatheredCutCopperSlab,
|
||||
WaxedExposedCutCopperSlab,
|
||||
WaxedCutCopperSlab,
|
||||
LightningRod,
|
||||
PointedDripstone,
|
||||
DripstoneBlock,
|
||||
CaveVines,
|
||||
CaveVinesPlant,
|
||||
SporeBlossom,
|
||||
Azalea,
|
||||
FloweringAzalea,
|
||||
MossCarpet,
|
||||
MossBlock,
|
||||
BigDripleaf,
|
||||
BigDripleafStem,
|
||||
SmallDripleaf,
|
||||
HangingRoots,
|
||||
RootedDirt,
|
||||
Deepslate,
|
||||
CobbledDeepslate,
|
||||
CobbledDeepslateStairs,
|
||||
CobbledDeepslateSlab,
|
||||
CobbledDeepslateWall,
|
||||
PolishedDeepslate,
|
||||
PolishedDeepslateStairs,
|
||||
PolishedDeepslateSlab,
|
||||
PolishedDeepslateWall,
|
||||
DeepslateTiles,
|
||||
DeepslateTileStairs,
|
||||
DeepslateTileSlab,
|
||||
DeepslateTileWall,
|
||||
DeepslateBricks,
|
||||
DeepslateBrickStairs,
|
||||
DeepslateBrickSlab,
|
||||
DeepslateBrickWall,
|
||||
ChiseledDeepslate,
|
||||
CrackedDeepslateBricks,
|
||||
CrackedDeepslateTiles,
|
||||
InfestedDeepslate,
|
||||
SmoothBasalt,
|
||||
RawIronBlock,
|
||||
RawCopperBlock,
|
||||
RawGoldBlock,
|
||||
PottedAzaleaBush,
|
||||
PottedFloweringAzaleaBush,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,13 @@ namespace MinecraftClient.Mapping
|
|||
Material.BrownShulkerBox,
|
||||
Material.BrownTerracotta,
|
||||
Material.Cauldron,
|
||||
Material.WaterCauldron,
|
||||
Material.LavaCauldron,
|
||||
Material.PowderSnowCauldron,
|
||||
Material.Chain,
|
||||
Material.Calcite,
|
||||
Material.ChippedAnvil,
|
||||
Material.ChiseledDeepslate,
|
||||
Material.ChiseledNetherBricks,
|
||||
Material.ChiseledPolishedBlackstone,
|
||||
Material.ChiseledQuartzBlock,
|
||||
|
|
@ -53,11 +58,17 @@ namespace MinecraftClient.Mapping
|
|||
Material.ChiseledStoneBricks,
|
||||
Material.CoalBlock,
|
||||
Material.CoalOre,
|
||||
Material.CobbledDeepslateSlab,
|
||||
Material.CobbledDeepslateStairs,
|
||||
Material.CobbledDeepslateWall,
|
||||
Material.CobbledDeepslate,
|
||||
Material.Cobblestone,
|
||||
Material.CobblestoneSlab,
|
||||
Material.CobblestoneStairs,
|
||||
Material.CobblestoneWall,
|
||||
Material.Conduit,
|
||||
Material.CrackedDeepslateBricks,
|
||||
Material.CrackedDeepslateTiles,
|
||||
Material.CrackedNetherBricks,
|
||||
Material.CrackedPolishedBlackstoneBricks,
|
||||
Material.CrackedStoneBricks,
|
||||
|
|
@ -74,11 +85,22 @@ namespace MinecraftClient.Mapping
|
|||
Material.DarkPrismarine,
|
||||
Material.DarkPrismarineSlab,
|
||||
Material.DarkPrismarineStairs,
|
||||
Material.Deepslate,
|
||||
Material.DeepslateBrickSlab,
|
||||
Material.DeepslateBrickStairs,
|
||||
Material.DeepslateBricks,
|
||||
Material.DeepslateBrickWall,
|
||||
Material.DeepslateCoalOre,
|
||||
Material.DeepslateTileSlab,
|
||||
Material.DeepslateTileStairs,
|
||||
Material.DeepslateTiles,
|
||||
Material.DeepslateTileWall,
|
||||
Material.DetectorRail,
|
||||
Material.Diorite,
|
||||
Material.DioriteSlab,
|
||||
Material.DioriteStairs,
|
||||
Material.DioriteWall,
|
||||
Material.DripstoneBlock,
|
||||
Material.Dispenser,
|
||||
Material.Dropper,
|
||||
Material.EnchantingTable,
|
||||
|
|
@ -160,6 +182,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.PinkShulkerBox,
|
||||
Material.PinkTerracotta,
|
||||
Material.Piston,
|
||||
Material.PointedDripstone,
|
||||
Material.PolishedAndesite,
|
||||
Material.PolishedAndesiteSlab,
|
||||
Material.PolishedAndesiteStairs,
|
||||
|
|
@ -221,6 +244,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.SandstoneWall,
|
||||
Material.ShulkerBox,
|
||||
Material.Smoker,
|
||||
Material.SmoothBasalt,
|
||||
Material.SmoothQuartz,
|
||||
Material.SmoothQuartzSlab,
|
||||
Material.SmoothQuartzStairs,
|
||||
|
|
@ -245,6 +269,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.StoneStairs,
|
||||
Material.Stonecutter,
|
||||
Material.Terracotta,
|
||||
Material.Tuff,
|
||||
Material.WarpedNylium,
|
||||
Material.WhiteConcrete,
|
||||
Material.WhiteGlazedTerracotta,
|
||||
|
|
@ -253,26 +278,70 @@ namespace MinecraftClient.Mapping
|
|||
Material.YellowConcrete,
|
||||
Material.YellowGlazedTerracotta,
|
||||
Material.YellowShulkerBox,
|
||||
Material.YellowTerracotta
|
||||
Material.YellowTerracotta,
|
||||
};
|
||||
// Minable by Stone, iron, diamond, netherite.
|
||||
private static readonly List<Material> pickaxeTier1 = new List<Material>()
|
||||
{
|
||||
Material.CopperOre,
|
||||
Material.CopperBlock,
|
||||
Material.CutCopperSlab,
|
||||
Material.CutCopperStairs,
|
||||
Material.CutCopper,
|
||||
Material.DeepslateCopperOre,
|
||||
Material.DeepslateIronOre,
|
||||
Material.DeepslateLapisOre,
|
||||
Material.ExposedCopper,
|
||||
Material.ExposedCutCopperSlab,
|
||||
Material.ExposedCutCopperStairs,
|
||||
Material.ExposedCutCopper,
|
||||
Material.IronBlock,
|
||||
Material.IronOre,
|
||||
Material.LapisBlock,
|
||||
Material.LapisOre,
|
||||
Material.LightningRod,
|
||||
Material.OxidizedCopper,
|
||||
Material.OxidizedCutCopperSlab,
|
||||
Material.OxidizedCutCopperStairs,
|
||||
Material.OxidizedCutCopper,
|
||||
Material.RawCopperBlock,
|
||||
Material.RawIronBlock,
|
||||
Material.Terracotta,
|
||||
Material.WaxedCopperBlock,
|
||||
Material.WaxedCutCopperSlab,
|
||||
Material.WaxedCutCopperStairs,
|
||||
Material.WaxedCutCopper,
|
||||
Material.WaxedExposedCopper,
|
||||
Material.WaxedExposedCutCopperSlab,
|
||||
Material.WaxedExposedCutCopperStairs,
|
||||
Material.WaxedExposedCutCopper,
|
||||
Material.WaxedOxidizedCopper,
|
||||
Material.WaxedOxidizedCutCopperSlab,
|
||||
Material.WaxedOxidizedCutCopperStairs,
|
||||
Material.WaxedOxidizedCutCopper,
|
||||
Material.WaxedWeatheredCopper,
|
||||
Material.WaxedWeatheredCutCopperSlab,
|
||||
Material.WaxedWeatheredCutCopperStairs,
|
||||
Material.WaxedWeatheredCutCopper,
|
||||
Material.WeatheredCopper,
|
||||
Material.WeatheredCutCopperSlab,
|
||||
Material.WeatheredCutCopperStairs,
|
||||
Material.WeatheredCutCopper,
|
||||
};
|
||||
// Minable by Iron, diamond, netherite.
|
||||
private static readonly List<Material> pickaxeTier2 = new List<Material>()
|
||||
{
|
||||
Material.DeepslateDiamondOre,
|
||||
Material.DeepslateEmeraldOre,
|
||||
Material.DeepslateGoldOre,
|
||||
Material.DeepslateRedstoneOre,
|
||||
Material.DiamondBlock,
|
||||
Material.DiamondOre,
|
||||
Material.EmeraldBlock,
|
||||
Material.EmeraldOre,
|
||||
Material.GoldBlock,
|
||||
Material.GoldOre,
|
||||
Material.RawGoldBlock,
|
||||
Material.RedstoneOre,
|
||||
};
|
||||
// Minable by Diamond, Netherite.
|
||||
|
|
@ -314,13 +383,14 @@ namespace MinecraftClient.Mapping
|
|||
Material.PurpleConcretePowder,
|
||||
Material.RedConcretePowder,
|
||||
Material.RedSand,
|
||||
Material.RootedDirt,
|
||||
Material.Sand,
|
||||
Material.Snow,
|
||||
Material.SnowBlock,
|
||||
Material.SoulSand,
|
||||
Material.SoulSoil,
|
||||
Material.WhiteConcretePowder,
|
||||
Material.YellowConcretePowder
|
||||
Material.YellowConcretePowder,
|
||||
};
|
||||
// Every axe can mine every block (speed difference).
|
||||
private static readonly List<Material> axe = new List<Material>()
|
||||
|
|
@ -341,6 +411,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.Barrel,
|
||||
Material.BeeNest,
|
||||
Material.Beehive,
|
||||
Material.BigDripleaf,
|
||||
Material.BirchButton,
|
||||
Material.BirchDoor,
|
||||
Material.BirchFence,
|
||||
|
|
@ -504,12 +575,13 @@ namespace MinecraftClient.Mapping
|
|||
Material.WhiteBanner,
|
||||
Material.WhiteWallBanner,
|
||||
Material.YellowBanner,
|
||||
Material.YellowWallBanner
|
||||
Material.YellowWallBanner,
|
||||
};
|
||||
// Every block a shear can mine.
|
||||
private static readonly List<Material> shears = new List<Material>()
|
||||
{
|
||||
Material.AcaciaLeaves,
|
||||
Material.AzaleaLeaves,
|
||||
Material.BirchLeaves,
|
||||
Material.BlackWool,
|
||||
Material.BlueWool,
|
||||
|
|
@ -517,6 +589,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.Cobweb,
|
||||
Material.CyanWool,
|
||||
Material.DarkOakLeaves,
|
||||
Material.FloweringAzaleaLeaves,
|
||||
Material.GrayWool,
|
||||
Material.GreenWool,
|
||||
Material.JungleLeaves,
|
||||
|
|
@ -539,6 +612,7 @@ namespace MinecraftClient.Mapping
|
|||
Material.Bamboo,
|
||||
Material.Cobweb,
|
||||
Material.InfestedChiseledStoneBricks,
|
||||
Material.InfestedDeepslate,
|
||||
Material.InfestedCobblestone,
|
||||
Material.InfestedCrackedStoneBricks,
|
||||
Material.InfestedMossyStoneBricks,
|
||||
|
|
@ -553,8 +627,10 @@ namespace MinecraftClient.Mapping
|
|||
Material.DarkOakLeaves,
|
||||
Material.HayBlock,
|
||||
Material.JungleLeaves,
|
||||
Material.MossBlock,
|
||||
Material.NetherWartBlock,
|
||||
Material.OakLeaves,
|
||||
Material.SculkSensor,
|
||||
Material.Shroomlight,
|
||||
Material.Sponge,
|
||||
Material.SpruceLeaves,
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ namespace MinecraftClient.Mapping
|
|||
case Material.JungleLeaves:
|
||||
case Material.AcaciaLeaves:
|
||||
case Material.DarkOakLeaves:
|
||||
case Material.AzaleaLeaves:
|
||||
case Material.FloweringAzaleaLeaves:
|
||||
case Material.Sponge:
|
||||
case Material.WetSponge:
|
||||
case Material.Glass:
|
||||
|
|
@ -202,6 +204,9 @@ namespace MinecraftClient.Mapping
|
|||
case Material.EnchantingTable:
|
||||
case Material.BrewingStand:
|
||||
case Material.Cauldron:
|
||||
case Material.WaterCauldron:
|
||||
case Material.LavaCauldron:
|
||||
case Material.PowderSnowCauldron:
|
||||
case Material.EndPortalFrame:
|
||||
case Material.EndStone:
|
||||
case Material.DragonEgg:
|
||||
|
|
@ -518,6 +523,119 @@ namespace MinecraftClient.Mapping
|
|||
case Material.Beehive:
|
||||
case Material.HoneyBlock:
|
||||
case Material.HoneycombBlock:
|
||||
case Material.Candle:
|
||||
case Material.WhiteCandle:
|
||||
case Material.OrangeCandle:
|
||||
case Material.MagentaCandle:
|
||||
case Material.LightBlueCandle:
|
||||
case Material.YellowCandle:
|
||||
case Material.LimeCandle:
|
||||
case Material.PinkCandle:
|
||||
case Material.GrayCandle:
|
||||
case Material.LightGrayCandle:
|
||||
case Material.CyanCandle:
|
||||
case Material.PurpleCandle:
|
||||
case Material.BlueCandle:
|
||||
case Material.BrownCandle:
|
||||
case Material.GreenCandle:
|
||||
case Material.RedCandle:
|
||||
case Material.BlackCandle:
|
||||
case Material.CandleCake:
|
||||
case Material.WhiteCandleCake:
|
||||
case Material.OrangeCandleCake:
|
||||
case Material.MagentaCandleCake:
|
||||
case Material.LightBlueCandleCake:
|
||||
case Material.YellowCandleCake:
|
||||
case Material.LimeCandleCake:
|
||||
case Material.PinkCandleCake:
|
||||
case Material.GrayCandleCake:
|
||||
case Material.LightGrayCandleCake:
|
||||
case Material.CyanCandleCake:
|
||||
case Material.PurpleCandleCake:
|
||||
case Material.BlueCandleCake:
|
||||
case Material.BrownCandleCake:
|
||||
case Material.GreenCandleCake:
|
||||
case Material.RedCandleCake:
|
||||
case Material.BlackCandleCake:
|
||||
case Material.AmethystBlock:
|
||||
case Material.BuddingAmethyst:
|
||||
case Material.AmethystCluster:
|
||||
case Material.LargeAmethystBud:
|
||||
case Material.MediumAmethystBud:
|
||||
case Material.SmallAmethystBud:
|
||||
case Material.Tuff:
|
||||
case Material.Calcite:
|
||||
case Material.TintedGlass:
|
||||
case Material.SculkSensor:
|
||||
case Material.OxidizedCopper:
|
||||
case Material.WeatheredCopper:
|
||||
case Material.ExposedCopper:
|
||||
case Material.CopperBlock:
|
||||
case Material.CopperOre:
|
||||
case Material.DeepslateCopperOre:
|
||||
case Material.OxidizedCutCopper:
|
||||
case Material.WeatheredCutCopper:
|
||||
case Material.ExposedCutCopper:
|
||||
case Material.CutCopper:
|
||||
case Material.OxidizedCutCopperStairs:
|
||||
case Material.WeatheredCutCopperStairs:
|
||||
case Material.ExposedCutCopperStairs:
|
||||
case Material.CutCopperStairs:
|
||||
case Material.OxidizedCutCopperSlab:
|
||||
case Material.WeatheredCutCopperSlab:
|
||||
case Material.ExposedCutCopperSlab:
|
||||
case Material.CutCopperSlab:
|
||||
case Material.WaxedCopperBlock:
|
||||
case Material.WaxedWeatheredCopper:
|
||||
case Material.WaxedExposedCopper:
|
||||
case Material.WaxedOxidizedCopper:
|
||||
case Material.WaxedOxidizedCutCopper:
|
||||
case Material.WaxedWeatheredCutCopper:
|
||||
case Material.WaxedExposedCutCopper:
|
||||
case Material.WaxedCutCopper:
|
||||
case Material.WaxedOxidizedCutCopperStairs:
|
||||
case Material.WaxedWeatheredCutCopperStairs:
|
||||
case Material.WaxedExposedCutCopperStairs:
|
||||
case Material.WaxedCutCopperStairs:
|
||||
case Material.WaxedOxidizedCutCopperSlab:
|
||||
case Material.WaxedWeatheredCutCopperSlab:
|
||||
case Material.WaxedExposedCutCopperSlab:
|
||||
case Material.WaxedCutCopperSlab:
|
||||
case Material.LightningRod:
|
||||
case Material.PointedDripstone:
|
||||
case Material.DripstoneBlock:
|
||||
case Material.Azalea:
|
||||
case Material.FloweringAzalea:
|
||||
case Material.MossCarpet:
|
||||
case Material.MossBlock:
|
||||
case Material.RootedDirt:
|
||||
case Material.Deepslate:
|
||||
case Material.CobbledDeepslate:
|
||||
case Material.CobbledDeepslateStairs:
|
||||
case Material.CobbledDeepslateSlab:
|
||||
case Material.CobbledDeepslateWall:
|
||||
case Material.PolishedDeepslate:
|
||||
case Material.PolishedDeepslateStairs:
|
||||
case Material.PolishedDeepslateSlab:
|
||||
case Material.PolishedDeepslateWall:
|
||||
case Material.DeepslateTiles:
|
||||
case Material.DeepslateTileStairs:
|
||||
case Material.DeepslateTileSlab:
|
||||
case Material.DeepslateTileWall:
|
||||
case Material.DeepslateBricks:
|
||||
case Material.DeepslateBrickStairs:
|
||||
case Material.DeepslateBrickSlab:
|
||||
case Material.DeepslateBrickWall:
|
||||
case Material.ChiseledDeepslate:
|
||||
case Material.CrackedDeepslateBricks:
|
||||
case Material.CrackedDeepslateTiles:
|
||||
case Material.InfestedDeepslate:
|
||||
case Material.SmoothBasalt:
|
||||
case Material.RawIronBlock:
|
||||
case Material.RawCopperBlock:
|
||||
case Material.RawGoldBlock:
|
||||
case Material.PottedAzaleaBush:
|
||||
case Material.PottedFloweringAzaleaBush:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -538,6 +656,7 @@ namespace MinecraftClient.Mapping
|
|||
case Material.Lava:
|
||||
case Material.MagmaBlock:
|
||||
case Material.Campfire:
|
||||
case Material.PowderSnow:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -140,6 +140,8 @@
|
|||
<Compile Include="Inventory\ItemPalettes\ItemPalette115.cs" />
|
||||
<Compile Include="Inventory\ItemPalettes\ItemPalette1161.cs" />
|
||||
<Compile Include="Inventory\ItemPalettes\ItemPalette1162.cs" />
|
||||
<Compile Include="Inventory\ItemPalettes\ItemPalette117.cs" />
|
||||
<Compile Include="Inventory\ItemPalettes\ItemPalette118.cs" />
|
||||
<Compile Include="Inventory\ItemPalettes\ItemPaletteGenerator.cs" />
|
||||
<Compile Include="Inventory\ItemType.cs" />
|
||||
<Compile Include="Inventory\ItemTypeExtensions.cs" />
|
||||
|
|
@ -152,6 +154,7 @@
|
|||
<Compile Include="Mapping\BlockPalettes\BlockPaletteGenerator.cs" />
|
||||
<Compile Include="Mapping\BlockPalettes\BlockPalette.cs" />
|
||||
<Compile Include="Mapping\BlockPalettes\Palette116.cs" />
|
||||
<Compile Include="Mapping\BlockPalettes\Palette117.cs" />
|
||||
<Compile Include="Mapping\CommandBlockFlags.cs" />
|
||||
<Compile Include="Mapping\CommandBlockMode.cs" />
|
||||
<Compile Include="Mapping\Entity.cs" />
|
||||
|
|
@ -162,6 +165,7 @@
|
|||
<Compile Include="Mapping\EntityPalettes\EntityPalette115.cs" />
|
||||
<Compile Include="Mapping\EntityPalettes\EntityPalette1161.cs" />
|
||||
<Compile Include="Mapping\EntityPalettes\EntityPalette1162.cs" />
|
||||
<Compile Include="Mapping\EntityPalettes\EntityPalette117.cs" />
|
||||
<Compile Include="Mapping\EntityPose.cs" />
|
||||
<Compile Include="Mapping\EntityType.cs" />
|
||||
<Compile Include="Mapping\EntityPalettes\EntityPaletteGenerator.cs" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -7,6 +8,9 @@ using System.Reflection;
|
|||
using System.Threading;
|
||||
using MinecraftClient.Protocol.Handlers.Forge;
|
||||
using MinecraftClient.Protocol.Session;
|
||||
using MinecraftClient.Mapping.EntityPalettes;
|
||||
using MinecraftClient.Mapping.BlockPalettes;
|
||||
using MinecraftClient.Inventory.ItemPalettes;
|
||||
using MinecraftClient.WinAPI;
|
||||
|
||||
namespace MinecraftClient
|
||||
|
|
@ -109,6 +113,80 @@ namespace MinecraftClient
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Contains("--generate"))
|
||||
{
|
||||
string dataGenerator = "";
|
||||
string dataPath = "";
|
||||
|
||||
foreach (string argument in args)
|
||||
{
|
||||
if (argument.StartsWith("--") && !argument.Contains("--generate"))
|
||||
{
|
||||
if (!argument.Contains("="))
|
||||
throw new ArgumentException(Translations.Get("error.setting.argument_syntax", argument));
|
||||
|
||||
string[] argParts = argument.Substring(2).Split('=');
|
||||
string argName = argParts[0].Trim();
|
||||
string argValue = argParts[1].Replace("\"", "").Trim();
|
||||
|
||||
if(argName == "data-path") {
|
||||
Console.WriteLine(dataPath);
|
||||
dataPath = argValue;
|
||||
}
|
||||
|
||||
if(argName == "data-generator") {
|
||||
dataGenerator = argValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(dataGenerator) || !(dataGenerator.ToLower().Equals("entity") || dataGenerator.ToLower().Equals("item") || dataGenerator.ToLower().Equals("block")))
|
||||
{
|
||||
Console.WriteLine(Translations.Get("error.generator.invalid"));
|
||||
Console.WriteLine(Translations.Get("error.usage") + " MinecraftClient.exe --data-generator=<entity|item|block>");
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(dataPath))
|
||||
{
|
||||
Console.WriteLine(Translations.Get("error.missing.argument", "--data-path"));
|
||||
Console.WriteLine(Translations.Get("error.usage") + " MinecraftClient.exe --generate-entity-pallete --data-path=\"<path to resources.json>\"");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!File.Exists(dataPath))
|
||||
{
|
||||
Console.WriteLine(Translations.Get("error.generator.path", dataPath));
|
||||
return;
|
||||
}
|
||||
|
||||
if(!dataPath.EndsWith(".json"))
|
||||
{
|
||||
Console.WriteLine(Translations.Get("error.generator.json", dataPath));
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine(Translations.Get("mcc.generator.generating", dataGenerator, dataPath));
|
||||
|
||||
switch (dataGenerator)
|
||||
{
|
||||
case "entity":
|
||||
EntityPaletteGenerator.GenerateEntityTypes(dataPath);
|
||||
break;
|
||||
|
||||
case "item":
|
||||
ItemPaletteGenerator.GenerateItemType(dataPath);
|
||||
break;
|
||||
|
||||
case "block":
|
||||
BlockPaletteGenerator.GenerateBlockPallete(dataPath);
|
||||
break;
|
||||
}
|
||||
|
||||
Console.WriteLine(Translations.Get("mcc.generator.done", dataGenerator, dataPath));
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Settings.LoadArguments(args);
|
||||
|
|
|
|||
|
|
@ -87,19 +87,19 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
this.packetPalette = new PacketTypeHandler(protocolVersion, forgeInfo != null).GetTypeHandler();
|
||||
this.log = handler.GetLogger();
|
||||
|
||||
if (handler.GetTerrainEnabled() && protocolversion > MC1165Version)
|
||||
if (handler.GetTerrainEnabled() && protocolversion > MC1181Version)
|
||||
{
|
||||
log.Error(Translations.Get("extra.terrainandmovement_disabled"));
|
||||
handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled() && (protocolversion < MC110Version || protocolversion > MC1165Version))
|
||||
if (handler.GetInventoryEnabled() && (protocolversion < MC110Version || protocolversion > MC1181Version))
|
||||
{
|
||||
log.Error(Translations.Get("extra.inventory_disabled"));
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolversion < MC110Version || protocolversion > MC1165Version))
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolversion < MC110Version || protocolversion > MC1181Version))
|
||||
{
|
||||
log.Error(Translations.Get("extra.entity_disabled"));
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
|
|
@ -108,9 +108,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// Block palette
|
||||
if (protocolversion >= MC113Version)
|
||||
{
|
||||
if (protocolVersion > MC1165Version && handler.GetTerrainEnabled())
|
||||
if (protocolVersion > MC1181Version && handler.GetTerrainEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.block"));
|
||||
if (protocolVersion >= MC116Version)
|
||||
if (protocolVersion == MC1181Version)
|
||||
Block.Palette = new Palette117();
|
||||
else if (protocolVersion >= MC116Version)
|
||||
Block.Palette = new Palette116();
|
||||
else if (protocolVersion >= MC115Version)
|
||||
Block.Palette = new Palette115();
|
||||
|
|
@ -123,9 +125,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// Entity palette
|
||||
if (protocolversion >= MC113Version)
|
||||
{
|
||||
if (protocolversion > MC1165Version && handler.GetEntityHandlingEnabled())
|
||||
if (protocolversion > MC1181Version && handler.GetEntityHandlingEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.entity"));
|
||||
if (protocolversion >= MC1162Version)
|
||||
if (protocolversion >= MC117Version)
|
||||
entityPalette = new EntityPalette117();
|
||||
else if (protocolversion >= MC1162Version)
|
||||
entityPalette = new EntityPalette1162();
|
||||
else if (protocolversion >= MC116Version)
|
||||
entityPalette = new EntityPalette1161();
|
||||
|
|
@ -138,11 +142,15 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
else entityPalette = new EntityPalette112();
|
||||
|
||||
// Item palette
|
||||
if (protocolversion >= MC116Version)
|
||||
if (protocolversion >= MC1162Version)
|
||||
{
|
||||
if (protocolversion > MC1165Version && handler.GetInventoryEnabled())
|
||||
if (protocolversion > MC1181Version && handler.GetInventoryEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.item"));
|
||||
if (protocolversion >= MC1162Version)
|
||||
if (protocolversion == MC1181Version)
|
||||
itemPalette = new ItemPalette118();
|
||||
else if (protocolversion >= MC117Version)
|
||||
itemPalette = new ItemPalette117();
|
||||
else if (protocolversion >= MC1162Version)
|
||||
itemPalette = new ItemPalette1162();
|
||||
else itemPalette = new ItemPalette1161();
|
||||
}
|
||||
|
|
@ -212,6 +220,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
packetData.Clear();
|
||||
int size = dataTypes.ReadNextVarIntRAW(socketWrapper); //Packet size
|
||||
byte[] rawpacket = socketWrapper.ReadDataRAW(size); //Packet contents
|
||||
|
||||
for (int i = 0; i < rawpacket.Length; i++)
|
||||
packetData.Enqueue(rawpacket[i]);
|
||||
|
||||
|
|
@ -824,7 +833,8 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (handler.GetInventoryEnabled())
|
||||
{
|
||||
byte windowId = dataTypes.ReadNextByte(packetData);
|
||||
short elements = dataTypes.ReadNextShort(packetData);
|
||||
int stateId = dataTypes.ReadNextVarInt(packetData);
|
||||
int elements = dataTypes.ReadNextVarInt(packetData);
|
||||
Dictionary<int, Item> inventorySlots = new Dictionary<int, Item>();
|
||||
for (short slotId = 0; slotId < elements; slotId++)
|
||||
{
|
||||
|
|
@ -839,6 +849,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (handler.GetInventoryEnabled())
|
||||
{
|
||||
byte windowID = dataTypes.ReadNextByte(packetData);
|
||||
int stateId = dataTypes.ReadNextVarInt(packetData);
|
||||
short slotID = dataTypes.ReadNextShort(packetData);
|
||||
Item item = dataTypes.ReadNextItemSlot(packetData, itemPalette);
|
||||
handler.OnSetSlot(windowID, slotID, item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue