mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-25 09:10:44 +00:00
fix: remove byte type alias
This commit is contained in:
@@ -181,9 +181,9 @@ void FallingTile::causeFallDamage(float distance)
|
||||
|
||||
void FallingTile::addAdditonalSaveData(CompoundTag *tag)
|
||||
{
|
||||
tag->putByte(L"Tile", (byte) tile);
|
||||
tag->putByte(L"Data", (byte) data);
|
||||
tag->putByte(L"Time", (byte) time);
|
||||
tag->putByte(L"Tile", (uint8_t) tile);
|
||||
tag->putByte(L"Data", (uint8_t) data);
|
||||
tag->putByte(L"Time", (uint8_t) time);
|
||||
tag->putBoolean(L"DropItem", dropItem);
|
||||
tag->putBoolean(L"HurtEntities", hurtEntities);
|
||||
tag->putFloat(L"FallHurtAmount", fallDamageAmount);
|
||||
|
||||
@@ -353,9 +353,9 @@ void RedStoneDustTile::animateTick(Level *level, int x, int y, int z, Random *ra
|
||||
unsigned int minColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_RedstoneDustLitMin );
|
||||
unsigned int maxColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_RedstoneDustLitMax );
|
||||
|
||||
byte redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( (data-1)/14.0f));
|
||||
byte greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( (data-1)/14.0f));
|
||||
byte blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( (data-1)/14.0f));
|
||||
uint8_t redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( (data-1)/14.0f));
|
||||
uint8_t greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( (data-1)/14.0f));
|
||||
uint8_t blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( (data-1)/14.0f));
|
||||
|
||||
colour = redComponent<<16 | greenComponent<<8 | blueComponent;
|
||||
}
|
||||
|
||||
@@ -126,9 +126,9 @@ int StemTile::getColor(int data)
|
||||
unsigned int minColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_StemMin );
|
||||
unsigned int maxColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_StemMax );
|
||||
|
||||
byte redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( data/7.0f));
|
||||
byte greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( data/7.0f));
|
||||
byte blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( data/7.0f));
|
||||
uint8_t redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( data/7.0f));
|
||||
uint8_t greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( data/7.0f));
|
||||
uint8_t blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( data/7.0f));
|
||||
|
||||
colour = redComponent<<16 | greenComponent<<8 | blueComponent;
|
||||
return colour;
|
||||
|
||||
@@ -308,7 +308,7 @@ void BrewingStandTileEntity::save(CompoundTag *base)
|
||||
if (items[i] != NULL)
|
||||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
tag->putByte(L"Slot", (byte) i);
|
||||
tag->putByte(L"Slot", (uint8_t) i);
|
||||
items[i]->save(tag);
|
||||
listTag->add(tag);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void ChestTileEntity::save(CompoundTag *base)
|
||||
if (items->data[i] != NULL)
|
||||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
tag->putByte(L"Slot", (byte) i);
|
||||
tag->putByte(L"Slot", (uint8_t) i);
|
||||
items->data[i]->save(tag);
|
||||
listTag->add(tag);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ void DispenserTileEntity::save(CompoundTag *base)
|
||||
if (items->data[i] != NULL)
|
||||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
tag->putByte(L"Slot", (byte) i);
|
||||
tag->putByte(L"Slot", (uint8_t) i);
|
||||
items->data[i]->save(tag);
|
||||
listTag->add(tag);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ void FurnaceTileEntity::save(CompoundTag *base)
|
||||
if ((*items)[i] != NULL)
|
||||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
tag->putByte(L"Slot", (byte) i);
|
||||
tag->putByte(L"Slot", (uint8_t) i);
|
||||
(*items)[i]->save(tag);
|
||||
listTag->add(tag);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void MusicTileEntity::load(CompoundTag *tag)
|
||||
|
||||
void MusicTileEntity::tune()
|
||||
{
|
||||
note = (byte) ((note + 1) % 25);
|
||||
note = (uint8_t) ((note + 1) % 25);
|
||||
setChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
static TileEntity *create() { return new MusicTileEntity(); }
|
||||
|
||||
public:
|
||||
byte note;
|
||||
uint8_t note;
|
||||
|
||||
bool on;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user