Remaining Entities and Tiles#664
Conversation
…between projectiles
…provements to HashMapFunction
…yicaro/nbcraft into remaining-entities-and-tiles
| //#define ENH_RENDER_HAND_ARMOR // Render the right arm of the chestplate you are wearing on top the first-person hand. | ||
| #define ENH_SAVE_REMOTE_PLAYERS // Save remote player data on the server, such as inventory, position, health, etc. | ||
| //#define ENH_BETA_1_7_TERRAIN_ATLAS // Enables support for the vertical shift of some textures from Beta 1.7, such as cake | ||
| #define ENH_BETA_1_7_TERRAIN_ATLAS // Enables support for the vertical shift of some textures from Beta 1.7, such as cake |
There was a problem hiding this comment.
The default terrain.png needs to be updated to accommodate this.
BrentDaMage
left a comment
There was a problem hiding this comment.
Partial review. More tomorrow.
| #define AKEYCODE_FORWARD_DEL VK_DELETE | ||
| #define AKEYCODE_ARROW_LEFT VK_LEFT | ||
| #define AKEYCODE_ARROW_RIGHT VK_RIGHT | ||
| #define AKEYCODE_DEL VK_BACK |
| "blendDst": "OneMinusSrcAlpha", | ||
|
|
||
| "vertexShader" : "shaders/uv.vertex", | ||
| "fragmentShader" : "shaders/texture_ccolor.fragment" |
There was a problem hiding this comment.
Are you sure we need ccolor here? I don't think rain or snow ever gets recolored live, unless we need it for alpha or something?
There was a problem hiding this comment.
Yes, we need it for the alpha
| "Blending", | ||
| "Textured"], | ||
|
|
||
| "blendSrc": "SourceAlpha", |
There was a problem hiding this comment.
I believe these are default and don't need to be specified.
| { | ||
| int x = m_width / 2 - 50; | ||
| int y = m_height / 4 + 20; | ||
| VirtualKeyboard keyboard; |
| VirtualKeyboard keyboard; | ||
| keyboard.rect = IntRectangle(x / Gui::GuiScale, y / Gui::GuiScale, (x + 100) / Gui::GuiScale, (y + 100) / Gui::GuiScale); | ||
| m_pMinecraft->m_pPlatform->showKeyboard(0, keyboard); | ||
| m_btnDone.m_xPos = m_width / 2 - 100; |
| TileData auxValue = m_pLevel->getData(pos); | ||
|
|
||
| m_pMinecraft->m_pParticleEngine->destroyEffect(pos); | ||
| m_pMinecraft->m_pParticleEngine->destroyEffect(pos, pTile->m_ID, auxValue); |
| _addRenderer(Entity::RENDER_GIANT, new GiantMobRenderer( new ZombieModel, 0.5f, 6.0f)); | ||
| _addRenderer(Entity::RENDER_SLIME, new SlimeRenderer( new SlimeModel(16), new SlimeModel(0), 0.25f)); | ||
| _addRenderer(Entity::RENDER_GHAST, new GhastRenderer()); | ||
| _addRenderer(Entity::RENDER_WOLF, new WolfRenderer(new WolfModel, 0.5f)); |
There was a problem hiding this comment.
make indentation in-line with the others up top
| _addRenderer(Entity::RENDER_MINECART, new MinecartRenderer()); | ||
| _addRenderer(Entity::RENDER_BOAT, new BoatRenderer()); | ||
| _addRenderer(Entity::RENDER_PAINTING, new PaintingRenderer()); | ||
| _addRenderer(Entity::RENDER_LIGHTNING_BOLT, new LightningBoltRenderer()); |
There was a problem hiding this comment.
make all of the others in-line with this
|
|
||
| var10.begin(mce::PRIMITIVE_MODE_TRIANGLE_STRIP, 10); | ||
| float var31 = 0.5f; | ||
| var10.color(0.9f * var31, 0.9f * var31, 1.0f * var31, 0.3f); |
There was a problem hiding this comment.
we could probably get away with just doing the currentShaderColor here and switching off of the vertex-color entity shader.
| } | ||
| Lighting::turnOn(); | ||
| } | ||
| } No newline at end of file |
BrentDaMage
left a comment
There was a problem hiding this comment.
Partial review. Half way there.
| p1 = p; | ||
|
|
||
| cPos.x += p->x - smoothPos.x; | ||
| cPos.y += (p0->y + p1->y) / 2.0 - smoothPos.y; |
| { | ||
| MatrixStack::Ref tileMatrix = MatrixStack::World.push(); | ||
| bindTexture(C_TERRAIN_NAME); | ||
| float ss = 0.75F; |
|
|
||
| protected: | ||
| Model* m_pModel; | ||
| TileRenderer m_tileRenderer; |
There was a problem hiding this comment.
Shouldn't we be using a the singleton here or something instead of making a new one specifically for this? Better yet, we should do what the FallingTileRenderer does.
| bindTexture("art/kz.png"); | ||
| const Painting& painting = (const Painting&)pEntity; | ||
| PaintingType& motive = painting.getPaintingType(); | ||
| float s = 0.0625F; |
There was a problem hiding this comment.
make constexpr and make Fs lowercase.
|
|
||
| void PaintingRenderer::render(const Entity& pEntity, const Vec3& pos, float rot, float b) | ||
| { | ||
| m_random.setSeed(187L); |
|
|
||
| if (m_life >= 0) | ||
| { | ||
| constexpr float var6 = 3.0; |
| void tick() override; | ||
| virtual bool shouldRender(Vec3& camPos) const override; | ||
|
|
||
| public: |
| addSpawnData(EntityCategories::ANIMAL, EntityType::SHEEP, 12); | ||
| addSpawnData(EntityCategories::ANIMAL, EntityType::PIG, 10); | ||
| addSpawnData(EntityCategories::ANIMAL, EntityType::CHICKEN, 10); | ||
| addSpawnData(EntityCategories::ANIMAL, EntityType::COW, 10); |
There was a problem hiding this comment.
Aren't Cows supposed to be 8? Where'd 10 come from?
| return true; | ||
|
|
||
| return false; | ||
| } No newline at end of file |
| { | ||
| } | ||
|
|
||
| virtual bool canSpawn(Level& level, EntityType::ID id, const TilePos&) const { return true; } |
Entities
Tiles and Tile Entities
Related Items
Misc and Fixes