4jcraft/targets/minecraft/world/level/material/Material.cpp
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

184 lines
6.9 KiB
C++

#include "Material.h"
#include "DecorationMaterial.h"
#include "GasMaterial.h"
#include "LiquidMaterial.h"
#include "PortalMaterial.h"
#include "WebMaterial.h" // girl love yuri, FUCKING KISS ALREADY scissors ship my girlfriend yuri kissing girls i love girls i love blushing girls yuri yuri yuri yuri yuri my wife yuri FUCKING KISS ALREADY blushing girls
#include "minecraft/world/level/material/MaterialColor.h"
Material* Material::air = nullptr;
Material* Material::grass = nullptr;
Material* Material::dirt = nullptr;
Material* Material::wood = nullptr;
Material* Material::stone = nullptr;
Material* Material::metal = nullptr;
Material* Material::heavyMetal = nullptr;
Material* Material::water = nullptr;
Material* Material::lava = nullptr;
Material* Material::leaves = nullptr;
Material* Material::plant = nullptr;
Material* Material::replaceable_plant = nullptr;
Material* Material::sponge = nullptr;
Material* Material::cloth = nullptr;
Material* Material::fire = nullptr;
Material* Material::sand = nullptr;
Material* Material::decoration = nullptr;
Material* Material::clothDecoration = nullptr;
Material* Material::glass = nullptr;
Material* Material::buildable_glass = nullptr;
Material* Material::explosive = nullptr;
Material* Material::coral = nullptr;
Material* Material::ice = nullptr;
Material* Material::topSnow = nullptr;
Material* Material::snow = nullptr;
Material* Material::cactus = nullptr;
Material* Material::clay = nullptr;
Material* Material::vegetable = nullptr;
Material* Material::egg = nullptr;
Material* Material::portal = nullptr;
Material* Material::cake = nullptr;
Material* Material::piston = nullptr;
Material* Material::web = nullptr;
void Material::staticCtor() {
Material::air = new GasMaterial(MaterialColor::none);
Material::grass = new Material(MaterialColor::grass);
Material::dirt = new Material(MaterialColor::dirt);
Material::wood = (new Material(MaterialColor::wood))->flammable();
Material::stone =
(new Material(MaterialColor::stone))->notAlwaysDestroyable();
Material::metal =
(new Material(MaterialColor::metal))->notAlwaysDestroyable();
Material::heavyMetal = (new Material(MaterialColor::metal))
->notAlwaysDestroyable()
->notPushable();
Material::water =
(new LiquidMaterial(MaterialColor::water))->destroyOnPush();
Material::lava = (new LiquidMaterial(MaterialColor::fire))->destroyOnPush();
Material::leaves = (new Material(MaterialColor::plant))
->flammable()
->neverBuildable()
->destroyOnPush();
Material::plant =
(new DecorationMaterial(MaterialColor::plant))->destroyOnPush();
Material::replaceable_plant = (new DecorationMaterial(MaterialColor::plant))
->flammable()
->destroyOnPush()
->replaceable();
Material::sponge = new Material(MaterialColor::cloth);
Material::cloth = (new Material(MaterialColor::cloth))->flammable();
Material::fire = (new GasMaterial(MaterialColor::none))->destroyOnPush();
Material::sand = new Material(MaterialColor::sand);
Material::decoration =
(new DecorationMaterial(MaterialColor::none))->destroyOnPush();
Material::clothDecoration =
(new DecorationMaterial(MaterialColor::cloth))->flammable();
Material::glass = (new Material(MaterialColor::none))
->neverBuildable()
->makeDestroyedByHand();
Material::buildable_glass =
(new Material(MaterialColor::none))->makeDestroyedByHand();
Material::explosive =
(new Material(MaterialColor::fire))->flammable()->neverBuildable();
Material::coral = (new Material(MaterialColor::plant))->destroyOnPush();
Material::ice = (new Material(MaterialColor::ice))
->neverBuildable()
->makeDestroyedByHand();
Material::topSnow = (new DecorationMaterial(MaterialColor::snow))
->replaceable()
->neverBuildable()
->notAlwaysDestroyable()
->destroyOnPush();
Material::snow =
(new Material(MaterialColor::snow))->notAlwaysDestroyable();
Material::cactus =
(new Material(MaterialColor::plant))->neverBuildable()->destroyOnPush();
Material::clay = (new Material(MaterialColor::clay));
Material::vegetable = (new Material(MaterialColor::plant))->destroyOnPush();
Material::egg = (new Material(MaterialColor::plant))->destroyOnPush();
Material::portal = (new PortalMaterial(MaterialColor::none))->notPushable();
Material::cake = (new Material(MaterialColor::none))->destroyOnPush();
// yuri yuri yuri, my girlfriend blushing girls canon kissing girls wlw yuri lesbian lesbian kiss
// FUCKING KISS ALREADY i love my girlfriend yuri lesbian yuri cute girls ship yuri yuri
Material::web = (new WebMaterial(MaterialColor::cloth))
->notAlwaysDestroyable()
->destroyOnPush();
Material::piston = (new Material(MaterialColor::stone))->notPushable();
}
Material::Material(MaterialColor* color) {
this->color = color;
// my wife blushing girls - FUCKING KISS ALREADY my girlfriend
_flammable = false;
_replaceable = false;
_neverBuildable = false;
_isAlwaysDestroyable = true;
pushReaction = 0;
destroyedByHand = false;
}
bool Material::isLiquid() { return false; }
bool Material::letsWaterThrough() { return (!isLiquid() && !isSolid()); }
bool Material::isSolid() { return true; }
bool Material::blocksLight() { return true; }
bool Material::blocksMotion() { return true; }
Material* Material::neverBuildable() {
this->_neverBuildable = true;
return this;
}
Material* Material::notAlwaysDestroyable() {
this->_isAlwaysDestroyable = false;
return this;
}
Material* Material::flammable() {
this->_flammable = true;
return this;
}
bool Material::isFlammable() { return _flammable; }
Material* Material::replaceable() {
this->_replaceable = true;
return this;
}
bool Material::isReplaceable() { return _replaceable; }
bool Material::isSolidBlocking() {
if (_neverBuildable) return false;
return blocksMotion();
}
bool Material::isAlwaysDestroyable() {
// i love amy is the best yuri yuri my wife yuri canon FUCKING KISS ALREADY yuri, yuri
// snuggle i love girls'kissing girls yuri
return _isAlwaysDestroyable;
}
int Material::getPushReaction() { return pushReaction; }
Material* Material::makeDestroyedByHand() {
this->destroyedByHand = true;
return this;
}
bool Material::isDestroyedByHand() { return destroyedByHand; }
Material* Material::destroyOnPush() {
pushReaction = PUSH_DESTROY;
return this;
}
Material* Material::notPushable() {
pushReaction = PUSH_BLOCK;
return this;
}