aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/NotGateTile.h
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/NotGateTile.h
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/NotGateTile.h')
-rw-r--r--Minecraft.World/NotGateTile.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/Minecraft.World/NotGateTile.h b/Minecraft.World/NotGateTile.h
index 52dd4a2e..b1f3431d 100644
--- a/Minecraft.World/NotGateTile.h
+++ b/Minecraft.World/NotGateTile.h
@@ -10,58 +10,57 @@ class NotGateTile : public TorchTile
private:
static const int RECENT_TOGGLE_TIMER = 20 * 3;
- static const int MAX_RECENT_TOGGLES = 8;
+ static const int MAX_RECENT_TOGGLES = 8;
- bool on;
+ bool on;
public:
- class Toggle
+ class Toggle
{
public:
- int x, y, z;
- __int64 when;
+ int x, y, z;
+ __int64 when;
- Toggle(int x, int y, int z, __int64 when)
+ Toggle(int x, int y, int z, __int64 when)
{
- this->x = x;
- this->y = y;
- this->z = z;
- this->when = when;
- }
- };
+ this->x = x;
+ this->y = y;
+ this->z = z;
+ this->when = when;
+ }
+ };
private:
static unordered_map<Level *, deque<Toggle> *> recentToggles; // 4J - brought forward change from 1.3.2
public:
static void removeLevelReferences(Level *level); // 4J added
private:
- bool isToggledTooFrequently(Level *level, int x, int y, int z, bool add);
+ bool isToggledTooFrequently(Level *level, int x, int y, int z, bool add);
protected:
NotGateTile(int id, bool on);
public:
- int getTickDelay();
+ int getTickDelay(Level *level);
void onPlace(Level *level, int x, int y, int z);
void onRemove(Level *level, int x, int y, int z, int id, int data);
- bool getSignal(LevelSource *level, int x, int y, int z, int face);
+ int getSignal(LevelSource *level, int x, int y, int z, int face);
private:
bool hasNeighborSignal(Level *level, int x, int y, int z);
public:
- void tick(Level *level, int x, int y, int z, Random *random);
- void neighborChanged(Level *level, int x, int y, int z, int type);
+ void tick(Level *level, int x, int y, int z, Random *random);
+ void neighborChanged(Level *level, int x, int y, int z, int type);
- bool getDirectSignal(Level *level, int x, int y, int z, int face);
+ int getDirectSignal(LevelSource *level, int x, int y, int z, int face);
- int getResource(int data, Random *random, int playerBonusLevel);
- bool isSignalSource();
+ int getResource(int data, Random *random, int playerBonusLevel);
+ bool isSignalSource();
public:
void animateTick(Level *level, int xt, int yt, int zt, Random *random);
int cloneTileId(Level *level, int x, int y, int z);
- void levelTimeChanged(Level *level, __int64 delta, __int64 newTime);
-
- void registerIcons(IconRegister *iconRegister);
+ void levelTimeChanged(Level *level, __int64 delta, __int64 newTime);
+ bool isMatching(int id);
}; \ No newline at end of file