├── TrueCraft
├── Logic
│ └── Discover.cs
├── World
│ ├── INoise.cs
│ ├── IDecoration.cs
│ ├── IChunkProvider.cs
│ ├── IChunkDecorator.cs
│ ├── IDimensionFactory.cs
│ └── IBiomeMap.cs
├── Inventory
│ ├── IChestWindow.cs
│ ├── IServerSlots.cs
│ └── SlotFactory.cs
├── Commands
│ ├── ICommandManager.cs
│ ├── ICommand.cs
│ ├── Command.cs
│ └── PingCommand.cs
├── Exceptions
│ └── PlayerDisconnectException.cs
├── IServerServiceLocator.cs
├── TerrainGen
│ ├── Noise
│ │ ├── InvertNoise.cs
│ │ └── ScaleNoise.cs
│ ├── EmptyGenerator.cs
│ ├── Biomes
│ │ ├── PlainsBiome.cs
│ │ ├── ForestBiome.cs
│ │ ├── SeasonalForestBiome.cs
│ │ ├── TaigaBiome.cs
│ │ ├── ShrublandBiome.cs
│ │ ├── SwamplandBiome.cs
│ │ ├── SavannaBiome.cs
│ │ └── RainforestBiome.cs
│ └── Generator.cs
├── Rules
│ └── OverworldSpawnRules.cs
├── AccessConfiguration.cs
└── Properties
│ └── AssemblyInfo.cs
├── TrueCraft.Client
├── Content
│ ├── pack.txt
│ ├── default-pack.txt
│ ├── gui.png
│ ├── moon.png
│ ├── pack.png
│ ├── sun.png
│ ├── icons.png
│ ├── items.png
│ ├── crafting.png
│ ├── furnace.png
│ ├── inventory.png
│ ├── terrain.png
│ ├── generic_27.png
│ ├── generic_54.png
│ ├── default-pack.png
│ ├── Audio
│ │ ├── default_hurt.wav
│ │ ├── default_dig_choppy.ogg
│ │ ├── default_dig_cracky.ogg
│ │ ├── default_dug_node.1.ogg
│ │ ├── default_dug_node.2.ogg
│ │ ├── default_cool_lava.1.ogg
│ │ ├── default_cool_lava.2.ogg
│ │ ├── default_cool_lava.3.ogg
│ │ ├── default_dig_crumbly.ogg
│ │ ├── default_place_node.1.ogg
│ │ ├── default_place_node.2.ogg
│ │ ├── default_place_node.3.ogg
│ │ ├── default_break_glass.1.ogg
│ │ ├── default_break_glass.2.ogg
│ │ ├── default_break_glass.3.ogg
│ │ ├── default_dirt_footstep.1.ogg
│ │ ├── default_dirt_footstep.2.ogg
│ │ ├── default_glass_footstep.ogg
│ │ ├── default_hard_footstep.1.ogg
│ │ ├── default_hard_footstep.2.ogg
│ │ ├── default_hard_footstep.3.ogg
│ │ ├── default_sand_footstep.1.ogg
│ │ ├── default_sand_footstep.2.ogg
│ │ ├── default_snow_footstep.1.ogg
│ │ ├── default_snow_footstep.2.ogg
│ │ ├── default_snow_footstep.3.ogg
│ │ ├── default_wood_footstep.1.ogg
│ │ ├── default_wood_footstep.2.ogg
│ │ ├── default_dig_dig_immediate.ogg
│ │ ├── default_grass_footstep.1.ogg
│ │ ├── default_grass_footstep.2.ogg
│ │ ├── default_grass_footstep.3.ogg
│ │ ├── default_gravel_footstep.1.ogg
│ │ ├── default_gravel_footstep.2.ogg
│ │ ├── default_gravel_footstep.3.ogg
│ │ ├── default_gravel_footstep.4.ogg
│ │ ├── default_place_node_hard.1.ogg
│ │ ├── default_place_node_hard.2.ogg
│ │ ├── default_dig_oddly_breakable_by_hand.ogg
│ │ └── credits.txt
│ └── Fonts
│ │ ├── DejaVu_Bold_0.png
│ │ ├── Pixel_Bold_0.png
│ │ ├── DejaVu_Italic_0.png
│ │ ├── Pixel_Italic_0.png
│ │ ├── Pixel_Italic_1.png
│ │ ├── Pixel_Regular_0.png
│ │ ├── DejaVu_Regular_0.png
│ │ └── pixel-license.txt
├── Input
│ ├── GamePadEventArgs.cs
│ ├── GamePadButtonEventArgs.cs
│ ├── KeyboardEventArgs.cs
│ ├── MouseButton.cs
│ ├── MouseEventArgs.cs
│ └── KeyboardKeyEventArgs.cs
├── Modules
│ ├── IHeldItem.cs
│ ├── IGameplayModule.cs
│ ├── IGraphicalModule.cs
│ └── IInputModule.cs
├── Events
│ ├── ChatMessageEventArgs.cs
│ └── ChunkEventArgs.cs
├── Inventory
│ ├── IClickHandler.cs
│ ├── IFurnaceProgress.cs
│ └── SlotFactory.cs
├── Modelling
│ ├── Blocks
│ │ ├── VisibleFaces.cs
│ │ ├── CobwebModeller.cs
│ │ └── SugarcaneModeller.cs
│ └── ModellerEventArgs.cs
├── World
│ └── IDimensionClient.cs
├── Handlers
│ ├── ActionList.cs
│ └── ActionConfirmation.cs
├── Rendering
│ └── FontStyle.cs
└── Properties
│ └── AssemblyInfo.cs
├── TrueCraft.Launcher
├── Content
│ ├── default-pack.txt
│ ├── Xwt.WPF.dll
│ ├── default-pack.png
│ ├── truecraft-logo.png
│ ├── truecraft_logo.png
│ └── default-server-icon.png
├── truecraft
├── Singleplayer
│ └── WorldInfo.cs
└── Properties
│ └── AssemblyInfo.cs
├── lib
├── osx-x64
│ ├── SDL2.dll
│ ├── libopenal32.dll
│ ├── README.sources.txt
│ └── SDL2.dll.LICENSE
└── Ionic.Zip.Reduced.dll
├── Test
├── TrueCraft.Test
│ ├── Files
│ │ ├── manifest.nbt
│ │ ├── TestChunk.nbt
│ │ └── region
│ │ │ ├── r.-1.0.mcr
│ │ │ ├── r.0.-1.mcr
│ │ │ ├── r.0.0.mcr
│ │ │ └── r.-1.-1.mcr
│ └── World
│ │ └── RegionTest.cs
└── TrueCraft.Core.Test
│ └── Utility.cs
├── TrueCraft.Core
├── Assets
│ └── TrueCraft.xml.gz
├── Logic
│ ├── IRegisterRecipe.cs
│ ├── ICraftingRepository.cs
│ ├── Items
│ │ ├── AxeItem.cs
│ │ ├── SwordItem.cs
│ │ ├── PickaxeItem.cs
│ │ ├── ShovelItem.cs
│ │ ├── IFoodItem.cs
│ │ ├── IDurableItem.cs
│ │ ├── ArrowItem.cs
│ │ ├── MusicDiscItem.cs
│ │ ├── RedstoneRepeaterItem.cs
│ │ ├── BowItem.cs
│ │ ├── BoatItem.cs
│ │ ├── ArmorKind.cs
│ │ ├── ClockItem.cs
│ │ ├── MapItem.cs
│ │ ├── SnowballItem.cs
│ │ ├── ClayItem.cs
│ │ ├── CompassItem.cs
│ │ ├── PaintingItem.cs
│ │ ├── SaddleItem.cs
│ │ ├── StringItem.cs
│ │ ├── EggItem.cs
│ │ ├── StickItem.cs
│ │ ├── ShearsItem.cs
│ │ ├── CoalItem.cs
│ │ ├── FishingRodItem.cs
│ │ ├── IArmorItem.cs
│ │ ├── IToolItem.cs
│ │ ├── MinecartItem.cs
│ │ ├── HoeItem.cs
│ │ ├── SeedsItem.cs
│ │ ├── SignItem.cs
│ │ ├── CakeItem.cs
│ │ └── RedstoneItem.cs
│ ├── ICraftingRecipe.cs
│ ├── SoundEffectClass.cs
│ ├── IRegisterItemProvider.cs
│ ├── IBurnableItem.cs
│ ├── ISmeltableItem.cs
│ ├── BlockDescriptor.cs
│ ├── IRegisterBlockProvider.cs
│ ├── IItemRepository.cs
│ ├── IBlockRepository.cs
│ ├── ToolType.cs
│ ├── Blocks
│ │ ├── ButtonBlock.cs
│ │ ├── BedrockBlock.cs
│ │ ├── BricksBlock.cs
│ │ ├── MossStoneBlock.cs
│ │ ├── NetherrackBlock.cs
│ │ ├── SandstoneBlock.cs
│ │ ├── CobblestoneBlock.cs
│ │ ├── JukeboxBlock.cs
│ │ ├── NoteBlockBlock.cs
│ │ ├── TNTBlock.cs
│ │ ├── DirtBlock.cs
│ │ ├── SpongeBlock.cs
│ │ ├── SoulSandBlock.cs
│ │ ├── MonsterSpawnerBlock.cs
│ │ ├── LeverBlock.cs
│ │ ├── PortalBlock.cs
│ │ ├── WoolBlock.cs
│ │ ├── DispenserBlock.cs
│ │ ├── BookshelfBlock.cs
│ │ ├── LockedChestBlock.cs
│ │ ├── WoodenPlanksBlock.cs
│ │ └── ObsidianBlock.cs
│ ├── IDiscover.cs
│ ├── OreTypes.cs
│ ├── Metadata
│ │ ├── MetadataByte.cs
│ │ ├── MetadataInt.cs
│ │ ├── MetadataFloat.cs
│ │ └── MetadataShort.cs
│ ├── BlockFace.cs
│ ├── PlantSpecies.cs
│ └── ArmorMaterial.cs
├── Strings.cs
├── Logging
│ ├── ILogProvider.cs
│ ├── FileLogProvider.cs
│ ├── LogCategory.cs
│ └── PacketLogging.cs
├── AI
│ ├── IMobState.cs
│ ├── ISpawnRule.cs
│ ├── IdleState.cs
│ └── PriorityQueue.cs
├── Networking
│ ├── IPacket.cs
│ ├── IPacketSegmentProcessor.cs
│ ├── Packets
│ │ ├── UselessEntityPacket.cs
│ │ ├── DestroyEntityPacket.cs
│ │ ├── PlayerGroundedPacket.cs
│ │ ├── KeepAlivePacket.cs
│ │ ├── HandshakePacket.cs
│ │ ├── UpdateHealthPacket.cs
│ │ ├── UpdateStatisticPacket.cs
│ │ ├── DisconnectPacket.cs
│ │ ├── AttachEntityPacket.cs
│ │ ├── CloseWindowPacket.cs
│ │ ├── RespawnPacket.cs
│ │ ├── PlayerActionPacket.cs
│ │ ├── EntityLookPacket.cs
│ │ ├── EntityRelativeMovePacket.cs
│ │ ├── PlayerLookPacket.cs
│ │ ├── TimeUpdatePacket.cs
│ │ ├── EnvironmentStatePacket.cs
│ │ ├── UseEntityPacket.cs
│ │ ├── EntityMetadataPacket.cs
│ │ ├── MapDataPacket.cs
│ │ ├── ChangeHeldItemPacket.cs
│ │ ├── ChatMessagePacket.cs
│ │ ├── LightningPacket.cs
│ │ ├── HandshakeResponsePacket.cs
│ │ ├── CollectItemPacket.cs
│ │ ├── SpawnPositionPacket.cs
│ │ ├── EntityStatusPacket.cs
│ │ ├── EntityLookAndRelativeMovePacket.cs
│ │ ├── ChunkPreamblePacket.cs
│ │ ├── UseBedPacket.cs
│ │ ├── EntityVelocityPacket.cs
│ │ ├── AnimationPacket.cs
│ │ └── LoginRequestPacket.cs
│ └── IPacketReader.cs
├── Entities
│ ├── EntityFlags.cs
│ ├── EntityEventArgs.cs
│ ├── IMobEntity.cs
│ ├── PigEntity.cs
│ ├── CowEntity.cs
│ ├── HenEntity.cs
│ ├── SquidEntity.cs
│ ├── SheepEntity.cs
│ ├── WolfEntity.cs
│ ├── CreeperEntity.cs
│ ├── ZombieEntity.cs
│ ├── SkeletonEntity.cs
│ ├── SpiderEntity.cs
│ ├── ZombiePigmanEntity.cs
│ ├── ObjectEntity.cs
│ ├── GhastEntity.cs
│ ├── GiantZombieEntity.cs
│ └── FallingBlockEntity.cs
├── Server
│ ├── IFurnaceSlots.cs
│ ├── WindowIDs.cs
│ ├── IEventSubject.cs
│ ├── PlayerJoinedQuitEventArgs.cs
│ ├── GameMode.cs
│ ├── ServerOnly.cs
│ ├── Difficulty.cs
│ ├── ChatMessageEventArgs.cs
│ ├── IAccessConfiguration.cs
│ ├── IEntityManager.cs
│ └── IEventScheduler.cs
├── Lighting
│ └── ILighter.cs
├── World
│ ├── ChunkLoadedEventArgs.cs
│ ├── IBiomeRepository.cs
│ ├── BlockChangeEventArgs.cs
│ ├── IBiomeProvider.cs
│ ├── DimensionID.cs
│ └── WorldConstants.cs
├── TrueCraftUser.cs
├── Windows
│ └── WindowType.cs
├── Inventory
│ ├── WindowClosedEventArgs.cs
│ ├── ICraftingBenchWindow.cs
│ ├── IChestWindow.cs
│ ├── ISlotFactory.cs
│ ├── IFurnaceWindow.cs
│ ├── IInventoryWindow.cs
│ ├── ISlot.cs
│ └── SlotFactory.cs
├── IServiceLocator.cs
└── MissingProviderException.cs
├── .gitmodules
├── References
└── References.txt
├── .gitignore
├── scripts
├── findicon
└── templates
│ └── Block.cs
├── .editorconfig
├── .travis.yml
├── Directory.Build.props
├── TrueCraft.Profiling
├── TrueCraft.Profiling.csproj
└── Properties
│ └── AssemblyInfo.cs
└── LICENSE
/TrueCraft/Logic/Discover.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/pack.txt:
--------------------------------------------------------------------------------
1 | Vanilla TrueCraft!
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/default-pack.txt:
--------------------------------------------------------------------------------
1 | No description available.
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/default-pack.txt:
--------------------------------------------------------------------------------
1 | No description available.
--------------------------------------------------------------------------------
/TrueCraft.Launcher/truecraft:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | mono ./TrueCraft.Launcher.exe
3 |
--------------------------------------------------------------------------------
/lib/osx-x64/SDL2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/lib/osx-x64/SDL2.dll
--------------------------------------------------------------------------------
/lib/Ionic.Zip.Reduced.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/lib/Ionic.Zip.Reduced.dll
--------------------------------------------------------------------------------
/lib/osx-x64/libopenal32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/lib/osx-x64/libopenal32.dll
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/gui.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/moon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/moon.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/pack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/pack.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/sun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/sun.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/icons.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/items.png
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/manifest.nbt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/manifest.nbt
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/crafting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/crafting.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/furnace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/furnace.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/inventory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/inventory.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/terrain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/terrain.png
--------------------------------------------------------------------------------
/TrueCraft.Core/Assets/TrueCraft.xml.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Core/Assets/TrueCraft.xml.gz
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/Xwt.WPF.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Launcher/Content/Xwt.WPF.dll
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/TestChunk.nbt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/TestChunk.nbt
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/generic_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/generic_27.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/generic_54.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/generic_54.png
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "externals/fNbt"]
2 | path = externals/fNbt
3 | url = https://github.com/mrj001/fNbt.git
4 | branch = master
5 |
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/region/r.-1.0.mcr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/region/r.-1.0.mcr
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/region/r.0.-1.mcr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/region/r.0.-1.mcr
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/region/r.0.0.mcr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/region/r.0.0.mcr
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/default-pack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/default-pack.png
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/default-pack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Launcher/Content/default-pack.png
--------------------------------------------------------------------------------
/Test/TrueCraft.Test/Files/region/r.-1.-1.mcr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/Test/TrueCraft.Test/Files/region/r.-1.-1.mcr
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/truecraft-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Launcher/Content/truecraft-logo.png
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/truecraft_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Launcher/Content/truecraft_logo.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_hurt.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_hurt.wav
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/DejaVu_Bold_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/DejaVu_Bold_0.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/Pixel_Bold_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/Pixel_Bold_0.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/DejaVu_Italic_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/DejaVu_Italic_0.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/Pixel_Italic_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/Pixel_Italic_0.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/Pixel_Italic_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/Pixel_Italic_1.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/Pixel_Regular_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/Pixel_Regular_0.png
--------------------------------------------------------------------------------
/TrueCraft.Launcher/Content/default-server-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Launcher/Content/default-server-icon.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dig_choppy.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dig_choppy.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dig_cracky.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dig_cracky.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dug_node.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dug_node.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dug_node.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dug_node.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/DejaVu_Regular_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Fonts/DejaVu_Regular_0.png
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_cool_lava.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_cool_lava.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_cool_lava.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_cool_lava.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_cool_lava.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_cool_lava.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dig_crumbly.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dig_crumbly.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_place_node.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_place_node.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_place_node.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_place_node.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_place_node.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_place_node.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_break_glass.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_break_glass.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_break_glass.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_break_glass.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_break_glass.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_break_glass.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dirt_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dirt_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dirt_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dirt_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_glass_footstep.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_glass_footstep.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_hard_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_hard_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_hard_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_hard_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_hard_footstep.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_hard_footstep.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_sand_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_sand_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_sand_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_sand_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_snow_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_snow_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_snow_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_snow_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_snow_footstep.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_snow_footstep.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_wood_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_wood_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_wood_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_wood_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dig_dig_immediate.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dig_dig_immediate.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_grass_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_grass_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_grass_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_grass_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_grass_footstep.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_grass_footstep.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_gravel_footstep.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_gravel_footstep.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_gravel_footstep.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_gravel_footstep.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_gravel_footstep.3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_gravel_footstep.3.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_gravel_footstep.4.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_gravel_footstep.4.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_place_node_hard.1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_place_node_hard.1.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_place_node_hard.2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_place_node_hard.2.ogg
--------------------------------------------------------------------------------
/TrueCraft.Client/Input/GamePadEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Input
4 | {
5 | public class GamePadEventArgs : EventArgs
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/default_dig_oddly_breakable_by_hand.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrj001/TrueCraft/HEAD/TrueCraft.Client/Content/Audio/default_dig_oddly_breakable_by_hand.ogg
--------------------------------------------------------------------------------
/References/References.txt:
--------------------------------------------------------------------------------
1 | A. An Efficient and Robust Ray-Box Intersection Algorithm, Amy Williams, et al, University of Utah
2 | https://web.archive.org/web/20130420103121/http://www.cs.utah.edu/~awilliam/box/
3 |
4 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IRegisterRecipe.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | public interface IRegisterRecipe
6 | {
7 | void RegisterRecipe(ICraftingRecipe recipe);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/osx-x64/README.sources.txt:
--------------------------------------------------------------------------------
1 | Source code for various dependencies can be found in the following locations:
2 |
3 | OpenAL-Soft:
4 | https://github.com/kcat/openal-soft
5 |
6 | SDL2:
7 | https://github.com/libsdl-org/SDL.git
8 |
9 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modules/IHeldItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core;
3 |
4 | namespace TrueCraft.Client.Modules
5 | {
6 | public interface IHeldItem
7 | {
8 | ItemStack HeldItem { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Strings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace TrueCraft.Core
3 | {
4 | public static class Strings
5 | {
6 | public const string SERVER_CODE_ON_CLIENT = "Server-side only code detected executing on client";
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modules/IGameplayModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework;
3 |
4 | namespace TrueCraft.Client.Modules
5 | {
6 | public interface IGameplayModule
7 | {
8 | void Update(GameTime gameTime);
9 | }
10 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logging/ILogProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logging
4 | {
5 | public interface ILogProvider
6 | {
7 | void Log(LogCategory category, string text, params object[] parameters);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Fonts/pixel-license.txt:
--------------------------------------------------------------------------------
1 | The FontStruction “Pixel UniCode”
2 | (http://fontstruct.com/fontstructions/show/908795) by “ivancr72” is licensed
3 | under a Creative Commons Attribution license
4 | (http://creativecommons.org/licenses/by/3.0/).
5 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modules/IGraphicalModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework;
3 |
4 | namespace TrueCraft.Client.Modules
5 | {
6 | public interface IGraphicalModule : IGameplayModule
7 | {
8 | void Draw(GameTime gameTime);
9 | }
10 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/ICraftingRepository.cs:
--------------------------------------------------------------------------------
1 | using TrueCraft.Core.Inventory;
2 |
3 |
4 | namespace TrueCraft.Core.Logic
5 | {
6 | public interface ICraftingRepository
7 | {
8 | ICraftingRecipe? GetRecipe(CraftingPattern craftingArea);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/AxeItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class AxeItem : ToolItem
7 | {
8 | public AxeItem(XmlNode node) : base(node)
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/SwordItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class SwordItem : ToolItem
7 | {
8 | public SwordItem(XmlNode node) : base(node)
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/Input/GamePadButtonEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework.Input;
3 |
4 | namespace TrueCraft.Client.Input
5 | {
6 | public class GamePadButtonEventArgs : GamePadEventArgs
7 | {
8 | public Buttons Button { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/Input/KeyboardEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Input
4 | {
5 | ///
6 | /// Provides the event data for keyboard events.
7 | ///
8 | public class KeyboardEventArgs : EventArgs
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/TrueCraft.Core/AI/IMobState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.Entities;
4 |
5 | namespace TrueCraft.Core.AI
6 | {
7 | public interface IMobState
8 | {
9 | void Update(IMobEntity entity, IEntityManager manager);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/PickaxeItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class PickaxeItem : ToolItem
7 | {
8 | public PickaxeItem(XmlNode node) : base(node)
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ShovelItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class ShovelItem : ToolItem
7 | {
8 | public ShovelItem(XmlNode node) : base(node)
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | obj/
3 | *.user
4 | *.userprefs
5 | *.suo
6 | *.pidb
7 | *.swp
8 | _ReSharper*/
9 | TestResults/
10 | *.mdf
11 | *.psess
12 | *.vsp
13 | packages/
14 | .vs/
15 |
16 | config.yaml
17 |
18 | packets.log
19 |
20 | world/manifest.nbt
21 | TestResult.xml
22 |
23 | References/*.pdf
24 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Content/Audio/credits.txt:
--------------------------------------------------------------------------------
1 | The footstep and mining/placement sound effects were sourced from Minetest under CC-BY-SA: https://github.com/minetest/minetest_game
2 | default_hurt.wav is the same sound effect Minecraft uses, which is CC-BY-SA from http://freesound.org/people/thecheeseman/sounds/44429/
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/IFoodItem.cs:
--------------------------------------------------------------------------------
1 | namespace TrueCraft.Core.Logic.Items
2 | {
3 | public interface IFoodItem : IItemProvider
4 | {
5 | ///
6 | /// The amount of health this food restores.
7 | ///
8 | float Restores { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Networking/IPacket.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Networking
4 | {
5 | public interface IPacket
6 | {
7 | byte ID { get; }
8 | void ReadPacket(IMinecraftStream stream);
9 | void WritePacket(IMinecraftStream stream);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/EntityFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Entities
4 | {
5 | [Flags]
6 | public enum EntityFlags
7 | {
8 | Fire = 0x01,
9 | Crouched = 0x02,
10 | Riding = 0x04,
11 | Sprinting = 0x08,
12 | Eating = 0x10,
13 | }
14 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/ICraftingRecipe.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core;
3 |
4 | namespace TrueCraft.Core.Logic
5 | {
6 | public interface ICraftingRecipe : IEquatable
7 | {
8 | CraftingPattern Pattern { get; }
9 |
10 | ItemStack Output { get; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/IDurableItem.cs:
--------------------------------------------------------------------------------
1 | namespace TrueCraft.Core.Logic.Items
2 | {
3 | public interface IDurableItem : IItemProvider
4 | {
5 | ///
6 | /// Gets the Durability of the Durable Item when newly crafted.
7 | ///
8 | short Durability { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/TrueCraft/World/INoise.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace TrueCraft.World
7 | {
8 | public interface INoise
9 | {
10 | double Value2D(double x, double y);
11 | double Value3D(double x, double y, double z);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/SoundEffectClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | public enum SoundEffectClass
6 | {
7 | None,
8 | Cloth,
9 | Grass,
10 | Gravel,
11 | Sand,
12 | Snow,
13 | Stone,
14 | Wood,
15 | Glass
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/IFurnaceSlots.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Inventory;
3 |
4 | namespace TrueCraft.Core.Server
5 | {
6 | public interface IFurnaceSlots
7 | {
8 | IServerSlot IngredientSlot { get; }
9 | IServerSlot FuelSlot { get; }
10 | IServerSlot OutputSlot { get; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Lighting/ILighter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Lighting
4 | {
5 | public interface ILighter
6 | {
7 | ///
8 | ///
9 | ///
10 | ///
11 | void DoLightingOperation(LightingOperation operation);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/EntityEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Entities
4 | {
5 | public class EntityEventArgs : EventArgs
6 | {
7 | public IEntity Entity { get; set; }
8 |
9 | public EntityEventArgs(IEntity entity)
10 | {
11 | Entity = entity;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ArrowItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class ArrowItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x106;
9 |
10 | public ArrowItem(XmlNode node) : base(node)
11 | {
12 |
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/World/ChunkLoadedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.World
4 | {
5 | public class ChunkLoadedEventArgs : EventArgs
6 | {
7 | public IChunk Chunk { get; }
8 |
9 | public ChunkLoadedEventArgs(IChunk chunk)
10 | {
11 | Chunk = chunk;
12 | }
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/MusicDiscItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class MusicDiscItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x8D1;
9 |
10 | public MusicDiscItem(XmlNode node) : base(node)
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Networking/IPacketSegmentProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics.CodeAnalysis;
3 |
4 | namespace TrueCraft.Core.Networking
5 | {
6 | public interface IPacketSegmentProcessor
7 | {
8 | bool ProcessNextSegment(byte[] nextSegment, int offset, int len, [MaybeNullWhen(false)] out IPacket packet);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Events/ChatMessageEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Events
4 | {
5 | public class ChatMessageEventArgs : EventArgs
6 | {
7 | public string Message { get; set; }
8 |
9 | public ChatMessageEventArgs(string message)
10 | {
11 | Message = message;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/Events/ChunkEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.World;
3 |
4 | namespace TrueCraft.Client.Events
5 | {
6 | public class ChunkEventArgs : EventArgs
7 | {
8 | public IChunk Chunk { get; }
9 |
10 | public ChunkEventArgs(IChunk chunk)
11 | {
12 | Chunk = chunk;
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/Inventory/IClickHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Client.Handlers;
3 | using TrueCraft.Client.Modules;
4 |
5 | namespace TrueCraft.Client.Inventory
6 | {
7 | public interface IClickHandler
8 | {
9 | ActionConfirmation? HandleClick(int slotIndex, bool rightClick, bool shiftClick, IHeldItem heldItem);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IRegisterItemProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | public interface IRegisterItemProvider
6 | {
7 | ///
8 | ///
9 | ///
10 | ///
11 | void RegisterItemProvider(IItemProvider itemProvider);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/scripts/findicon:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | icon=$(cat icons.json | jq ".[] | select(.id==$(printf "%d" $1)) | .icon")
3 | x=$(printf "%s" $icon | jq ".x")
4 | y=$(printf "%s" $icon | jq ".y")
5 |
6 | cat < GetIconTexture(byte metadata)
9 | {
10 | return new Tuple($x, $y);
11 | }
12 | EOF
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/RedstoneRepeaterItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class RedstoneRepeaterItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x164;
9 |
10 | public RedstoneRepeaterItem(XmlNode node) : base(node)
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/BowItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class BowItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x105;
9 |
10 | public BowItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: add behaviour (Server-side)
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/WindowIDs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Server
4 | {
5 | // TODO: refactor to server-side only
6 | public static class WindowIDs
7 | {
8 | private static sbyte _curID = 0;
9 |
10 | public static sbyte GetWindowID()
11 | {
12 | _curID++;
13 | return _curID;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/BoatItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class BoatItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x14D;
9 |
10 | public BoatItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: Add Behaviour (server-side)
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ArmorKind.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace TrueCraft.Core.Logic.Items
3 | {
4 | ///
5 | /// Defines the different kinds of Armor - Helmet, Chestplate, Leggings and Boots.
6 | ///
7 | public enum ArmorKind
8 | {
9 | Helmet = 0,
10 | Chestplate = 1,
11 | Leggings = 2,
12 | Boots = 3
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/IEventSubject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core
4 | {
5 | ///
6 | /// The subject of an event. When it's disposed, it raises an event and the associated
7 | /// scheduled events are discarded.
8 | ///
9 | public interface IEventSubject : IDisposable
10 | {
11 | event EventHandler Disposed;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/TrueCraft/World/IDecoration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.World;
3 |
4 | namespace TrueCraft.World
5 | {
6 | // TODO: this interface should be moved to server-side only
7 | public interface IDecoration
8 | {
9 | bool ValidLocation(LocalVoxelCoordinates location);
10 | bool GenerateAt(int seed, IChunk chunk, LocalVoxelCoordinates location);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ClockItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class ClockItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x15B;
9 |
10 | public ClockItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: Requires custom client-side drawing.
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/MapItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class MapItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x166;
9 |
10 | public MapItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: This will need (server-side) behaviour
15 | }
16 | }
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root=true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | indent_style = space
7 | charset = utf-8
8 | trim-trailing-whitespace = true
9 |
10 | [*.cs]
11 | indent_size = 4
12 | tab_width = 4
13 | csharp_new_line_before_open_brace = all
14 | csharp_indent_block_contents = true
15 | csharp_indent_braces = false
16 |
17 | [*.xml]
18 | indent_size = 2
19 | tab_width = 2
20 |
21 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/SnowballItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class SnowballItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x14C;
9 |
10 | public SnowballItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: Has behavior (can be thrown)
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ClayItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class ClayItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x151;
9 |
10 | public ClayItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: Check if this should be smeltable into a brick.
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/CompassItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class CompassItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x159;
9 |
10 | public CompassItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: requires custom client-side drawning.
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/PaintingItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class PaintingItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x141;
9 |
10 | public PaintingItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: will require (server-side) behaviour
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/SaddleItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class SaddleItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x149;
9 |
10 | public SaddleItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: requires (server-side) ItemUsedOnEntity.
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/StringItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class StringItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x11F;
9 |
10 | public StringItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: check if string can be placed in Beta 1.7.3
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/PlayerJoinedQuitEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Networking;
3 |
4 | namespace TrueCraft.Core.Server
5 | {
6 | public class PlayerJoinedQuitEventArgs : EventArgs
7 | {
8 | public IRemoteClient Client { get; set; }
9 |
10 | public PlayerJoinedQuitEventArgs(IRemoteClient client)
11 | {
12 | Client = client;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modelling/Blocks/VisibleFaces.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Modelling.Blocks
4 | {
5 | [Flags]
6 | public enum VisibleFaces
7 | {
8 | None = 0,
9 | North = 1,
10 | South = 2,
11 | East = 4,
12 | West = 8,
13 | Top = 16,
14 | Bottom = 32,
15 | All = North | South | East | West | Top | Bottom
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/EggItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class EggItem : ItemProvider
7 | {
8 | public static readonly short ItemID = 0x158;
9 |
10 | public EggItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | // TODO: (server-side) Eggs have behaviour (be thrown, possible hatch...)
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IBurnableItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | ///
6 | /// Describes an item that can be burnt as fuel in a furnace.
7 | ///
8 | public interface IBurnableItem
9 | {
10 | ///
11 | /// The duration of time this item can act as fuel.
12 | ///
13 | TimeSpan BurnTime { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft/Inventory/IChestWindow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.World;
4 |
5 | namespace TrueCraft.Inventory
6 | {
7 | public interface IChestWindow : TrueCraft.Core.Inventory.IChestWindow
8 | {
9 | IDimension Dimension { get; }
10 |
11 | GlobalVoxelCoordinates Location { get; }
12 |
13 | GlobalVoxelCoordinates? OtherHalf { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/StickItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class StickItem : ItemProvider, IBurnableItem
7 | {
8 | public static readonly short ItemID = 0x118;
9 |
10 | public StickItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | public TimeSpan BurnTime { get { return TimeSpan.FromSeconds(5); } }
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft.Client/World/IDimensionClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.World;
3 |
4 | namespace TrueCraft.Client.World
5 | {
6 | public interface IDimensionClient : IDimension
7 | {
8 | ///
9 | /// Adds the given Chunk to the client's current Dimension.
10 | ///
11 | /// The Chunk to add.
12 | void AddChunk(IChunk chunk);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/ISmeltableItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | ///
6 | /// Describes an item that can be smelted in a furnace to produce a new item.
7 | ///
8 | public interface ISmeltableItem
9 | {
10 | ///
11 | /// The item this becomes when smelted.
12 | ///
13 | ItemStack SmeltingOutput { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/World/IBiomeRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace TrueCraft.Core.World
7 | {
8 | public interface IBiomeRepository
9 | {
10 | IBiomeProvider GetBiome(Biome id);
11 | IBiomeProvider GetBiome(double temperature, double rainfall, bool spawn);
12 | void RegisterBiomeProvider(IBiomeProvider provider);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/TrueCraft/Commands/ICommandManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using TrueCraft.Core.Networking;
4 |
5 | namespace TrueCraft.Commands
6 | {
7 | public interface ICommandManager : IList
8 | {
9 | ICommand? FindByName(string name);
10 |
11 | ICommand? FindByAlias(string alias);
12 |
13 | void HandleCommand(IRemoteClient Client, string Alias, string[] Arguments);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/ShearsItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class ShearsItem : ItemProvider, IDurableItem
7 | {
8 | public static readonly short ItemID = 0x167;
9 |
10 | public ShearsItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | ///
15 | public short Durability { get { return 239; } }
16 | }
17 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/BlockDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.World;
3 |
4 | namespace TrueCraft.Core.Logic
5 | {
6 | public struct BlockDescriptor
7 | {
8 | public byte ID;
9 | public byte Metadata;
10 | public byte BlockLight;
11 | public byte SkyLight;
12 | // Optional
13 | public GlobalVoxelCoordinates Coordinates;
14 | // Optional
15 | public IChunk Chunk;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/TrueCraft.Core/TrueCraftUser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core
4 | {
5 | public class TrueCraftUser
6 | {
7 | public static string AuthServer = "https://truecraft.io";
8 |
9 | public TrueCraftUser()
10 | {
11 | Username = string.Empty;
12 | SessionId = string.Empty;
13 | }
14 |
15 | public string Username { get; set; }
16 | public string SessionId { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/TrueCraft/World/IChunkProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.World;
3 |
4 | namespace TrueCraft.World
5 | {
6 | ///
7 | /// Provides new chunks to worlds. Generally speaking this is a terrain generator.
8 | ///
9 | public interface IChunkProvider
10 | {
11 | IChunk GenerateChunk(GlobalChunkCoordinates coordinates);
12 |
13 | GlobalVoxelCoordinates GetSpawn(IDimension dimension);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/IMobEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.AI;
3 | using TrueCraft.Core.Physics;
4 |
5 | namespace TrueCraft.Core.Entities
6 | {
7 | public interface IMobEntity : IEntity
8 | {
9 | event EventHandler PathComplete;
10 | PathResult? CurrentPath { get; set; }
11 | bool AdvancePath(TimeSpan time, bool faceRoute = true);
12 | IMobState? CurrentState { get; set; }
13 | void Face(Vector3 target);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/GameMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core
4 | {
5 | ///
6 | /// Enumerates the different game modes in TrueCraft.
7 | ///
8 | public enum GameMode
9 | {
10 | ///
11 | /// The survival game mode.
12 | ///
13 | Survival = 0,
14 |
15 | ///
16 | /// The creative game mode.
17 | ///
18 | Creative = 1
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Input/MouseButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Input
4 | {
5 | ///
6 | ///
7 | ///
8 | public enum MouseButton
9 | {
10 | ///
11 | ///
12 | ///
13 | Left,
14 |
15 | ///
16 | ///
17 | ///
18 | Right,
19 |
20 | ///
21 | ///
22 | ///
23 | Middle
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Server/ServerOnly.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | namespace TrueCraft.Core.Server
5 | {
6 | public static class ServerOnly
7 | {
8 | ///
9 | ///
10 | ///
11 | [Conditional("DEBUG")]
12 | public static void Assert()
13 | {
14 | if (WhoAmI.Answer != IAm.Server)
15 | throw new ApplicationException(Strings.SERVER_CODE_ON_CLIENT);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Windows/WindowType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Windows
4 | {
5 | ///
6 | /// An enum to specify types of child windows.
7 | ///
8 | /// These values are the ones used in the Type field of the OpenWindowPacket.
9 | public enum WindowType : sbyte
10 | {
11 | Inventory = -1,
12 | Chest = 0,
13 | CraftingBench = 1,
14 | Furnace = 2,
15 | Dispenser = 3
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: csharp
2 | solution: TrueCraft.sln
3 | mono:
4 | - latest
5 | before_install:
6 | - git submodule update --init --recursive
7 | install:
8 | - nuget restore TrueCraft.sln
9 | - nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory testrunner
10 | script:
11 | - xbuild TrueCraft.sln
12 | - |
13 | mono \
14 | ./testrunner/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe \
15 | ./TrueCraft.Core.Test/TrueCraft.Core.Test.csproj
16 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modelling/Blocks/CobwebModeller.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework;
3 | using TrueCraft.Core.Logic.Blocks;
4 |
5 | namespace TrueCraft.Client.Modelling.Blocks
6 | {
7 | public class CobwebModeller : FlatQuadModeller
8 | {
9 | static CobwebModeller()
10 | {
11 | RegisterRenderer(CobwebBlock.BlockID, new CobwebModeller());
12 | }
13 |
14 | protected override Vector2 TextureMap { get { return new Vector2(11, 0); } }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IRegisterBlockProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | public interface IRegisterBlockProvider
6 | {
7 | ///
8 | /// Registers a new block provider. This overrides any existing block providers that use the
9 | /// same block ID.
10 | ///
11 | /// The Block Provider to be registered
12 | void RegisterBlockProvider(IBlockProvider provider);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Modelling/Blocks/SugarcaneModeller.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework;
3 | using TrueCraft.Core.Logic.Blocks;
4 |
5 | namespace TrueCraft.Client.Modelling.Blocks
6 | {
7 | public class SugarcaneModeller : FlatQuadModeller
8 | {
9 | static SugarcaneModeller()
10 | {
11 | RegisterRenderer(SugarcaneBlock.BlockID, new SugarcaneModeller());
12 | }
13 |
14 | protected override Vector2 TextureMap { get { return new Vector2(9, 4); } }
15 | }
16 | }
--------------------------------------------------------------------------------
/TrueCraft/Exceptions/PlayerDisconnectException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Exceptions
4 | {
5 | public class PlayerDisconnectException : Exception
6 | {
7 | ///
8 | /// True if the disconnection was the result of player actions.
9 | ///
10 | public bool PlayerInitiated { get; set; }
11 |
12 | public PlayerDisconnectException(bool playerInitiated)
13 | {
14 | PlayerInitiated = playerInitiated;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Inventory/WindowClosedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Inventory
4 | {
5 | public class WindowClosedEventArgs : EventArgs
6 | {
7 | private readonly sbyte _windowID;
8 |
9 | public WindowClosedEventArgs(sbyte windowID)
10 | {
11 | _windowID = windowID;
12 | }
13 |
14 | ///
15 | /// Gets the ID of the Window which was closed.
16 | ///
17 | public sbyte WindowID { get => _windowID; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IItemRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | ///
6 | /// Providers item providers for a server.
7 | ///
8 | public interface IItemRepository
9 | {
10 | ///
11 | /// Gets this repository's item provider for the specified item ID. This may return null
12 | /// if the item ID in question has no corresponding block provider.
13 | ///
14 | IItemProvider? GetItemProvider(short id);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/IBlockRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Logic
4 | {
5 | ///
6 | /// Providers block providers for a server.
7 | ///
8 | public interface IBlockRepository
9 | {
10 | ///
11 | /// Gets this repository's block provider for the specified block ID. This may return null
12 | /// if the block ID in question has no corresponding block provider.
13 | ///
14 | IBlockProvider GetBlockProvider(byte id);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/PigEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.World;
4 |
5 | namespace TrueCraft.Core.Entities
6 | {
7 | public class PigEntity : MobEntity
8 | {
9 | public PigEntity(IDimension dimension, IEntityManager entityManager) :
10 | base(dimension, entityManager, 10, new Size(0.9))
11 | {
12 | }
13 |
14 | public override sbyte MobType
15 | {
16 | get
17 | {
18 | return 90;
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/CoalItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class CoalItem : ItemProvider, IBurnableItem
7 | {
8 | public enum MetaData : short
9 | {
10 | Coal = 0,
11 | Charcoal = 1
12 | }
13 |
14 | public static readonly short ItemID = 0x107;
15 |
16 | public CoalItem(XmlNode node) : base(node)
17 | {
18 | }
19 |
20 | public TimeSpan BurnTime { get { return TimeSpan.FromSeconds(80); } }
21 | }
22 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Networking/Packets/UselessEntityPacket.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Networking.Packets
4 | {
5 | public struct UselessEntityPacket : IPacket
6 | {
7 | public byte ID { get { return 0x1E; } }
8 |
9 | public int EntityID;
10 |
11 | public void ReadPacket(IMinecraftStream stream)
12 | {
13 | EntityID = stream.ReadInt32();
14 | }
15 |
16 | public void WritePacket(IMinecraftStream stream)
17 | {
18 | stream.WriteInt32(EntityID);
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/TrueCraft/Commands/ICommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using TrueCraft.Core.Networking;
6 | using TrueCraft.Inventory;
7 |
8 | namespace TrueCraft.Commands
9 | {
10 | public interface ICommand
11 | {
12 | string Name { get; }
13 | string Description { get; }
14 | string[] Aliases { get; }
15 | void Handle(IRemoteClient client, string alias, string[] arguments);
16 | void Help(IRemoteClient client, string alias, string[] arguments);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/CowEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.World;
4 |
5 | namespace TrueCraft.Core.Entities
6 | {
7 | public class CowEntity : MobEntity
8 | {
9 | public CowEntity(IDimension dimension, IEntityManager entityManager) :
10 | base(dimension, entityManager, 10, new Size(0.9, 1.3, 0.9))
11 | {
12 | }
13 |
14 | public override sbyte MobType
15 | {
16 | get
17 | {
18 | return 92;
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/HenEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.World;
4 |
5 | namespace TrueCraft.Core.Entities
6 | {
7 | public class HenEntity : MobEntity
8 | {
9 | public HenEntity(IDimension dimension, IEntityManager entityManager) :
10 | base(dimension, entityManager, 4, new Size(0.4, 0.3, 0.4))
11 | {
12 | }
13 |
14 | public override sbyte MobType
15 | {
16 | get
17 | {
18 | return 93;
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Logic/Items/FishingRodItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 |
4 | namespace TrueCraft.Core.Logic.Items
5 | {
6 | public class FishingRodItem : ItemProvider, IDurableItem
7 | {
8 | public static readonly short ItemID = 0x15A;
9 |
10 | public FishingRodItem(XmlNode node) : base(node)
11 | {
12 | }
13 |
14 | ///
15 | public short Durability { get { return 65; } }
16 |
17 | // TODO: requires server-side behavior
18 | // TODO: requires client-side rendering support.
19 | }
20 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Inventory/ICraftingBenchWindow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Core.Inventory
4 | {
5 | public interface ICraftingBenchWindow : IWindow where T : ISlot
6 | {
7 | ///
8 | /// Gets the 3x3 Crafting Grid (plus output slot) of the Crafting Bench Window.
9 | ///
10 | ICraftingArea CraftingGrid { get; }
11 |
12 | ///
13 | /// Gets the Slot Index (within the Window) of the Output Slot.
14 | ///
15 | int CraftingOutputSlotIndex { get; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/TrueCraft.Client/Inventory/IFurnaceProgress.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TrueCraft.Client.Inventory
4 | {
5 | public interface IFurnaceProgress
6 | {
7 | ///
8 | /// Gets or sets the progress of the current smelting operation
9 | ///
10 | int SmeltingProgress { get; set; }
11 |
12 | ///
13 | /// Gets or sets the height of the flame in the Furnace, which indicates
14 | /// the fraction of the original burn time remaining.
15 | ///
16 | int BurnProgress { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TrueCraft.Core/Entities/SquidEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TrueCraft.Core.Server;
3 | using TrueCraft.Core.World;
4 |
5 | namespace TrueCraft.Core.Entities
6 | {
7 | public class SquidEntity : MobEntity
8 | {
9 | public SquidEntity(IDimension dimension, IEntityManager entityManager) :
10 | base(dimension, entityManager, 10, new Size(0.95)) // TODO: Size seems wrong...
11 | {
12 | }
13 |
14 | public override sbyte MobType
15 | {
16 | get
17 | {
18 | return 94;
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/TrueCraft.Core/Networking/IPacketReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Concurrent;
3 | using System.Collections.Generic;
4 |
5 | namespace TrueCraft.Core.Networking
6 | {
7 | public interface IPacketReader
8 | {
9 | int ProtocolVersion { get; }
10 |
11 | ConcurrentDictionary