From 950de854a1fcc989b9f0fdac5777af0182881ea6 Mon Sep 17 00:00:00 2001 From: Fireblade <72758695+Firebladedoge229@users.noreply.github.com> Date: Wed, 29 Apr 2026 16:35:14 -0400 Subject: [PATCH] feat: barrier block todo: deprecate *.col file usage --- Minecraft.Client/BarrierParticle.cpp | 80 +++++++++++++++++ Minecraft.Client/BarrierParticle.h | 23 +++++ .../Media/MediaWindows64/HTMLColours.xml | 44 ++++++++++ Minecraft.Client/HumanoidMobRenderer.cpp | 2 +- Minecraft.Client/ItemInHandRenderer.cpp | 3 +- Minecraft.Client/ItemRenderer.cpp | 4 +- Minecraft.Client/LevelRenderer.cpp | 85 +++++++++++++++++++ Minecraft.Client/LevelRenderer.h | 10 +++ Minecraft.Client/PlayerRenderer.cpp | 2 +- Minecraft.Client/PreStitchedTextureMap.cpp | 1 + Minecraft.Client/TileRenderer.cpp | 5 ++ .../Windows64Media/loc/stringsGeneric.xml | 8 ++ Minecraft.Client/cmake/sources/Common.cmake | 2 + Minecraft.World/BarrierTile.cpp | 31 +++++++ Minecraft.World/BarrierTile.h | 17 ++++ Minecraft.World/Class.h | 1 + Minecraft.World/ParticleTypes.h | 1 + Minecraft.World/Tile.cpp | 5 +- Minecraft.World/Tile.h | 6 +- Minecraft.World/cmake/sources/Common.cmake | 4 + .../net.minecraft.world.level.tile.h | 1 + cmake/FxcWineWrapper.sh.in | 2 +- 22 files changed, 325 insertions(+), 12 deletions(-) create mode 100644 Minecraft.Client/BarrierParticle.cpp create mode 100644 Minecraft.Client/BarrierParticle.h create mode 100644 Minecraft.Client/Common/Media/MediaWindows64/HTMLColours.xml create mode 100644 Minecraft.World/BarrierTile.cpp create mode 100644 Minecraft.World/BarrierTile.h diff --git a/Minecraft.Client/BarrierParticle.cpp b/Minecraft.Client/BarrierParticle.cpp new file mode 100644 index 00000000..36f5243c --- /dev/null +++ b/Minecraft.Client/BarrierParticle.cpp @@ -0,0 +1,80 @@ +#include "stdafx.h" +#include "BarrierParticle.h" +#include "Minecraft.h" +#include "Tesselator.h" +#include "../Minecraft.World/Item.h" +#include "../Minecraft.World/Icon.h" +#include "../Minecraft.World/net.minecraft.world.level.tile.h" +#include "../Minecraft.World/Facing.h" +#include "../Minecraft.World/Level.h" +#include "../Minecraft.World/JavaMath.h" + +void BarrierParticle::init(Level* level, double x, double y, double z, float scale) +{ + xd = yd = zd = 0; + + rCol = gCol = bCol = 1.0f; + alpha = 1.0f; + + // fixed size + size = 0.5f * scale; + oSize = size; + + lifetime = 80; + + gravity = 0.0f; +} + +BarrierParticle::BarrierParticle(Level* level, + double x, double y, double z, + double xa, double ya, double za) + : Particle(level, x, y, z, xa, ya, za) +{ + init(level, x, y, z, 1.0f); + + // set particle texture to barrier texture + this->setTex(Minecraft::GetInstance()->textures, Tile::barrier->getTexture(Facing::UP)); +} + +int BarrierParticle::getParticleTexture() +{ + return ParticleEngine::TERRAIN_TEXTURE; +} + +void BarrierParticle::render(Tesselator* t, float a, float xa, float ya, float za, float xa2, float za2) +{ + rCol = gCol = bCol = 1.0f; + alpha = 1.0f; + + float u0 = tex->getU0(); + float u1 = tex->getU1(); + float v0 = tex->getV0(); + float v1 = tex->getV1(); + + float half = size; + + float px = static_cast(xo + (this->x - xo) * a - xOff); + float py = static_cast(yo + (this->y - yo) * a - yOff); + float pz = static_cast(zo + (this->z - zo) * a - zOff); + + float br = SharedConstants::TEXTURE_LIGHTING ? 1.0f : getBrightness(a); + t->color(br * rCol, br * gCol, br * bCol, alpha); + t->tex2(getLightColor(a)); + + t->vertexUV((double)(px - xa * half - xa2 * half), (double)(py - ya * half), (double)(pz - za * half - za2 * half), (double)u1, (double)v1); + t->vertexUV((double)(px - xa * half + xa2 * half), (double)(py + ya * half), (double)(pz - za * half + za2 * half), (double)u1, (double)v0); + t->vertexUV((double)(px + xa * half + xa2 * half), (double)(py + ya * half), (double)(pz + za * half + za2 * half), (double)u0, (double)v0); + t->vertexUV((double)(px + xa * half - xa2 * half), (double)(py - ya * half), (double)(pz + za * half - za2 * half), (double)u0, (double)v1); +} + +void BarrierParticle::tick() +{ + xo = x; + yo = y; + zo = z; + + if (++age >= lifetime) + remove(); + + xd = yd = zd = 0; +} \ No newline at end of file diff --git a/Minecraft.Client/BarrierParticle.h b/Minecraft.Client/BarrierParticle.h new file mode 100644 index 00000000..bbbe7b83 --- /dev/null +++ b/Minecraft.Client/BarrierParticle.h @@ -0,0 +1,23 @@ +#pragma once +#include "Particle.h" + +class BarrierParticle : public Particle +{ +public: + virtual eINSTANCEOF GetType() { return eType_BARRIERPARTICLE; } + +private: + void init(Level* level, double x, double y, double z, float scale); + +public: + float oSize; + + BarrierParticle(Level* level, + double x, double y, double z, + double xa, double ya, double za); + + virtual int getParticleTexture(); + + virtual void render(Tesselator* t, float a, float xa, float ya, float za, float xa2, float za2); + virtual void tick(); +}; \ No newline at end of file diff --git a/Minecraft.Client/Common/Media/MediaWindows64/HTMLColours.xml b/Minecraft.Client/Common/Media/MediaWindows64/HTMLColours.xml new file mode 100644 index 00000000..c308974d --- /dev/null +++ b/Minecraft.Client/Common/Media/MediaWindows64/HTMLColours.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Minecraft.Client/HumanoidMobRenderer.cpp b/Minecraft.Client/HumanoidMobRenderer.cpp index 774c7ef9..e1f7d0ec 100644 --- a/Minecraft.Client/HumanoidMobRenderer.cpp +++ b/Minecraft.Client/HumanoidMobRenderer.cpp @@ -241,7 +241,7 @@ void HumanoidMobRenderer::additionalRendering(shared_ptr mob, floa humanoidModel->arm0->translateTo(1 / 16.0f); glTranslatef(-1 / 16.0f, 7 / 16.0f, 1 / 16.0f); - if (item->id < 256 && TileRenderer::canRender(Tile::tiles[item->id]->getRenderShape())) + if (item->id < 256 && TileRenderer::canRender(Tile::tiles[item->id]->getRenderShape()) && item->id != Tile::barrier_Id) { float s = 8 / 16.0f; glTranslatef(-0 / 16.0f, 3 / 16.0f, -5 / 16.0f); diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index 02599072..9faebffd 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -251,7 +251,7 @@ void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptrid]; - if (item->getIconType() == Icon::TYPE_TERRAIN && tile != nullptr && TileRenderer::canRender(tile->getRenderShape())) + if ((item->getIconType() == Icon::TYPE_TERRAIN && tile != nullptr && TileRenderer::canRender(tile->getRenderShape())) && item->id != AirTile::barrier_Id) { MemSect(31); minecraft->textures->bindTexture(minecraft->textures->getTextureLocation(Icon::TYPE_TERRAIN)); @@ -302,7 +302,6 @@ void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptrgetAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel)) diff --git a/Minecraft.Client/ItemRenderer.cpp b/Minecraft.Client/ItemRenderer.cpp index ead8016f..25b53637 100644 --- a/Minecraft.Client/ItemRenderer.cpp +++ b/Minecraft.Client/ItemRenderer.cpp @@ -82,7 +82,7 @@ void ItemRenderer::render(shared_ptr _itemEntity, double x, double y, do Tile *tile = Tile::tiles[item->id]; - if (item->getIconType() == Icon::TYPE_TERRAIN && tile != nullptr && TileRenderer::canRender(tile->getRenderShape())) + if ((item->getIconType() == Icon::TYPE_TERRAIN && tile != nullptr && TileRenderer::canRender(tile->getRenderShape())) && item->id != Tile::barrier_Id) { glRotatef(spin, 0, 1, 0); @@ -355,7 +355,7 @@ void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptrgetAuxValue(); Icon *itemIcon = item->getIcon(); - if (item->getIconType() == Icon::TYPE_TERRAIN && TileRenderer::canRender(Tile::tiles[itemId]->getRenderShape())) + if ((item->getIconType() == Icon::TYPE_TERRAIN && TileRenderer::canRender(Tile::tiles[itemId]->getRenderShape())) && itemId != Tile::barrier_Id) { PIXBeginNamedEvent(0,"3D gui item render %d\n",itemId); MemSect(31); diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index 457a296e..544662a8 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -11,6 +11,7 @@ #include "MobSkinTextureProcessor.h" #include "MobSkinMemTextureProcessor.h" #include "GameRenderer.h" +#include "BarrierParticle.h" #include "BubbleParticle.h" #include "SmokeParticle.h" #include "NoteParticle.h" @@ -42,6 +43,7 @@ #include "Lighting.h" #include "Options.h" #include "MultiPlayerChunkCache.h" +#include "../Minecraft.World/BlockPos.h" #include "../Minecraft.World/ParticleTypes.h" #include "../Minecraft.World/IntCache.h" #include "../Minecraft.World/IntBuffer.h" @@ -63,6 +65,7 @@ #include "FrustumCuller.h" #include "../Minecraft.World/BasicTypeContainers.h" #include "Common/UI/UIScene_SettingsGraphicsMenu.h" +#include //#define DISABLE_SPU_CODE @@ -1054,6 +1057,15 @@ void LevelRenderer::tick() } } } + + if (mc && mc->player) + { + doBarrierParticles( + mc->player->x, + mc->player->y, + mc->player->z + ); + } } void LevelRenderer::renderSky(float alpha) @@ -3060,6 +3072,9 @@ shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle case eParticleType_dragonbreath: particle = std::make_shared(lev, x, y, z, xa, ya, za); break; + case eParticleType_barrier: + particle = std::make_shared(lev, x, y, z, xa, ya, za); + break; default: if( ( eParticleType >= eParticleType_iconcrack_base ) && ( eParticleType <= eParticleType_iconcrack_last ) ) { @@ -3081,6 +3096,76 @@ shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle return particle; } +void LevelRenderer::doBarrierParticles(int posX, int posY, int posZ) +{ + // get currently selected item + shared_ptr held = mc->player->getSelectedItem(); + + bool isCreative = false; + if (mc->gameMode != nullptr) { + isCreative = (mc->gameMode->getLocalPlayerMode() == GameType::CREATIVE); + } else { + int lp = mc->getLocalPlayerIdx(); + if (lp >= 0 && lp < XUSER_MAX_COUNT && mc->localgameModes[lp] != nullptr) + isCreative = (mc->localgameModes[lp]->getLocalPlayerMode() == GameType::CREATIVE); + } + + bool holdingBarrier = isCreative && held != nullptr && held->id == Tile::barrier_Id; + + if (!holdingBarrier) + return; + + Random random; + BlockPos pos; + + // track spawned particle position(s) + std::unordered_set spawnedPositions; + + for (int i = 0; i < 667; i++) + { + spawnBarrierParticles(posX, posY, posZ, 16, random, holdingBarrier, pos, spawnedPositions); + spawnBarrierParticles(posX, posY, posZ, 32, random, holdingBarrier, pos, spawnedPositions); + } +} + +void LevelRenderer::spawnBarrierParticles( + int x, int y, int z, + int radius, + Random& random, + bool holdingBarrier, + BlockPos& pos, + std::unordered_set &spawnedPositions) +{ + if (!holdingBarrier) + return; + + int bx = x + random.nextInt(radius * 2) - radius; + int by = y + random.nextInt(radius * 2) - radius; + int bz = z + random.nextInt(radius * 2) - radius; + + pos.set(bx, by, bz); + + int tileId = mc->level->getTile(pos.getX(), pos.getY(), pos.getZ()); + + // spawn particles + if (tileId == Tile::barrier_Id) + { + int key = pos.hashCode(); + if (spawnedPositions.find(key) == spawnedPositions.end()) { + spawnedPositions.insert(key); + mc->particleEngine->add( + std::make_shared( + mc->level, + bx + 0.5, + by + 0.5, + bz + 0.5, + 0, 0, 0 + ) + ); + } + } +} + void LevelRenderer::entityAdded(shared_ptr entity) { if(entity->instanceof(eTYPE_PLAYER)) diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index 3fa61445..4ba0f6d7 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -6,6 +6,7 @@ #include "../Minecraft.World/Level.h" #include "ResourceLocation.h" #include +#include #ifdef __PS3__ #include "C4JSpursJob.h" #endif @@ -45,6 +46,8 @@ private: static ResourceLocation END_SKY_LOCATION; public: + void doBarrierParticles(int posX, int posY, int posZ); + static const int CHUNK_XZSIZE = 16; static const int CHUNK_RENDER_LAYERS = 3; #ifdef _LARGE_WORLDS @@ -67,6 +70,13 @@ public: public: LevelRenderer(Minecraft *mc, Textures *textures); private: + void spawnBarrierParticles( + int x, int y, int z, + int radius, + Random& random, + bool holdingBarrier, + BlockPos& pos, + std::unordered_set &spawnedPositions); void renderStars(); void createCloudMesh(); // 4J added public: diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index 7969bcb0..8ff3bf85 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -605,7 +605,7 @@ void PlayerRenderer::additionalRendering(shared_ptr _mob, float a) anim = item->getUseAnimation(); } - if (item->id < 256 && TileRenderer::canRender(Tile::tiles[item->id]->getRenderShape())) + if (item->id < 256 && TileRenderer::canRender(Tile::tiles[item->id]->getRenderShape()) && item->id != Tile::barrier_Id) { float s = 8 / 16.0f; glTranslatef(-0 / 16.0f, 3 / 16.0f, -5 / 16.0f); diff --git a/Minecraft.Client/PreStitchedTextureMap.cpp b/Minecraft.Client/PreStitchedTextureMap.cpp index ff8d024c..6247483a 100644 --- a/Minecraft.Client/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/PreStitchedTextureMap.cpp @@ -1049,6 +1049,7 @@ void PreStitchedTextureMap::loadUVs() ADD_ICON(21, 13, L"prismarine_dark"); ADD_ICON(20, 13, L"prismarine_bricks"); + ADD_ICON(23, 11, L"barrier"); ADD_ICON(23, 12, L"packed_ice"); ADD_ICON(23, 14, L"inverted_daylight_detector"); ADD_ICON(23, 15, L"iron_trapdoor"); diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp index 1533d6a0..0dc19eb9 100644 --- a/Minecraft.Client/TileRenderer.cpp +++ b/Minecraft.Client/TileRenderer.cpp @@ -263,6 +263,11 @@ bool TileRenderer::tesselateInWorld( Tile* tt, int x, int y, int z, int forceDat shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param { Tesselator* t = Tesselator::getInstance(); + // skip in-game rendering of barrier block + if (tt != nullptr && tt->id == Tile::barrier_Id) + { + return false; + } int shape = tt->getRenderShape(); tt->updateShape( level, x, y, z, forceData, forceEntity ); // AP - now that the culling is done earlier we don't need to call setShape until later on (only for SHAPE_BLOCK) diff --git a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml index ff9c551e..7202ddc5 100644 --- a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml +++ b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml @@ -1473,6 +1473,10 @@ Can also be used for low-level lighting. Collected by getting a Skeleton to kill a Creeper. Can be played in a jukebox. + + An invisible, but solid block. + + Extinguishes fire and helps crops grow. Can be collected in a bucket. @@ -3001,6 +3005,10 @@ Can also be used for low-level lighting. Bedrock + + Barrier + + Water diff --git a/Minecraft.Client/cmake/sources/Common.cmake b/Minecraft.Client/cmake/sources/Common.cmake index 0d66445c..5c5722cd 100644 --- a/Minecraft.Client/cmake/sources/Common.cmake +++ b/Minecraft.Client/cmake/sources/Common.cmake @@ -678,6 +678,8 @@ set(_MINECRAFT_CLIENT_COMMON_NET_MINECRAFT_CLIENT_MULTIPLAYER source_group("net/minecraft/client/multiplayer" FILES ${_MINECRAFT_CLIENT_COMMON_NET_MINECRAFT_CLIENT_MULTIPLAYER}) set(_MINECRAFT_CLIENT_COMMON_NET_MINECRAFT_CLIENT_PARTICLE + "${CMAKE_CURRENT_SOURCE_DIR}/BarrierParticle.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/BarrierParticle.h" "${CMAKE_CURRENT_SOURCE_DIR}/BreakingItemParticle.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/BreakingItemParticle.h" "${CMAKE_CURRENT_SOURCE_DIR}/BubbleParticle.cpp" diff --git a/Minecraft.World/BarrierTile.cpp b/Minecraft.World/BarrierTile.cpp new file mode 100644 index 00000000..64a6287f --- /dev/null +++ b/Minecraft.World/BarrierTile.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" +#include "BarrierTile.h" + +BarrierTile::BarrierTile(int id, Material *material, bool allowSame) : HalfTransparentTile(id, L"barrier", material, allowSame) +{ +} + +int BarrierTile::getResourceCount(Random *random) +{ + return 0; +} + +int BarrierTile::getRenderLayer() +{ + return 0; +} + +bool BarrierTile::isSolidRender() +{ + return false; +} + +bool BarrierTile::isCubeShaped() +{ + return false; +} + +bool BarrierTile::isSilkTouchable() +{ + return false; +} \ No newline at end of file diff --git a/Minecraft.World/BarrierTile.h b/Minecraft.World/BarrierTile.h new file mode 100644 index 00000000..38d91bbf --- /dev/null +++ b/Minecraft.World/BarrierTile.h @@ -0,0 +1,17 @@ +#pragma once +#include "HalfTransparentTile.h" + +class Random; + +class BarrierTile : public HalfTransparentTile +{ +public: + using HalfTransparentTile::isSolidRender; + + BarrierTile(int id, Material *material, bool allowSame); + virtual int getResourceCount(Random *random); + virtual int getRenderLayer(); + virtual bool isSolidRender(); + virtual bool isCubeShaped(); + virtual bool isSilkTouchable(); +}; diff --git a/Minecraft.World/Class.h b/Minecraft.World/Class.h index 5e197e3f..09107147 100644 --- a/Minecraft.World/Class.h +++ b/Minecraft.World/Class.h @@ -265,6 +265,7 @@ enum eINSTANCEOF eType_NETHERPORTALPARTICLE, eType_REDDUSTPARTICLE, eType_SMOKEPARTICLE, + eType_BARRIERPARTICLE, eType_SNOWSHOVELPARTICLE, eType_SPLASHPARTICLE, eType_TAKEANIMATIONPARTICLE, diff --git a/Minecraft.World/ParticleTypes.h b/Minecraft.World/ParticleTypes.h index 4bb3e360..646bfdd8 100644 --- a/Minecraft.World/ParticleTypes.h +++ b/Minecraft.World/ParticleTypes.h @@ -37,6 +37,7 @@ enum ePARTICLE_TYPE eParticleType_enchantmenttable, eParticleType_dragonbreath, eParticleType_ender, // 4J Added - These are things that used the "portal" particle but are actually end related entities + eParticleType_barrier, eParticleType_angryVillager, eParticleType_happyVillager, eParticleType_fireworksspark, diff --git a/Minecraft.World/Tile.cpp b/Minecraft.World/Tile.cpp index df064a91..57ae1fc0 100644 --- a/Minecraft.World/Tile.cpp +++ b/Minecraft.World/Tile.cpp @@ -265,6 +265,7 @@ Tile* Tile::prismarine = nullptr; Tile* Tile::tree2Trunk = nullptr; Tile* Tile::packedIce = nullptr; +Tile* Tile::barrier = nullptr; TallGrass2* Tile::tallgrass2 = nullptr; DWORD Tile::tlsIdxShape = TlsAlloc(); @@ -517,6 +518,7 @@ void Tile::staticCtor() Tile::tree2Trunk = (new TreeTile2(162))->setDestroyTime(2.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"log")->setDescriptionId(IDS_TILE_LOG)->sendTileData()->setUseDescriptionId(IDS_DESC_LOG); Tile::woodStairsAcacia = (new StairTile(163, Tile::wood, TreeTile::ACACIA_TRUNK))->setBaseItemTypeAndMaterial(Item::eBaseItemType_stairs, Item::eMaterial_acaciawood)->setIconName(L"stairsWoodAcacia")->setDescriptionId(IDS_TILE_STAIRS_ACACIAWOOD)->sendTileData()->setUseDescriptionId(IDS_DESC_STAIRS); Tile::woodStairsDark = (new StairTile(164, Tile::wood, TreeTile::DARK_TRUNK))->setBaseItemTypeAndMaterial(Item::eBaseItemType_stairs, Item::eMaterial_darkwood)->setIconName(L"stairsWoodDark")->setDescriptionId(IDS_TILE_STAIRS_DARKWOOD)->sendTileData()->setUseDescriptionId(IDS_DESC_STAIRS); + Tile::barrier = (new BarrierTile(166, Material::stone, false)) ->setIndestructible()->setExplodeable(6000000)->setSoundType(Tile::SOUND_STONE)->setIconName(L"barrier")->setDescriptionId(IDS_TILE_BARRIER)->setNotCollectStatistics()->setUseDescriptionId(IDS_DESC_BARRIER); Tile::iron_trapdoor = (new TrapDoorTile(167, Material::metal))->setBaseItemTypeAndMaterial(Item::eBaseItemType_door, Item::eMaterial_trap)->setDestroyTime(5.0f)->setSoundType(Tile::SOUND_METAL)->setIconName(L"iron_trapdoor")->setDescriptionId(IDS_TILE_IRON_TRAPDOOR)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_TRAPDOOR); Tile::hayBlock = (new HayBlockTile(170)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_block, Item::eMaterial_wheat)->setDestroyTime(0.5f)->setSoundType(SOUND_GRASS)->setIconName(L"hay_block")->setDescriptionId(IDS_TILE_HAY)->setUseDescriptionId(IDS_DESC_HAY); @@ -592,9 +594,6 @@ void Tile::staticCtor() Item::items[tree2Trunk_Id] = (new MultiTextureTileItem(Tile::tree2Trunk_Id - 256, tree2Trunk, (int*)TreeTile2::TREE_NAMES, TreeTile2::TREE_NAMES_LENGTH))->setIconName(L"log")->setDescriptionId(IDS_TILE_LOG)->setUseDescriptionId(IDS_DESC_LOG); Item::items[sponge_Id] = (new MultiTextureTileItem(Tile::sponge_Id - 256, sponge, (int*)Sponge::SPONGE_NAMES, Sponge::SPONGE_NAMES_LENGTH))->setIconName(L"sponge")->setDescriptionId(IDS_TILE_SPONGE)->setUseDescriptionId(IDS_DESC_SPONGE); - - - int tallgrass2IdsData[TallGrass2::VARIANT_COUNT] = { IDS_TILE_SUNFLOWER, // 0 - Sunflower, not implemented yet IDS_TILE_LILAC, // 1 - Lilac diff --git a/Minecraft.World/Tile.h b/Minecraft.World/Tile.h index 4224afb5..8afc8d21 100644 --- a/Minecraft.World/Tile.h +++ b/Minecraft.World/Tile.h @@ -11,6 +11,7 @@ class GrassTile; class LeafTile; class LeafTile2; class TallGrass; +class BarrierTile; class DeadBushTile; class FireTile; class PortalTile; @@ -373,7 +374,7 @@ public: static const int stairs_acaciawood_Id = 163; static const int stairs_darkwood_Id = 164; //165 slimeblock - //166 barrier + static const int barrier_Id = 166; static const int iron_trapdoor_Id = 167; static const int prismarine_Id = 168; static const int seaLantern_Id = 169; @@ -606,6 +607,7 @@ public: static Tile *clayHardened; static Tile *coalBlock; + static Tile *barrier; static Tile *iron_trapdoor; static Tile* door_spruce; @@ -613,7 +615,7 @@ public: static Tile* door_jungle; static Tile* door_acacia; static Tile* door_dark; - + static Tile* spruceFence; static Tile* birchFence; static Tile* jungleFence; diff --git a/Minecraft.World/cmake/sources/Common.cmake b/Minecraft.World/cmake/sources/Common.cmake index 6f052581..8c201c0b 100644 --- a/Minecraft.World/cmake/sources/Common.cmake +++ b/Minecraft.World/cmake/sources/Common.cmake @@ -1773,6 +1773,10 @@ set(_MINECRAFT_WORLD_COMMON_NET_MINECRAFT_WORLD_LEVEL_TILE "${CMAKE_CURRENT_SOURCE_DIR}/AirTile.h" "${CMAKE_CURRENT_SOURCE_DIR}/AnvilTile.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/AnvilTile.h" + "${CMAKE_CURRENT_SOURCE_DIR}/../Minecraft.Client/BarrierParticle.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../Minecraft.Client/BarrierParticle.h" + "${CMAKE_CURRENT_SOURCE_DIR}/BarrierTile.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/BarrierTile.h" "${CMAKE_CURRENT_SOURCE_DIR}/BaseEntityTile.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/BaseEntityTile.h" "${CMAKE_CURRENT_SOURCE_DIR}/BasePressurePlateTile.cpp" diff --git a/Minecraft.World/net.minecraft.world.level.tile.h b/Minecraft.World/net.minecraft.world.level.tile.h index 0b650e77..93843135 100644 --- a/Minecraft.World/net.minecraft.world.level.tile.h +++ b/Minecraft.World/net.minecraft.world.level.tile.h @@ -3,6 +3,7 @@ #include "Tile.h" #include "AirTile.h" #include "AnvilTile.h" +#include "BarrierTile.h" #include "BaseEntityTile.h" #include "BasePressurePlateTile.h" #include "BaseRailTile.h" diff --git a/cmake/FxcWineWrapper.sh.in b/cmake/FxcWineWrapper.sh.in index 6a744fd0..25015e89 100644 --- a/cmake/FxcWineWrapper.sh.in +++ b/cmake/FxcWineWrapper.sh.in @@ -24,7 +24,7 @@ for arg in "$@"; do args+=("$(map_to_windows_path "$arg")") done -"@LCE_WINE_PROGRAM@" "@LCE_FXC_EXE@" "${args[@]}" +WINEDEBUG=-all "@LCE_WINE_PROGRAM@" "@LCE_FXC_EXE@" "${args[@]}" status=$? if [[ "$status" -eq 0 && -n "$out_header" && -f "$out_header" ]]; then