Changed Block Meta Data

This commit is contained in:
ttewrrr committed 2026-03-13 17:31:31 +01:00
1 parent 95cc0b0818
commit c68301f735
4 files changed
+26 -13

No files matched your search

+3 -3
View File
@@ -400,9 +400,9 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
case eUIScene_NewUpdateMessage:
newScene = new UIScene_NewUpdateMessage(iPad, initData, this);
break;
case eUIScene_MiniGamesMenu:
newScene = new UIScene_MiniGamesMenu(iPad, initData, this);
break;
// case eUIScene_MiniGamesMenu:
//newScene = new UIScene_MiniGamesMenu(iPad, initData, this);
//break;
// Other
case eUIScene_Keyboard:
@@ -7660,6 +7660,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|PSVita'">false</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Common\UI\UIScene_MiniGamesMenu.h" />
<ClInclude Include="Common\UI\UIScene_NewUpdateMessage.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Xbox 360'">true</ExcludedFromBuild>
+20 -7
View File
@@ -1,20 +1,33 @@
#include "stdafx.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.phys.h"
#include "net.minecraft.world.entity.h"
#include "SlimeTile.h"
SlimeTile::SlimeTile(int id) : Tile(id, Material::dirt)
SlimeTile::SlimeTile(int id) : Tile(id, Material::sand)
{
}
void SlimeTile::fallOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity, float fallDistance)
{
printf("SlimeTile::fallOn: %f\n", fallDistance);
if (fallDistance < 4.0f)
// If the entity is a living entity and sneaking (crouching) then do normal fall behavior
shared_ptr<LivingEntity> le = dynamic_pointer_cast<LivingEntity>(entity);
if (le != nullptr && le->isSneaking())
{
entity->yd = 0.0;
Tile::fallOn(level, x, y, z, entity, fallDistance);
return;
}
else
// Only apply bounce when there was fall distance (called when landing)
if (fallDistance > 0.0f)
{
entity->yd = -entity->yd * 0.8;
// Use the entity's vertical velocity to compute bounce. Use a reasonable multiplier.
float bounce = (float)(-entity->yd * 0.8f);
if (fabs(bounce) < 0.1f) bounce = 0.0f;
// Apply bounce by setting vertical velocity and reset fall distance.
// Do not call move() here — let normal physics apply the velocity next tick.
entity->yd = bounce;
entity->fallDistance = 0.0f;
}
}
+2 -3
View File
@@ -1,13 +1,12 @@
#pragma once
#include "Tile.h"
#include "Definitions.h"
class SlimeTile : public Tile
{
friend class Tile;
protected:
SlimeTile(int id);
public:
SlimeTile(int id);
virtual void fallOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity, float fallDistance);
};