feat: official mappings & updated to FG 5.1+

This commit is contained in:
Michael Hillcox 2021-08-22 16:09:06 +01:00
parent 79e8791223
commit 518ee0b4c1
287 changed files with 2679 additions and 2562 deletions

View file

@ -1,11 +1,10 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' } maven { url = 'https://maven.minecraftforge.net' }
jcenter()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
} }
} }
@ -22,10 +21,10 @@ if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER') version += "." + System.getenv('BUILD_NUMBER')
} }
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' java.toolchain.languageVersion = JavaLanguageVersion.of(8)
minecraft { minecraft {
mappings channel: 'snapshot', version: "${mcp_mappings}" mappings channel: 'official', version: "${game_version}"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@ -57,7 +56,8 @@ minecraft {
workingDirectory project.file('run') workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug' property 'forge.logging.console.level', 'debug'
args '--mod', 'actuallyadditions', '--all', '--output', file('src/generated/resources/') args '--mod', 'actuallyadditions', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods { mods {
actuallyadditions { actuallyadditions {
source sourceSets.main source sourceSets.main
@ -67,9 +67,10 @@ minecraft {
} }
} }
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories { repositories {
maven { maven {
// JEI
name = "Progwml6 maven" name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/" url = "https://dvs1.progwml6.com/files/maven/"
} }
@ -102,7 +103,7 @@ processResources {
jar { jar {
group = 'artifact' group = 'artifact'
manifest { manifest {
attributes(["Specification-Title" : "BuildingGadgets", attributes(["Specification-Title" : "Actually Additions",
"Specification-Version" : "1", "Specification-Version" : "1",
"Implementation-Title" : project.archivesBaseName, "Implementation-Title" : project.archivesBaseName,
"Implementation-Version" : project.version, "Implementation-Version" : project.version,

View file

@ -3,7 +3,7 @@
mod_version=1.1.52 mod_version=1.1.52
# Forge # Forge
game_version=1.16.5 game_version=1.16.5
forge_version=36.0.43 forge_version=36.2.2
mcp_mappings=20201028-1.16.3
# Other mods # Other mods
jei_version=1.16.4:7.6.1.71 jei_version=1.16.4:7.6.1.71

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip

View file

@ -131,7 +131,7 @@ public final class ActuallyAdditionsAPI {
* @param outputTwoChance The chance of the second output (0 won't occur at all, 100 will all the time) * @param outputTwoChance The chance of the second output (0 won't occur at all, 100 will all the time)
*/ */
public static void addCrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance) { public static void addCrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance) {
CRUSHER_RECIPES.add(new CrusherRecipe(Ingredient.fromStacks(input), outputOne, outputTwo.isEmpty() CRUSHER_RECIPES.add(new CrusherRecipe(Ingredient.of(input), outputOne, outputTwo.isEmpty()
? ItemStack.EMPTY ? ItemStack.EMPTY
: outputTwo, outputTwoChance)); : outputTwo, outputTwoChance));
} }

View file

@ -12,7 +12,7 @@ public final class ActuallyTags {
public static final ITag.INamedTag<Item> TINY_COALS = tag("tiny_coals"); public static final ITag.INamedTag<Item> TINY_COALS = tag("tiny_coals");
private static ITag.INamedTag<Item> tag(String name) { private static ITag.INamedTag<Item> tag(String name) {
return ItemTags.makeWrapperTag(String.format("%s:%s", ActuallyAdditions.MODID, name)); return ItemTags.bind(String.format("%s:%s", ActuallyAdditions.MODID, name));
} }
} }
} }

View file

@ -23,7 +23,7 @@ public class CoffeeIngredient {
@Deprecated @Deprecated
public CoffeeIngredient(ItemStack input, EffectInstance[] effects, int maxAmplifier) { public CoffeeIngredient(ItemStack input, EffectInstance[] effects, int maxAmplifier) {
this(Ingredient.fromStacks(input), maxAmplifier, effects); this(Ingredient.of(input), maxAmplifier, effects);
} }
public CoffeeIngredient(Ingredient input, int maxAmplifier, EffectInstance... effects) { public CoffeeIngredient(Ingredient input, int maxAmplifier, EffectInstance... effects) {

View file

@ -24,8 +24,8 @@ public class ColorLensChangerByDyeMeta implements IColorLensChanger {
@Override @Override
public ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) { public ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) {
ItemStack newStack = stack.copy(); ItemStack newStack = stack.copy();
int meta = newStack.getDamage(); int meta = newStack.getDamageValue();
newStack.setDamage((meta + 1) % 16); newStack.setDamageValue((meta + 1) % 16);
return newStack; return newStack;
} }
} }

View file

@ -22,7 +22,7 @@ public class CrusherRecipe {
@Deprecated @Deprecated
public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputChance) { public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
this(Ingredient.fromStacks(input), outputOne, outputTwo, outputChance); this(Ingredient.of(input), outputOne, outputTwo, outputChance);
} }
public CrusherRecipe(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputChance) { public CrusherRecipe(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {

View file

@ -32,7 +32,7 @@ public class EmpowererRecipe {
@Deprecated @Deprecated
public EmpowererRecipe(ItemStack input, ItemStack output, ItemStack modifier1, ItemStack modifier2, ItemStack modifier3, ItemStack modifier4, int energyPerStand, int time, float[] particleColor) { public EmpowererRecipe(ItemStack input, ItemStack output, ItemStack modifier1, ItemStack modifier2, ItemStack modifier3, ItemStack modifier4, int energyPerStand, int time, float[] particleColor) {
this(Ingredient.fromStacks(input), output, Ingredient.fromStacks(modifier1), Ingredient.fromStacks(modifier2), Ingredient.fromStacks(modifier3), Ingredient.fromStacks(modifier4), energyPerStand, time, particleColor); this(Ingredient.of(input), output, Ingredient.of(modifier1), Ingredient.of(modifier2), Ingredient.of(modifier3), Ingredient.of(modifier4), energyPerStand, time, particleColor);
} }
public EmpowererRecipe(Ingredient input, ItemStack output, Ingredient modifier1, Ingredient modifier2, Ingredient modifier3, Ingredient modifier4, int energyPerStand, int time, float[] particleColor) { public EmpowererRecipe(Ingredient input, ItemStack output, Ingredient modifier1, Ingredient modifier2, Ingredient modifier3, Ingredient modifier4, int energyPerStand, int time, float[] particleColor) {

View file

@ -26,7 +26,7 @@ public class LensConversionRecipe {
@Deprecated @Deprecated
public LensConversionRecipe(ItemStack input, ItemStack output, int energy, Lens type) { public LensConversionRecipe(ItemStack input, ItemStack output, int energy, Lens type) {
this(Ingredient.fromStacks(input), output, energy, type); this(Ingredient.of(input), output, energy, type);
} }
public LensConversionRecipe(Ingredient input, ItemStack output, int energy, Lens type) { public LensConversionRecipe(Ingredient input, ItemStack output, int energy, Lens type) {

View file

@ -21,68 +21,68 @@ public class BlockRecipeGenerator extends RecipeProvider {
} }
@Override @Override
protected void registerRecipes(Consumer<IFinishedRecipe> consumer) { protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
//Battery Box //Battery Box
Recipe.shapeless(ActuallyBlocks.BATTERY_BOX.get()).ingredients(ActuallyBlocks.ENERGIZER.get(), ActuallyBlocks.ENERVATOR.get(), ActuallyItems.COIL.get()).build(consumer); Recipe.shapeless(ActuallyBlocks.BATTERY_BOX.get()).ingredients(ActuallyBlocks.ENERGIZER.get(), ActuallyBlocks.ENERVATOR.get(), ActuallyItems.COIL.get()).save(consumer);
//Farmer //Farmer
Recipe.shaped(ActuallyBlocks.FARMER.get()) Recipe.shaped(ActuallyBlocks.FARMER.get())
.pattern("ISI", "SCS", "ISI") .pattern("ISI", "SCS", "ISI")
.key('I', ActuallyBlocks.CRYSTAL_ENORI.get()) .define('I', ActuallyBlocks.CRYSTAL_ENORI.get())
.key('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.key('S', Tags.Items.SEEDS) .define('S', Tags.Items.SEEDS)
.build(consumer); .save(consumer);
//Empowerer //Empowerer
Recipe.shaped(ActuallyBlocks.EMPOWERER.get()) Recipe.shaped(ActuallyBlocks.EMPOWERER.get())
.pattern(" R ", " B ", "CDC") .pattern(" R ", " B ", "CDC")
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get()) .define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
.key('B', ActuallyItems.BATTERY_DOUBLE.get()) .define('B', ActuallyItems.BATTERY_DOUBLE.get())
.key('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.key('D', ActuallyBlocks.DISPLAY_STAND.get()) .define('D', ActuallyBlocks.DISPLAY_STAND.get())
.build(consumer); .save(consumer);
//Tiny Torch //Tiny Torch
Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2) Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2)
.pattern("C", "S") .pattern("C", "S")
.key('C', ActuallyTags.Items.TINY_COALS) .define('C', ActuallyTags.Items.TINY_COALS)
.key('S', Tags.Items.RODS_WOODEN) .define('S', Tags.Items.RODS_WOODEN)
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch")); .save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
//Fireworks Box //Fireworks Box
Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get()) Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get())
.pattern("GFG", "SAS", "CCC") .pattern("GFG", "SAS", "CCC")
.key('G', Tags.Items.GUNPOWDER) .define('G', Tags.Items.GUNPOWDER)
.key('S', Tags.Items.RODS_WOODEN) .define('S', Tags.Items.RODS_WOODEN)
.key('A', ActuallyBlocks.IRON_CASING.get()) .define('A', ActuallyBlocks.IRON_CASING.get())
.key('F', Items.FIREWORK_ROCKET) .define('F', Items.FIREWORK_ROCKET)
.key('C', ActuallyItems.ENORI_CRYSTAL.get()) .define('C', ActuallyItems.ENORI_CRYSTAL.get())
.build(consumer); .save(consumer);
//Shock Suppressor //Shock Suppressor
Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get()) Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get())
.pattern("OAO", "ACA", "OAO") .pattern("OAO", "ACA", "OAO")
.key('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get()) .define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.key('O', Tags.Items.OBSIDIAN) .define('O', Tags.Items.OBSIDIAN)
.key('C', ActuallyItems.COIL_ADVANCED.get()) .define('C', ActuallyItems.COIL_ADVANCED.get())
.build(consumer); .save(consumer);
//Display Stand //Display Stand
Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get()) Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get())
.pattern(" R ", "EEE", "GGG") .pattern(" R ", "EEE", "GGG")
.key('R', ActuallyItems.COIL_ADVANCED.get()) .define('R', ActuallyItems.COIL_ADVANCED.get())
.key('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get()) .define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
.key('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get()) .define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
.build(consumer); .save(consumer);
//Vertical Digger //Vertical Digger
Recipe.shaped(ActuallyBlocks.MINER.get()) Recipe.shaped(ActuallyBlocks.MINER.get())
.pattern("IRI", "RCR", "IDI") .pattern("IRI", "RCR", "IDI")
.key('R', Tags.Items.STORAGE_BLOCKS_REDSTONE) .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
.key('I', ActuallyBlocks.IRON_CASING.get()) .define('I', ActuallyBlocks.IRON_CASING.get())
.key('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get()) .define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
.key('D', ActuallyItems.DRILL.get()) .define('D', ActuallyItems.DRILL.get())
.build(consumer); .save(consumer);
//Black Quartz Wall //Black Quartz Wall
Recipe.wall(ActuallyBlocks.BLACK_QUARTZ_WALL.get(), ActuallyBlocks.BLACK_QUARTZ_PILLAR_BLOCK.get(), consumer); Recipe.wall(ActuallyBlocks.BLACK_QUARTZ_WALL.get(), ActuallyBlocks.BLACK_QUARTZ_PILLAR_BLOCK.get(), consumer);
@ -132,14 +132,14 @@ public class BlockRecipeGenerator extends RecipeProvider {
// Atomic Reconstructor // Atomic Reconstructor
Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get()) Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())
.pattern("IRI", "RCR", "IRI") .pattern("IRI", "RCR", "IRI")
.key('R', Tags.Items.DUSTS_REDSTONE) .define('R', Tags.Items.DUSTS_REDSTONE)
.key('I', Tags.Items.INGOTS_IRON) .define('I', Tags.Items.INGOTS_IRON)
.key('C', ActuallyBlocks.IRON_CASING.get()) .define('C', ActuallyBlocks.IRON_CASING.get())
.build(consumer); .save(consumer);
} }
@Override @Override
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) { protected void saveAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
//Nope... //Nope...
} }
@ -161,15 +161,15 @@ public class BlockRecipeGenerator extends RecipeProvider {
} }
public static void stairs(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) { public static void stairs(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) {
Recipe.shaped(result).patternSingleKey('Q', resource, "Q ", "QQ ", "QQQ").build(consumer); Recipe.shaped(result).patternSingleKey('Q', resource, "Q ", "QQ ", "QQQ").save(consumer);
} }
public static void wall(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) { public static void wall(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) {
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ", "QQQ").build(consumer); Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ", "QQQ").save(consumer);
} }
public static void slab(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) { public static void slab(IItemProvider result, IItemProvider resource, Consumer<IFinishedRecipe> consumer) {
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").build(consumer); Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").save(consumer);
} }
private static class Shapeless extends ShapelessRecipeBuilder { private static class Shapeless extends ShapelessRecipeBuilder {
@ -182,20 +182,20 @@ public class BlockRecipeGenerator extends RecipeProvider {
} }
public Shapeless ingredients(IItemProvider... ingredients) { public Shapeless ingredients(IItemProvider... ingredients) {
Arrays.asList(ingredients).forEach(this::addIngredient); Arrays.asList(ingredients).forEach(this::requires);
return this; return this;
} }
@Override @Override
public void build(Consumer<IFinishedRecipe> consumer) { public void save(Consumer<IFinishedRecipe> consumer) {
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get())); this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
super.build(consumer); super.save(consumer);
} }
@Override @Override
public void build(Consumer<IFinishedRecipe> consumer, ResourceLocation location) { public void save(Consumer<IFinishedRecipe> consumer, ResourceLocation location) {
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get())); this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
super.build(consumer, location); super.save(consumer, location);
} }
} }
@ -209,37 +209,37 @@ public class BlockRecipeGenerator extends RecipeProvider {
} }
public Shaped pattern(String line1, String line2, String line3) { public Shaped pattern(String line1, String line2, String line3) {
this.patternLine(line1); this.pattern(line1);
this.patternLine(line2); this.pattern(line2);
this.patternLine(line3); this.pattern(line3);
return this; return this;
} }
public Shaped pattern(String line1, String line2) { public Shaped pattern(String line1, String line2) {
this.patternLine(line1); this.pattern(line1);
this.patternLine(line2); this.pattern(line2);
return this; return this;
} }
public Shaped patternSingleKey(char key, IItemProvider resource, String... lines) { public Shaped patternSingleKey(char key, IItemProvider resource, String... lines) {
this.key(key, resource); this.define(key, resource);
for (String line : lines) { for (String line : lines) {
this.patternLine(line); this.pattern(line);
} }
return this; return this;
} }
@Override @Override
public void build(Consumer<IFinishedRecipe> consumerIn) { public void save(Consumer<IFinishedRecipe> consumerIn) {
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get())); this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
super.build(consumerIn); super.save(consumerIn);
} }
@Override @Override
public void build(Consumer<IFinishedRecipe> consumerIn, ResourceLocation id) { public void save(Consumer<IFinishedRecipe> consumerIn, ResourceLocation id) {
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get())); this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
super.build(consumerIn, id); super.save(consumerIn, id);
} }
} }
} }

View file

@ -15,7 +15,7 @@ public class BlockTagsGenerator extends BlockTagsProvider {
} }
@Override @Override
public void registerTags() { public void addTags() {
// getOrCreateBuilder(BlockTags.WALLS).add( // getOrCreateBuilder(BlockTags.WALLS).add(
// ActuallyBlocks.WHITE_WALL.get(), // ActuallyBlocks.WHITE_WALL.get(),
// ActuallyBlocks.GREEN_WALL.get(), // ActuallyBlocks.GREEN_WALL.get(),
@ -31,7 +31,7 @@ public class BlockTagsGenerator extends BlockTagsProvider {
* Resolves a Path for the location to save the given tag. * Resolves a Path for the location to save the given tag.
*/ */
@Override @Override
protected Path makePath(ResourceLocation id) { protected Path getPath(ResourceLocation id) {
return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json"); return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json");
} }

View file

@ -15,12 +15,12 @@ public class ItemRecipeGenerator extends RecipeProvider {
} }
@Override @Override
protected void registerRecipes(Consumer<IFinishedRecipe> consumer) { protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
super.registerRecipes(consumer); super.buildShapelessRecipes(consumer);
} }
@Override @Override
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) { protected void saveAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
//Nope... //Nope...
} }
} }

View file

@ -16,10 +16,10 @@ public class ItemTagsGenerator extends ItemTagsProvider {
} }
@Override @Override
protected void registerTags() { protected void addTags() {
this.getOrCreateBuilder(ActuallyTags.Items.COFFEE_BEANS) this.tag(ActuallyTags.Items.COFFEE_BEANS)
.add(ActuallyItems.COFFEE_BEANS.get()); .add(ActuallyItems.COFFEE_BEANS.get());
this.getOrCreateBuilder(ActuallyTags.Items.TINY_COALS) this.tag(ActuallyTags.Items.TINY_COALS)
.add(ActuallyItems.TINY_COAL.get()) .add(ActuallyItems.TINY_COAL.get())
.add(ActuallyItems.TINY_CHARCOAL.get()); .add(ActuallyItems.TINY_CHARCOAL.get());
// getOrCreateBuilder(ActuallyTags.Items.DRILLS).add( // getOrCreateBuilder(ActuallyTags.Items.DRILLS).add(

View file

@ -65,7 +65,7 @@ public class ActuallyAdditions {
public static final ItemGroup GROUP = new ItemGroup(MODID) { public static final ItemGroup GROUP = new ItemGroup(MODID) {
@Override @Override
public ItemStack createIcon() { public ItemStack makeIcon() {
return new ItemStack(ActuallyItems.ITEM_BOOKLET.get()); return new ItemStack(ActuallyItems.ITEM_BOOKLET.get());
} }
}; };

View file

@ -30,32 +30,32 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
public class ActuallyAdditionsClient { public class ActuallyAdditionsClient {
public static void setup() { public static void setup() {
ScreenManager.registerFactory(ActuallyContainers.BAG_CONTAINER.get(), GuiBag::new); ScreenManager.register(ActuallyContainers.BAG_CONTAINER.get(), GuiBag::new);
ScreenManager.registerFactory(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new); ScreenManager.register(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new);
ScreenManager.registerFactory(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new); ScreenManager.register(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new);
ScreenManager.registerFactory(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new); ScreenManager.register(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new);
ScreenManager.registerFactory(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new); ScreenManager.register(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new);
ScreenManager.registerFactory(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new); ScreenManager.register(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new);
ScreenManager.registerFactory(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new); ScreenManager.register(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new);
ScreenManager.registerFactory(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new); ScreenManager.register(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new);
ScreenManager.registerFactory(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new); ScreenManager.register(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new);
ScreenManager.registerFactory(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new); ScreenManager.register(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new);
ScreenManager.registerFactory(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new); ScreenManager.register(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new);
ScreenManager.registerFactory(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new); ScreenManager.register(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new);
ScreenManager.registerFactory(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new); ScreenManager.register(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new);
ScreenManager.registerFactory(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new); ScreenManager.register(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new);
ScreenManager.registerFactory(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new); ScreenManager.register(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new);
ScreenManager.registerFactory(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new); ScreenManager.register(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new);
ScreenManager.registerFactory(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new); ScreenManager.register(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new);
ScreenManager.registerFactory(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new); ScreenManager.register(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new);
ScreenManager.registerFactory(ActuallyContainers.GRINDER_CONTAINER.get(), GuiGrinder::new); ScreenManager.register(ActuallyContainers.GRINDER_CONTAINER.get(), GuiGrinder::new);
ScreenManager.registerFactory(ActuallyContainers.INPUTTER_CONTAINER.get(), GuiInputter::new); ScreenManager.register(ActuallyContainers.INPUTTER_CONTAINER.get(), GuiInputter::new);
ScreenManager.registerFactory(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new); ScreenManager.register(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new);
ScreenManager.registerFactory(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new); ScreenManager.register(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new);
ScreenManager.registerFactory(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new); ScreenManager.register(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new);
ScreenManager.registerFactory(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new); ScreenManager.register(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new);
ScreenManager.registerFactory(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new); ScreenManager.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new);
ScreenManager.registerFactory(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new); ScreenManager.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new);
// From old proxy // From old proxy
InitEntities.initClient(); InitEntities.initClient();
MinecraftForge.EVENT_BUS.register(new ClientEvents()); MinecraftForge.EVENT_BUS.register(new ClientEvents());
@ -85,7 +85,7 @@ public class ActuallyAdditionsClient {
public void sendBreakPacket(BlockPos pos) { public void sendBreakPacket(BlockPos pos) {
ClientPlayNetHandler connection = Minecraft.getInstance().getConnection(); ClientPlayNetHandler connection = Minecraft.getInstance().getConnection();
assert connection != null; assert connection != null;
assert Minecraft.getInstance().objectMouseOver != null; assert Minecraft.getInstance().hitResult != null;
connection.sendPacket(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().objectMouseOver).getFace())); connection.send(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().hitResult).getDirection()));
} }
} }

View file

@ -24,7 +24,7 @@ import net.minecraftforge.registries.ForgeRegistries;
public final class ActuallyBlocks { public final class ActuallyBlocks {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.create(Material.ROCK).harvestLevel(1).harvestTool(ToolType.PICKAXE).hardnessAndResistance(1.5f, 10f); public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.of(Material.STONE).harvestLevel(1).harvestTool(ToolType.PICKAXE).strength(1.5f, 10f);
@Deprecated @Deprecated
public static final RegistryObject<Block> blockMisc = BLOCKS.register("misc", () -> new Block(miscBlockProperties)); // TODO this isnt a real block? public static final RegistryObject<Block> blockMisc = BLOCKS.register("misc", () -> new Block(miscBlockProperties)); // TODO this isnt a real block?
public static final RegistryObject<Block> WOOD_CASING = BLOCKS.register("wood_casing", () -> new Block(miscBlockProperties)); public static final RegistryObject<Block> WOOD_CASING = BLOCKS.register("wood_casing", () -> new Block(miscBlockProperties));
@ -67,12 +67,12 @@ public final class ActuallyBlocks {
public static final RegistryObject<Block> XP_SOLIDIFIER = BLOCKS.register("xp_solidifier", BlockXPSolidifier::new); public static final RegistryObject<Block> XP_SOLIDIFIER = BLOCKS.register("xp_solidifier", BlockXPSolidifier::new);
public static final RegistryObject<Block> ETHETIC_GREEN_BLOCK = BLOCKS.register("ethetic_green_block", BlockGeneric::new); public static final RegistryObject<Block> ETHETIC_GREEN_BLOCK = BLOCKS.register("ethetic_green_block", BlockGeneric::new);
public static final RegistryObject<Block> ETHETIC_WHITE_BLOCK = BLOCKS.register("ethetic_white_block", BlockGeneric::new); public static final RegistryObject<Block> ETHETIC_WHITE_BLOCK = BLOCKS.register("ethetic_white_block", BlockGeneric::new);
public static final RegistryObject<Block> ETHETIC_GREEN_STAIRS = BLOCKS.register("ethetic_green_stairs", () -> new StairsBlock(() -> ETHETIC_GREEN_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_GREEN_STAIRS = BLOCKS.register("ethetic_green_stairs", () -> new StairsBlock(() -> ETHETIC_GREEN_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())));
public static final RegistryObject<Block> ETHETIC_WHITE_STAIRS = BLOCKS.register("ethetic_white_stairs", () -> new StairsBlock(() -> ETHETIC_WHITE_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_WHITE_STAIRS = BLOCKS.register("ethetic_white_stairs", () -> new StairsBlock(() -> ETHETIC_WHITE_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())));
public static final RegistryObject<Block> ETHETIC_GREEN_SLAB = BLOCKS.register("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_GREEN_SLAB = BLOCKS.register("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())));
public static final RegistryObject<Block> ETHETIC_WHITE_SLAB = BLOCKS.register("ethetic_white_slab", () -> new SlabBlock(AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_WHITE_SLAB = BLOCKS.register("ethetic_white_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())));
public static final RegistryObject<Block> ETHETIC_GREEN_WALL = BLOCKS.register("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_GREEN_WALL = BLOCKS.register("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())));
public static final RegistryObject<Block> ETHETIC_WHITE_WALL = BLOCKS.register("ethetic_white_wall", () -> new WallBlock(AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get()))); public static final RegistryObject<Block> ETHETIC_WHITE_WALL = BLOCKS.register("ethetic_white_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())));
public static final RegistryObject<Block> CRYSTAL_ENORI = BLOCKS.register("crystal_enori_block", () -> new BlockCrystal(false)); public static final RegistryObject<Block> CRYSTAL_ENORI = BLOCKS.register("crystal_enori_block", () -> new BlockCrystal(false));
public static final RegistryObject<Block> CRYSTAL_RESTONIA = BLOCKS.register("crystal_restonia_block", () -> new BlockCrystal(false)); public static final RegistryObject<Block> CRYSTAL_RESTONIA = BLOCKS.register("crystal_restonia_block", () -> new BlockCrystal(false));
@ -142,21 +142,21 @@ public final class ActuallyBlocks {
public static final RegistryObject<Block> BLACK_QUARTZ_BLOCK = BLOCKS.register("black_quartz_block", BlockGeneric::new); public static final RegistryObject<Block> BLACK_QUARTZ_BLOCK = BLOCKS.register("black_quartz_block", BlockGeneric::new);
public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_BLOCK = BLOCKS.register("black_quartz_pillar_block", BlockGeneric::new); public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_BLOCK = BLOCKS.register("black_quartz_pillar_block", BlockGeneric::new);
public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_BLOCK = BLOCKS.register("chiseled_black_quartz_block", BlockGeneric::new); public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_BLOCK = BLOCKS.register("chiseled_black_quartz_block", BlockGeneric::new);
public static final RegistryObject<Block> BLACK_QUARTZ_WALL = BLOCKS.register("black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_WALL = BLOCKS.register("black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_WALL = BLOCKS.register("chiseled_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_WALL = BLOCKS.register("chiseled_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_WALL = BLOCKS.register("black_quartz_pillar_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_WALL = BLOCKS.register("black_quartz_pillar_wall", () -> new WallBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> BLACK_QUARTZ_STAIR = BLOCKS.register("black_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_STAIR = BLOCKS.register("black_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().defaultBlockState(), AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_STAIR = BLOCKS.register("chiseled_black_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_STAIR = BLOCKS.register("chiseled_black_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().defaultBlockState(), AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_STAIR = BLOCKS.register("black_quartz_pillar_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_STAIR = BLOCKS.register("black_quartz_pillar_stair", () -> new StairsBlock(() -> blockMisc.get().defaultBlockState(), AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> BLACK_QUARTZ_SLAB = BLOCKS.register("black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_SLAB = BLOCKS.register("black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_SLAB = BLOCKS.register("chiseled_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> CHISELED_BLACK_QUARTZ_SLAB = BLOCKS.register("chiseled_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_SLAB = BLOCKS.register("black_quartz_pillar_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject<Block> BLACK_QUARTZ_PILLAR_SLAB = BLOCKS.register("black_quartz_pillar_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(blockMisc.get())));
public static AbstractBlock.Properties defaultPickProps(int harvestLevel, float hardness, float resistance) { public static AbstractBlock.Properties defaultPickProps(int harvestLevel, float hardness, float resistance) {
return AbstractBlock.Properties.create(Material.ROCK).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).hardnessAndResistance(hardness, resistance).sound(SoundType.STONE); return AbstractBlock.Properties.of(Material.STONE).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).strength(hardness, resistance).sound(SoundType.STONE);
} }
public static AbstractBlock.Properties defaultPickProps(int harvestLevel) { public static AbstractBlock.Properties defaultPickProps(int harvestLevel) {
return AbstractBlock.Properties.create(Material.ROCK).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).hardnessAndResistance(1.5F, 10.0F).sound(SoundType.STONE); return AbstractBlock.Properties.of(Material.STONE).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).strength(1.5F, 10.0F).sound(SoundType.STONE);
} }
} }

View file

@ -55,13 +55,13 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack heldItem = player.getHeldItem(hand); ItemStack heldItem = player.getItemInHand(hand);
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getTileEntity(pos); TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getBlockEntity(pos);
if (reconstructor != null) { if (reconstructor != null) {
if (StackUtil.isValid(heldItem)) { if (StackUtil.isValid(heldItem)) {
Item item = heldItem.getItem(); Item item = heldItem.getItem();
@ -69,17 +69,17 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
ItemStack toPut = heldItem.copy(); ItemStack toPut = heldItem.copy();
toPut.setCount(1); toPut.setCount(1);
reconstructor.inv.setStackInSlot(0, toPut); reconstructor.inv.setStackInSlot(0, toPut);
player.inventory.decrStackSize(player.inventory.currentItem, 1); player.inventory.removeItem(player.inventory.selected, 1);
} }
//Shush, don't tell anyone! //Shush, don't tell anyone!
else if (ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.MUSIC_DISC_11) { else if (ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.MUSIC_DISC_11) {
reconstructor.counter++; reconstructor.counter++;
reconstructor.markDirty(); reconstructor.setChanged();
} }
} else { } else {
ItemStack slot = reconstructor.inv.getStackInSlot(0); ItemStack slot = reconstructor.inv.getStackInSlot(0);
if (StackUtil.isValid(slot)) { if (StackUtil.isValid(slot)) {
player.setHeldItem(hand, slot.copy()); player.setItemInHand(hand, slot.copy());
reconstructor.inv.setStackInSlot(0, StackUtil.getEmpty()); reconstructor.inv.setStackInSlot(0, StackUtil.getEmpty());
} }
} }
@ -90,7 +90,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityAtomicReconstructor(); return new TileEntityAtomicReconstructor();
} }
@ -101,22 +101,22 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
if (!(rayCast instanceof BlockRayTraceResult) || minecraft.world == null) { if (!(rayCast instanceof BlockRayTraceResult) || minecraft.level == null) {
return; return;
} }
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
if (tile instanceof TileEntityAtomicReconstructor) { if (tile instanceof TileEntityAtomicReconstructor) {
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0); ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
ITextComponent strg; ITextComponent strg;
if (!StackUtil.isValid(slot)) { if (!StackUtil.isValid(slot)) {
strg = Lang.trans("info", "nolens"); strg = Lang.trans("info", "nolens");
} else { } else {
strg = slot.getItem().getDisplayName(slot); strg = slot.getItem().getName(slot);
AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 19, 1F); AssetUtil.renderStackToGui(slot, resolution.getGuiScaledWidth() / 2 + 15, resolution.getGuiScaledHeight() / 2 - 19, 1F);
} }
minecraft.fontRenderer.drawStringWithShadow(matrices, strg.copyRaw().mergeStyle(TextFormatting.YELLOW).mergeStyle(TextFormatting.ITALIC).getString(), resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2f - 15, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, strg.plainCopy().withStyle(TextFormatting.YELLOW).withStyle(TextFormatting.ITALIC).getString(), resolution.getGuiScaledWidth() / 2 + 35, resolution.getGuiScaledHeight() / 2f - 15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
@ -159,13 +159,13 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
// } // }
@Override @Override
public boolean hasComparatorInputOverride(BlockState state) { public boolean hasAnalogOutputSignal(BlockState state) {
return true; return true;
} }
@Override @Override
public int getComparatorInputOverride(BlockState blockState, World world, BlockPos pos) { public int getAnalogOutputSignal(BlockState blockState, World world, BlockPos pos) {
TileEntity t = world.getTileEntity(pos); TileEntity t = world.getBlockEntity(pos);
int i = 0; int i = 0;
if (t instanceof TileEntityAtomicReconstructor) { if (t instanceof TileEntityAtomicReconstructor) {
i = ((TileEntityAtomicReconstructor) t).getEnergy(); i = ((TileEntityAtomicReconstructor) t).getEnergy();

View file

@ -40,27 +40,27 @@ public class BlockBatteryBox extends BlockContainerBase {
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityBatteryBox(); return new TileEntityBatteryBox();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBatteryBox) { if (tile instanceof TileEntityBatteryBox) {
TileEntityBatteryBox box = (TileEntityBatteryBox) tile; TileEntityBatteryBox box = (TileEntityBatteryBox) tile;
ItemStack stack = player.getHeldItem(hand); ItemStack stack = player.getItemInHand(hand);
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) { if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) {
box.inv.setStackInSlot(0, stack.copy()); box.inv.setStackInSlot(0, stack.copy());
player.setHeldItem(hand, StackUtil.getEmpty()); player.setItemInHand(hand, StackUtil.getEmpty());
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }
} else { } else {
ItemStack inSlot = box.inv.getStackInSlot(0); ItemStack inSlot = box.inv.getStackInSlot(0);
if (StackUtil.isValid(inSlot)) { if (StackUtil.isValid(inSlot)) {
player.setHeldItem(hand, inSlot.copy()); player.setItemInHand(hand, inSlot.copy());
box.inv.setStackInSlot(0, StackUtil.getEmpty()); box.inv.setStackInSlot(0, StackUtil.getEmpty());
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }

View file

@ -29,12 +29,12 @@ public class BlockBioReactor extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityBioReactor(); return new TileEntityBioReactor();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
return this.openGui(world, player, pos, TileEntityBioReactor.class); return this.openGui(world, player, pos, TileEntityBioReactor.class);
} }
} }

View file

@ -36,14 +36,14 @@ public class BlockBreaker extends FullyDirectionalBlock.Container {
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader world) { public TileEntity newBlockEntity(IBlockReader world) {
return this.isPlacer return this.isPlacer
? new TileEntityPlacer() ? new TileEntityPlacer()
: new TileEntityBreaker(); : new TileEntityBreaker();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }

View file

@ -41,14 +41,14 @@ public class BlockCanolaPress extends BlockContainerBase {
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader world) { public TileEntity newBlockEntity(IBlockReader world) {
return new TileEntityCanolaPress(); return new TileEntityCanolaPress();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityCanolaPress tile = (TileEntityCanolaPress) world.getTileEntity(pos); TileEntityCanolaPress tile = (TileEntityCanolaPress) world.getBlockEntity(pos);
if (tile != null) { if (tile != null) {
if (!this.tryUseItemOnTank(player, hand, tile.tank)) { if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos); NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
@ -56,7 +56,7 @@ public class BlockCanolaPress extends BlockContainerBase {
} }
return ActionResultType.PASS; return ActionResultType.PASS;
} }
return super.onBlockActivated(state, world, pos, player, hand, hit); return super.use(state, world, pos, player, hand, hit);
} }
@Override @Override

View file

@ -30,17 +30,17 @@ import java.util.Random;
public class BlockCoalGenerator extends DirectionalBlock.Container { public class BlockCoalGenerator extends DirectionalBlock.Container {
public BlockCoalGenerator() { public BlockCoalGenerator() {
super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); super(ActuallyBlocks.defaultPickProps(0).randomTicks());
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityCoalGenerator(); return new TileEntityCoalGenerator();
} }
@Override @Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityCoalGenerator) { if (tile instanceof TileEntityCoalGenerator) {
if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) { if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) {
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
@ -51,13 +51,13 @@ public class BlockCoalGenerator extends DirectionalBlock.Container {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
return this.openGui(world, player, pos, TileEntityCoalGenerator.class); return this.openGui(world, player, pos, TileEntityCoalGenerator.class);
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.CoalGeneratorShapes.EAST; return Shapes.CoalGeneratorShapes.EAST;
case SOUTH: case SOUTH:

View file

@ -34,9 +34,9 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getTileEntity(pos); TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos);
if (tile != null) { if (tile != null) {
if (!this.tryUseItemOnTank(player, hand, tile.tank)) { if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos); NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
@ -44,18 +44,18 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
} }
return ActionResultType.PASS; return ActionResultType.PASS;
} }
return super.onBlockActivated(state, world, pos, player, hand, hit); return super.use(state, world, pos, player, hand, hit);
} }
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityCoffeeMachine(); return new TileEntityCoffeeMachine();
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.CoffeeMachineShapes.EAST; return Shapes.CoffeeMachineShapes.EAST;
case SOUTH: case SOUTH:

View file

@ -34,6 +34,8 @@ import net.minecraftforge.common.util.Constants;
import java.util.HashMap; import java.util.HashMap;
import java.util.function.Supplier; import java.util.function.Supplier;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockColoredLamp extends BlockBase { public class BlockColoredLamp extends BlockBase {
private static final HashMap<DyeColor, Supplier<Block>> COLOR_TO_LAMP = new HashMap<DyeColor, Supplier<Block>>() {{ private static final HashMap<DyeColor, Supplier<Block>> COLOR_TO_LAMP = new HashMap<DyeColor, Supplier<Block>>() {{
this.put(DyeColor.WHITE, ActuallyBlocks.LAMP_WHITE); this.put(DyeColor.WHITE, ActuallyBlocks.LAMP_WHITE);
@ -57,22 +59,22 @@ public class BlockColoredLamp extends BlockBase {
private static final BooleanProperty LIT = BlockStateProperties.LIT; private static final BooleanProperty LIT = BlockStateProperties.LIT;
public BlockColoredLamp() { public BlockColoredLamp() {
super(Properties.create(Material.REDSTONE_LIGHT).hardnessAndResistance(0.5F, 3.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)); super(Properties.of(Material.BUILDABLE_GLASS).strength(0.5F, 3.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0));
this.setDefaultState(this.stateContainer.getBaseState().with(LIT, false)); this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false));
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(LIT); builder.add(LIT);
} }
// TODO: [port][test] validate this rework works // TODO: [port][test] validate this rework works
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand); ItemStack stack = player.getItemInHand(hand);
//Turning On //Turning On
if (hand == Hand.MAIN_HAND && stack.isEmpty()) { if (hand == Hand.MAIN_HAND && stack.isEmpty()) {
world.setBlockState(pos, this.getDefaultState().with(LIT, !state.get(LIT)), Constants.BlockFlags.NO_RERENDER); world.setBlock(pos, this.defaultBlockState().setValue(LIT, !state.getValue(LIT)), Constants.BlockFlags.NO_RERENDER);
return ActionResultType.PASS; return ActionResultType.PASS;
} }
@ -83,19 +85,19 @@ public class BlockColoredLamp extends BlockBase {
} }
Block newColor = COLOR_TO_LAMP.get(color).get(); Block newColor = COLOR_TO_LAMP.get(color).get();
if (!world.isRemote) { if (!world.isClientSide) {
world.setBlockState(pos, newColor.getDefaultState().with(LIT, state.get(LIT)), 2); world.setBlock(pos, newColor.defaultBlockState().setValue(LIT, state.getValue(LIT)), 2);
if (!player.isCreative()) { if (!player.isCreative()) {
player.inventory.decrStackSize(player.inventory.currentItem, 1); player.inventory.removeItem(player.inventory.selected, 1);
} }
} }
} }
return super.onBlockActivated(state, world, pos, player, hand, hit); return super.use(state, world, pos, player, hand, hit);
} }
@Override @Override
public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) {
return state.get(LIT) return state.getValue(LIT)
? 15 ? 15
: 0; : 0;
} }

View file

@ -20,12 +20,14 @@ import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockCrystalCluster extends FullyDirectionalBlock { public class BlockCrystalCluster extends FullyDirectionalBlock {
private final TheCrystals crystal; private final TheCrystals crystal;
public BlockCrystalCluster(TheCrystals crystal) { public BlockCrystalCluster(TheCrystals crystal) {
super(Properties.create(Material.GLASS).hardnessAndResistance(0.25F, 1.0F).sound(SoundType.GLASS).setLightLevel(state -> 7)); super(Properties.of(Material.GLASS).strength(0.25F, 1.0F).sound(SoundType.GLASS).lightLevel(state -> 7));
this.crystal = crystal; this.crystal = crystal;
// this.setLightOpacity(1); // this.setLightOpacity(1);

View file

@ -31,12 +31,12 @@ public class BlockDirectionalBreaker extends FullyDirectionalBlock.Container {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityDirectionalBreaker(); return new TileEntityDirectionalBreaker();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
@ -46,7 +46,7 @@ public class BlockDirectionalBreaker extends FullyDirectionalBlock.Container {
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case UP: case UP:
return Shapes.DirectionalBlockBreakerShapes.SHAPE_U; return Shapes.DirectionalBlockBreakerShapes.SHAPE_U;
case DOWN: case DOWN:

View file

@ -37,15 +37,15 @@ public class BlockDisplayStand extends BlockContainerBase {
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityDisplayStand(); return new TileEntityDisplayStand();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack heldItem = player.getHeldItem(hand); ItemStack heldItem = player.getItemInHand(hand);
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityDisplayStand stand = (TileEntityDisplayStand) world.getTileEntity(pos); TileEntityDisplayStand stand = (TileEntityDisplayStand) world.getBlockEntity(pos);
if (stand != null) { if (stand != null) {
ItemStack display = stand.inv.getStackInSlot(0); ItemStack display = stand.inv.getStackInSlot(0);
if (StackUtil.isValid(heldItem)) { if (StackUtil.isValid(heldItem)) {
@ -69,7 +69,7 @@ public class BlockDisplayStand extends BlockContainerBase {
} }
} else { } else {
if (StackUtil.isValid(display)) { if (StackUtil.isValid(display)) {
player.setHeldItem(hand, display.copy()); player.setItemInHand(hand, display.copy());
stand.inv.setStackInSlot(0, StackUtil.getEmpty()); stand.inv.setStackInSlot(0, StackUtil.getEmpty());
return ActionResultType.PASS; return ActionResultType.PASS;
} }

View file

@ -29,12 +29,12 @@ public class BlockDropper extends FullyDirectionalBlock.Container {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityDropper(); return new TileEntityDropper();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }

View file

@ -36,15 +36,15 @@ public class BlockEmpowerer extends BlockContainerBase {
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityEmpowerer(); return new TileEntityEmpowerer();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack heldItem = player.getHeldItem(hand); ItemStack heldItem = player.getItemInHand(hand);
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityEmpowerer empowerer = (TileEntityEmpowerer) world.getTileEntity(pos); TileEntityEmpowerer empowerer = (TileEntityEmpowerer) world.getBlockEntity(pos);
if (empowerer != null) { if (empowerer != null) {
ItemStack stackThere = empowerer.inv.getStackInSlot(0); ItemStack stackThere = empowerer.inv.getStackInSlot(0);
if (StackUtil.isValid(heldItem)) { if (StackUtil.isValid(heldItem)) {
@ -59,7 +59,7 @@ public class BlockEmpowerer extends BlockContainerBase {
} else if (ItemUtil.canBeStacked(heldItem, stackThere)) { } else if (ItemUtil.canBeStacked(heldItem, stackThere)) {
int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount()); int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount());
if (maxTransfer > 0) { if (maxTransfer > 0) {
player.setHeldItem(hand, StackUtil.grow(heldItem, maxTransfer)); player.setItemInHand(hand, StackUtil.grow(heldItem, maxTransfer));
ItemStack newStackThere = stackThere.copy(); ItemStack newStackThere = stackThere.copy();
newStackThere = StackUtil.shrink(newStackThere, maxTransfer); newStackThere = StackUtil.shrink(newStackThere, maxTransfer);
empowerer.inv.setStackInSlot(0, newStackThere); empowerer.inv.setStackInSlot(0, newStackThere);
@ -68,7 +68,7 @@ public class BlockEmpowerer extends BlockContainerBase {
} }
} else { } else {
if (StackUtil.isValid(stackThere)) { if (StackUtil.isValid(stackThere)) {
player.setHeldItem(hand, stackThere.copy()); player.setItemInHand(hand, stackThere.copy());
empowerer.inv.setStackInSlot(0, StackUtil.getEmpty()); empowerer.inv.setStackInSlot(0, StackUtil.getEmpty());
return ActionResultType.PASS; return ActionResultType.PASS;
} }

View file

@ -34,14 +34,14 @@ public class BlockEnergizer extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return this.isEnergizer return this.isEnergizer
? new TileEntityEnergizer() ? new TileEntityEnergizer()
: new TileEntityEnervator(); : new TileEntityEnervator();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (this.isEnergizer) { if (this.isEnergizer) {
return this.openGui(world, player, pos, TileEntityEnergizer.class); return this.openGui(world, player, pos, TileEntityEnergizer.class);
} else { } else {

View file

@ -31,18 +31,18 @@ public class BlockFarmer extends DirectionalBlock.Container {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityFarmer(); return new TileEntityFarmer();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityFarmer.class); return this.openGui(worldIn, player, pos, TileEntityFarmer.class);
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.FarmerShapes.SHAPE_E; return Shapes.FarmerShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -31,12 +31,12 @@ public class BlockFeeder extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityFeeder(); return new TileEntityFeeder();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityFeeder.class); return this.openGui(worldIn, player, pos, TileEntityFeeder.class);
} }

View file

@ -29,21 +29,23 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ToolType; import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.network.NetworkHooks; import net.minecraftforge.fml.network.NetworkHooks;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockFermentingBarrel extends BlockContainerBase { public class BlockFermentingBarrel extends BlockContainerBase {
public BlockFermentingBarrel() { public BlockFermentingBarrel() {
super(Properties.create(Material.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).hardnessAndResistance(0.5F, 5.0F).sound(SoundType.WOOD)); super(Properties.of(Material.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).strength(0.5F, 5.0F).sound(SoundType.WOOD));
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityFermentingBarrel(); return new TileEntityFermentingBarrel();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityFermentingBarrel press = (TileEntityFermentingBarrel) world.getTileEntity(pos); TileEntityFermentingBarrel press = (TileEntityFermentingBarrel) world.getBlockEntity(pos);
if (press != null) { if (press != null) {
if (!this.tryUseItemOnTank(player, hand, press.canolaTank) && !this.tryUseItemOnTank(player, hand, press.oilTank)) { if (!this.tryUseItemOnTank(player, hand, press.canolaTank) && !this.tryUseItemOnTank(player, hand, press.oilTank)) {
NetworkHooks.openGui((ServerPlayerEntity) player, press, pos); NetworkHooks.openGui((ServerPlayerEntity) player, press, pos);

View file

@ -30,7 +30,7 @@ public class BlockFireworkBox extends BlockContainerBase {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
@ -39,7 +39,7 @@ public class BlockFireworkBox extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityFireworkBox(); return new TileEntityFireworkBox();
} }

View file

@ -34,14 +34,14 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return this.isPlacer return this.isPlacer
? new TileEntityFluidPlacer() ? new TileEntityFluidPlacer()
: new TileEntityFluidCollector(); : new TileEntityFluidCollector();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
@ -51,7 +51,7 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container {
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case UP: case UP:
return Shapes.FluidCollectorShapes.SHAPE_U; return Shapes.FluidCollectorShapes.SHAPE_U;
case DOWN: case DOWN:

View file

@ -38,21 +38,21 @@ import java.util.Random;
public class BlockFurnaceDouble extends BlockContainerBase { public class BlockFurnaceDouble extends BlockContainerBase {
public BlockFurnaceDouble() { public BlockFurnaceDouble() {
// TODO: [port] confirm this is correct for light level... Might not be reactive. // TODO: [port] confirm this is correct for light level... Might not be reactive.
super(ActuallyBlocks.defaultPickProps(0).tickRandomly().setLightLevel(state -> state.get(LIT) super(ActuallyBlocks.defaultPickProps(0).randomTicks().lightLevel(state -> state.getValue(LIT)
? 12 ? 12
: 0)); : 0));
this.setDefaultState(this.stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(LIT, false)); this.registerDefaultState(this.stateDefinition.any().setValue(HORIZONTAL_FACING, Direction.NORTH).setValue(LIT, false));
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityFurnaceDouble(); return new TileEntityFurnaceDouble();
} }
@Override @Override
public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) { public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
if (state.get(LIT)) { if (state.getValue(LIT)) {
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D);
} }
@ -60,17 +60,17 @@ public class BlockFurnaceDouble extends BlockContainerBase {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityFurnaceDouble.class); return this.openGui(worldIn, player, pos, TileEntityFurnaceDouble.class);
} }
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).with(LIT, false); return this.defaultBlockState().setValue(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).setValue(LIT, false);
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(LIT).add(HORIZONTAL_FACING); builder.add(LIT).add(HORIZONTAL_FACING);
} }
@ -91,7 +91,7 @@ public class BlockFurnaceDouble extends BlockContainerBase {
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(HORIZONTAL_FACING)) { switch (state.getValue(HORIZONTAL_FACING)) {
case EAST: case EAST:
return Shapes.FurnaceDoubleShapes.SHAPE_E; return Shapes.FurnaceDoubleShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -27,7 +27,7 @@ import java.util.Random;
public class BlockGreenhouseGlass extends BlockBase { public class BlockGreenhouseGlass extends BlockBase {
public BlockGreenhouseGlass() { public BlockGreenhouseGlass() {
super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).tickRandomly()); super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).randomTicks());
} }
@ -44,16 +44,16 @@ public class BlockGreenhouseGlass extends BlockBase {
@Override @Override
public BlockRenderType getRenderType(BlockState state) { public BlockRenderType getRenderShape(BlockState state) {
return BlockRenderType.INVISIBLE; return BlockRenderType.INVISIBLE;
} }
@Override @Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (world.isRemote) { if (world.isClientSide) {
return; return;
} }
if (world.canBlockSeeSky(pos) && world.isDaytime()) { if (world.canSeeSkyFromBelowWater(pos) && world.isDay()) {
Triple<BlockPos, BlockState, IGrowable> trip = this.firstBlock(world, pos); Triple<BlockPos, BlockState, IGrowable> trip = this.firstBlock(world, pos);
boolean once = false; boolean once = false;
if (trip != null) { if (trip != null) {
@ -61,31 +61,31 @@ public class BlockGreenhouseGlass extends BlockBase {
BlockState growState = i == 0 BlockState growState = i == 0
? trip.getMiddle() ? trip.getMiddle()
: world.getBlockState(trip.getLeft()); : world.getBlockState(trip.getLeft());
if (growState.getBlock() == trip.getRight() && trip.getRight().canGrow(world, trip.getLeft(), growState, false)) { if (growState.getBlock() == trip.getRight() && trip.getRight().isValidBonemealTarget(world, trip.getLeft(), growState, false)) {
trip.getRight().grow(world, rand, trip.getLeft(), growState); trip.getRight().performBonemeal(world, rand, trip.getLeft(), growState);
once = true; once = true;
} }
} }
} }
if (once) { if (once) {
world.playEvent(2005, trip.getMiddle().isOpaqueCube(world, trip.getLeft()) world.levelEvent(2005, trip.getMiddle().isSolidRender(world, trip.getLeft())
? trip.getLeft().up() ? trip.getLeft().above()
: trip.getLeft(), 0); : trip.getLeft(), 0);
} }
} }
} }
public Triple<BlockPos, BlockState, IGrowable> firstBlock(World world, BlockPos glassPos) { public Triple<BlockPos, BlockState, IGrowable> firstBlock(World world, BlockPos glassPos) {
BlockPos.Mutable mut = new BlockPos(glassPos).toMutable(); BlockPos.Mutable mut = new BlockPos(glassPos).mutable();
while (true) { while (true) {
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ()); mut.set(mut.getX(), mut.getY() - 1, mut.getZ());
if (mut.getY() < 0) { if (mut.getY() < 0) {
return null; return null;
} }
BlockState state = world.getBlockState(mut); BlockState state = world.getBlockState(mut);
if (state.isOpaqueCube(world, mut) || state.getBlock() instanceof IGrowable || state.getBlock() == this) { if (state.isSolidRender(world, mut) || state.getBlock() instanceof IGrowable || state.getBlock() == this) {
if (state.getBlock() instanceof IGrowable) { if (state.getBlock() instanceof IGrowable) {
return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock()); return Triple.of(mut.immutable(), state, (IGrowable) state.getBlock());
} else { } else {
return null; return null;
} }

View file

@ -41,13 +41,13 @@ public class BlockGrinder extends BlockContainerBase {
private final boolean isDouble; private final boolean isDouble;
public BlockGrinder(boolean isDouble) { public BlockGrinder(boolean isDouble) {
super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); super(ActuallyBlocks.defaultPickProps(0).randomTicks());
this.isDouble = isDouble; this.isDouble = isDouble;
this.setDefaultState(this.stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(LIT, false)); this.registerDefaultState(this.stateDefinition.any().setValue(HORIZONTAL_FACING, Direction.NORTH).setValue(LIT, false));
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return this.isDouble return this.isDouble
? new TileEntityGrinderDouble() ? new TileEntityGrinderDouble()
: new TileEntityGrinder(); : new TileEntityGrinder();
@ -55,7 +55,7 @@ public class BlockGrinder extends BlockContainerBase {
@Override @Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (state.get(BlockStateProperties.LIT)) { if (state.getValue(BlockStateProperties.LIT)) {
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
double xRand = rand.nextDouble() / 0.75D - 0.5D; double xRand = rand.nextDouble() / 0.75D - 0.5D;
double zRand = rand.nextDouble() / 0.75D - 0.5D; double zRand = rand.nextDouble() / 0.75D - 0.5D;
@ -66,7 +66,7 @@ public class BlockGrinder extends BlockContainerBase {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.isDouble) { if (this.isDouble) {
return this.openGui(world, player, pos, TileEntityGrinderDouble.class); return this.openGui(world, player, pos, TileEntityGrinderDouble.class);
} }
@ -76,24 +76,24 @@ public class BlockGrinder extends BlockContainerBase {
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).with(LIT, false); return this.defaultBlockState().setValue(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).setValue(LIT, false);
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(LIT).add(HORIZONTAL_FACING); builder.add(LIT).add(HORIZONTAL_FACING);
} }
@Override @Override
public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) {
return state.get(LIT) return state.getValue(LIT)
? 12 ? 12
: 0; : 0;
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(HORIZONTAL_FACING)) { switch (state.getValue(HORIZONTAL_FACING)) {
case EAST: case EAST:
return Shapes.GrinderShapes.SHAPE_E; return Shapes.GrinderShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -25,7 +25,7 @@ public class BlockHeatCollector extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityHeatCollector(); return new TileEntityHeatCollector();
} }

View file

@ -30,19 +30,19 @@ public class BlockInputter extends BlockContainerBase {
public final boolean isAdvanced; public final boolean isAdvanced;
public BlockInputter(boolean isAdvanced) { public BlockInputter(boolean isAdvanced) {
super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); super(ActuallyBlocks.defaultPickProps(0).randomTicks());
this.isAdvanced = isAdvanced; this.isAdvanced = isAdvanced;
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return this.isAdvanced return this.isAdvanced
? new TileEntityInputterAdvanced() ? new TileEntityInputterAdvanced()
: new TileEntityInputter(); : new TileEntityInputter();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.isAdvanced) { if (this.isAdvanced) {
return this.openGui(world, player, pos, TileEntityInputterAdvanced.class); return this.openGui(world, player, pos, TileEntityInputterAdvanced.class);
} }

View file

@ -25,7 +25,7 @@ public class BlockItemViewer extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityItemViewer(); return new TileEntityItemViewer();
} }

View file

@ -29,7 +29,7 @@ public class BlockItemViewerHopping extends BlockItemViewer {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityItemViewerHopping(); return new TileEntityItemViewerHopping();
} }
} }

View file

@ -37,15 +37,15 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
} }
@Override @Override
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) {
this.updateLamp(world, pos); this.updateLamp(world, pos);
} }
private void updateLamp(World world, BlockPos pos) { private void updateLamp(World world, BlockPos pos) {
if (!world.isRemote) { if (!world.isClientSide) {
BlockState state = world.getBlockState(pos); BlockState state = world.getBlockState(pos);
BlockPos coords = pos.offset(WorldUtil.getDirectionByPistonRotation(state)); BlockPos coords = pos.relative(WorldUtil.getDirectionByPistonRotation(state));
this.updateLampsAtPos(world, coords, world.getRedstonePowerFromNeighbors(pos) > 0, new ArrayList<>()); this.updateLampsAtPos(world, coords, world.getBestNeighborSignal(pos) > 0, new ArrayList<>());
} }
} }
@ -53,12 +53,12 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
BlockState state = world.getBlockState(pos); BlockState state = world.getBlockState(pos);
Block block = state.getBlock(); Block block = state.getBlock();
if (block instanceof BlockColoredLamp) { if (block instanceof BlockColoredLamp) {
if (state.get(BlockStateProperties.LIT) && !powered) { if (state.getValue(BlockStateProperties.LIT) && !powered) {
world.setBlockState(pos, state.with(BlockStateProperties.LIT, false)); world.setBlockAndUpdate(pos, state.setValue(BlockStateProperties.LIT, false));
} }
if (!state.get(BlockStateProperties.LIT) && powered) { if (!state.getValue(BlockStateProperties.LIT) && powered) {
world.setBlockState(pos, state.with(BlockStateProperties.LIT, true)); world.setBlockAndUpdate(pos, state.setValue(BlockStateProperties.LIT, true));
} }
this.updateSurrounding(world, pos, powered, updatedAlready); this.updateSurrounding(world, pos, powered, updatedAlready);
@ -67,7 +67,7 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
private void updateSurrounding(World world, BlockPos pos, boolean powered, List<BlockPos> updatedAlready) { private void updateSurrounding(World world, BlockPos pos, boolean powered, List<BlockPos> updatedAlready) {
for (Direction side : Direction.values()) { for (Direction side : Direction.values()) {
BlockPos offset = pos.offset(side); BlockPos offset = pos.relative(side);
if (!updatedAlready.contains(offset)) { if (!updatedAlready.contains(offset)) {
updatedAlready.add(pos); updatedAlready.add(pos);
this.updateLampsAtPos(world, offset, powered, updatedAlready); this.updateLampsAtPos(world, offset, powered, updatedAlready);
@ -77,7 +77,7 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.LampPowererShapes.SHAPE_E; return Shapes.LampPowererShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -83,9 +83,9 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
// } // }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand); ItemStack stack = player.getItemInHand(hand);
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityLaserRelay) { if (tile instanceof TileEntityLaserRelay) {
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
@ -93,7 +93,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
if (stack.getItem() instanceof ItemLaserWrench) { if (stack.getItem() instanceof ItemLaserWrench) {
return ActionResultType.FAIL; return ActionResultType.FAIL;
} else if (stack.getItem() == ConfigValues.itemCompassConfigurator) { } else if (stack.getItem() == ConfigValues.itemCompassConfigurator) {
if (!world.isRemote) { if (!world.isClientSide) {
relay.onCompassAction(player); relay.onCompassAction(player);
Network network = relay.getNetwork(); Network network = relay.getNetwork();
@ -101,7 +101,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
network.changeAmount++; network.changeAmount++;
} }
relay.markDirty(); relay.setChanged();
relay.sendUpdate(); relay.sendUpdate();
} }
@ -109,9 +109,9 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
} else if (stack.getItem() instanceof ItemLaserRelayUpgrade) { } else if (stack.getItem() instanceof ItemLaserRelayUpgrade) {
ItemStack inRelay = relay.inv.getStackInSlot(0); ItemStack inRelay = relay.inv.getStackInSlot(0);
if (!StackUtil.isValid(inRelay)) { if (!StackUtil.isValid(inRelay)) {
if (!world.isRemote) { if (!world.isClientSide) {
if (!player.isCreative()) { if (!player.isCreative()) {
player.setHeldItem(hand, StackUtil.shrink(stack, 1)); player.setItemInHand(hand, StackUtil.shrink(stack, 1));
} }
ItemStack set = stack.copy(); ItemStack set = stack.copy();
@ -124,14 +124,14 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
} }
} }
if (player.isSneaking()) { if (player.isShiftKeyDown()) {
ItemStack inRelay = relay.inv.getStackInSlot(0).copy(); ItemStack inRelay = relay.inv.getStackInSlot(0).copy();
if (StackUtil.isValid(inRelay)) { if (StackUtil.isValid(inRelay)) {
if (!world.isRemote) { if (!world.isClientSide) {
relay.inv.setStackInSlot(0, StackUtil.getEmpty()); relay.inv.setStackInSlot(0, StackUtil.getEmpty());
if (!player.inventory.addItemStackToInventory(inRelay)) { if (!player.inventory.add(inRelay)) {
player.entityDropItem(inRelay, 0); player.spawnAtLocation(inRelay, 0);
} }
} }
return ActionResultType.PASS; return ActionResultType.PASS;
@ -146,7 +146,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader world) { public TileEntity newBlockEntity(IBlockReader world) {
switch (this.type) { switch (this.type) {
case ITEM: case ITEM:
return new TileEntityLaserRelayItem(); return new TileEntityLaserRelayItem();
@ -170,27 +170,27 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
return; return;
} }
BlockPos pos = ((BlockRayTraceResult) rayCast).getPos(); BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos();
if (minecraft.world != null) { if (minecraft.level != null) {
boolean wearing = ItemEngineerGoggles.isWearing(player); boolean wearing = ItemEngineerGoggles.isWearing(player);
if (wearing || StackUtil.isValid(stack)) { if (wearing || StackUtil.isValid(stack)) {
boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator; boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator;
if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) { if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) {
TileEntity tile = minecraft.world.getTileEntity(pos); TileEntity tile = minecraft.level.getBlockEntity(pos);
if (tile instanceof TileEntityLaserRelay) { if (tile instanceof TileEntityLaserRelay) {
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
String strg = relay.getExtraDisplayString(); String strg = relay.getExtraDisplayString();
minecraft.fontRenderer.drawStringWithShadow(matrices, strg, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, strg, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE);
String expl; String expl;
if (compass) { if (compass) {
expl = relay.getCompassDisplayString(); expl = relay.getCompassDisplayString();
} else { } else {
expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", StringUtil.localize(ConfigValues.itemCompassConfigurator.getTranslationKey() + ".name")); expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", StringUtil.localize(ConfigValues.itemCompassConfigurator.getDescriptionId() + ".name"));
} }
StringUtil.drawSplitString(minecraft.fontRenderer, expl, resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 15, Integer.MAX_VALUE, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, expl, resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 15, Integer.MAX_VALUE, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} }
} }
@ -198,8 +198,8 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
} }
@Override @Override
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
super.onReplaced(state, world, pos, newState, isMoving); super.onRemove(state, world, pos, newState, isMoving);
if (state != newState) { if (state != newState) {
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world); ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world);

View file

@ -38,7 +38,7 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityLavaFactoryController(); return new TileEntityLavaFactoryController();
} }
@ -49,20 +49,20 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple
return; return;
} }
TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
if (factory != null) { if (factory != null) {
int state = factory.isMultiblock(); int state = factory.isMultiblock();
if (state == TileEntityLavaFactoryController.NOT_MULTI) { if (state == TileEntityLavaFactoryController.NOT_MULTI) {
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".factory.notPart.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".factory.notPart.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} else if (state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA) { } else if (state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA) {
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".factory.works.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".factory.works.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} }
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.LavaFactoryShapes.SHAPE_E; return Shapes.LavaFactoryShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -22,20 +22,22 @@ import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraftforge.common.ToolType; import net.minecraftforge.common.ToolType;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockLeafGenerator extends DirectionalBlock.Container { public class BlockLeafGenerator extends DirectionalBlock.Container {
public BlockLeafGenerator() { public BlockLeafGenerator() {
super(Properties.create(Material.IRON).hardnessAndResistance(5.0F, 10.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0).hardnessAndResistance(5.0F, 10.0F).sound(SoundType.METAL)); super(Properties.of(Material.METAL).strength(5.0F, 10.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0).strength(5.0F, 10.0F).sound(SoundType.METAL));
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityLeafGenerator(); return new TileEntityLeafGenerator();
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.LeafGeneratorShapes.SHAPE_E; return Shapes.LeafGeneratorShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -33,18 +33,18 @@ import java.util.Random;
public class BlockOilGenerator extends DirectionalBlock.Container { public class BlockOilGenerator extends DirectionalBlock.Container {
public BlockOilGenerator() { public BlockOilGenerator() {
super(ActuallyBlocks.defaultPickProps(0).tickRandomly()); super(ActuallyBlocks.defaultPickProps(0).randomTicks());
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityOilGenerator(); return new TileEntityOilGenerator();
} }
// TODO: Move all of these over to the client version // TODO: Move all of these over to the client version
@Override @Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityOilGenerator) { if (tile instanceof TileEntityOilGenerator) {
if (((TileEntityOilGenerator) tile).currentBurnTime > 0) { if (((TileEntityOilGenerator) tile).currentBurnTime > 0) {
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
@ -55,9 +55,9 @@ public class BlockOilGenerator extends DirectionalBlock.Container {
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getTileEntity(pos); TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getBlockEntity(pos);
if (generator != null) { if (generator != null) {
if (!this.tryUseItemOnTank(player, hand, generator.tank)) { if (!this.tryUseItemOnTank(player, hand, generator.tank)) {
NetworkHooks.openGui((ServerPlayerEntity) player, generator, pos); NetworkHooks.openGui((ServerPlayerEntity) player, generator, pos);
@ -70,7 +70,7 @@ public class BlockOilGenerator extends DirectionalBlock.Container {
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case EAST: case EAST:
return Shapes.OilGeneratorShapes.SHAPE_E; return Shapes.OilGeneratorShapes.SHAPE_E;
case SOUTH: case SOUTH:

View file

@ -52,14 +52,14 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
} }
@Override @Override
public boolean canProvidePower(BlockState state) { public boolean isSignalSource(BlockState state) {
return this.type == Type.REDSTONEFACE; return this.type == Type.REDSTONEFACE;
} }
@Override @Override
public int getWeakPower(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { public int getSignal(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) {
if (this.type == Type.REDSTONEFACE) { if (this.type == Type.REDSTONEFACE) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityPhantomRedstoneface) { if (tile instanceof TileEntityPhantomRedstoneface) {
return ((TileEntityPhantomRedstoneface) tile).providesWeak[side.ordinal()]; return ((TileEntityPhantomRedstoneface) tile).providesWeak[side.ordinal()];
} }
@ -68,9 +68,9 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
} }
@Override @Override
public int getStrongPower(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { public int getDirectSignal(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) {
if (this.type == Type.REDSTONEFACE) { if (this.type == Type.REDSTONEFACE) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityPhantomRedstoneface) { if (tile instanceof TileEntityPhantomRedstoneface) {
return ((TileEntityPhantomRedstoneface) tile).providesStrong[side.ordinal()]; return ((TileEntityPhantomRedstoneface) tile).providesStrong[side.ordinal()];
} }
@ -84,7 +84,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
switch (this.type) { switch (this.type) {
case PLACER: case PLACER:
return new TileEntityPhantomPlacer(); return new TileEntityPhantomPlacer();
@ -103,13 +103,13 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
// TODO: [port] validate this works // TODO: [port] validate this works
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
if (!world.isRemote) { if (!world.isClientSide) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof IPhantomTile && ((IPhantomTile) tile).getGuiID() != -1) { if (tile instanceof IPhantomTile && ((IPhantomTile) tile).getGuiID() != -1) {
NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos);
} }
@ -125,27 +125,27 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
if (!(rayCast instanceof BlockRayTraceResult)) { if (!(rayCast instanceof BlockRayTraceResult)) {
return; return;
} }
BlockPos pos = ((BlockRayTraceResult) rayCast).getPos(); BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos();
TileEntity tile = minecraft.world.getTileEntity(pos); TileEntity tile = minecraft.level.getBlockEntity(pos);
if (tile != null) { if (tile != null) {
if (tile instanceof IPhantomTile) { if (tile instanceof IPhantomTile) {
IPhantomTile phantom = (IPhantomTile) tile; IPhantomTile phantom = (IPhantomTile) tile;
minecraft.fontRenderer.drawStringWithShadow(matrices, TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE);
if (phantom.hasBoundPosition()) { if (phantom.hasBoundPosition()) {
int distance = MathHelper.ceil(new Vector3d(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vector3d(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()))); int distance = MathHelper.ceil(new Vector3d(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vector3d(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ())));
BlockState state = minecraft.world.getBlockState(phantom.getBoundPosition()); BlockState state = minecraft.level.getBlockState(phantom.getBoundPosition());
Block block = state.getBlock(); Block block = state.getBlock();
Item item = Item.getItemFromBlock(block); Item item = Item.byBlock(block);
String name = item.getDisplayName(new ItemStack(block)).getString(); String name = item.getName(new ItemStack(block)).getString();
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip." + ActuallyAdditions.MODID + ".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, StringUtil.localizeFormatted("tooltip." + ActuallyAdditions.MODID + ".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 30, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
if (phantom.isBoundThingInRange()) { if (phantom.isBoundThingInRange()) {
StringUtil.drawSplitString(minecraft.fontRenderer, TextFormatting.DARK_GREEN + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedRange.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, TextFormatting.DARK_GREEN + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} else { } else {
StringUtil.drawSplitString(minecraft.fontRenderer, TextFormatting.DARK_RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.font, TextFormatting.DARK_RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} else { } else {
minecraft.fontRenderer.drawStringWithShadow(matrices, TextFormatting.RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 + 25, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, TextFormatting.RED + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
} }

View file

@ -26,7 +26,7 @@ public class BlockPhantomBooster extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader world) { public TileEntity newBlockEntity(IBlockReader world) {
return new TileEntityPhantomBooster(); return new TileEntityPhantomBooster();
} }

View file

@ -39,24 +39,24 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityPlayerInterface(); return new TileEntityPlayerInterface();
} }
@Override @Override
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) { public void setPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityPlayerInterface) { if (tile instanceof TileEntityPlayerInterface) {
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
if (face.connectedPlayer == null) { if (face.connectedPlayer == null) {
face.connectedPlayer = player.getUniqueID(); face.connectedPlayer = player.getUUID();
face.playerName = player.getName().getString(); face.playerName = player.getName().getString();
face.markDirty(); face.setChanged();
face.sendUpdate(); face.sendUpdate();
} }
} }
super.onBlockPlacedBy(world, pos, state, player, stack); super.setPlacedBy(world, pos, state, player, stack);
} }
@Override @Override
@ -66,15 +66,15 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
return; return;
} }
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
if (tile != null) { if (tile != null) {
if (tile instanceof TileEntityPlayerInterface) { if (tile instanceof TileEntityPlayerInterface) {
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
String name = face.playerName == null String name = face.playerName == null
? "Unknown" ? "Unknown"
: face.playerName; : face.playerName;
minecraft.fontRenderer.drawStringWithShadow(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE);
minecraft.fontRenderer.drawStringWithShadow(matrices, "UUID: " + TextFormatting.DARK_GREEN + face.connectedPlayer, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, "UUID: " + TextFormatting.DARK_GREEN + face.connectedPlayer, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
} }

View file

@ -31,12 +31,12 @@ public class BlockRangedCollector extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityRangedCollector(); return new TileEntityRangedCollector();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }

View file

@ -38,7 +38,7 @@ public class BlockShockSuppressor extends BlockContainerBase {
@SubscribeEvent @SubscribeEvent
public void onExplosion(ExplosionEvent.Detonate event) { public void onExplosion(ExplosionEvent.Detonate event) {
World world = event.getWorld(); World world = event.getWorld();
if (!world.isRemote) { if (!world.isClientSide) {
List<BlockPos> affectedBlocks = event.getAffectedBlocks(); List<BlockPos> affectedBlocks = event.getAffectedBlocks();
List<Entity> affectedEntities = event.getAffectedEntities(); List<Entity> affectedEntities = event.getAffectedEntities();
@ -47,18 +47,18 @@ public class BlockShockSuppressor extends BlockContainerBase {
for (TileEntityShockSuppressor suppressor : TileEntityShockSuppressor.SUPPRESSORS) { for (TileEntityShockSuppressor suppressor : TileEntityShockSuppressor.SUPPRESSORS) {
if (!suppressor.isRedstonePowered) { if (!suppressor.isRedstonePowered) {
BlockPos supPos = suppressor.getPos(); BlockPos supPos = suppressor.getBlockPos();
List<Entity> entitiesToRemove = new ArrayList<>(); List<Entity> entitiesToRemove = new ArrayList<>();
List<BlockPos> posesToRemove = new ArrayList<>(); List<BlockPos> posesToRemove = new ArrayList<>();
for (BlockPos pos : affectedBlocks) { for (BlockPos pos : affectedBlocks) {
if (pos.distanceSq(supPos) <= rangeSq) { if (pos.distSqr(supPos) <= rangeSq) {
posesToRemove.add(pos); posesToRemove.add(pos);
} }
} }
for (Entity entity : affectedEntities) { for (Entity entity : affectedEntities) {
if (entity.getPositionVec().squareDistanceTo(supPos.getX(), supPos.getY(), supPos.getZ()) <= rangeSq) { if (entity.position().distanceToSqr(supPos.getX(), supPos.getY(), supPos.getZ()) <= rangeSq) {
entitiesToRemove.add(entity); entitiesToRemove.add(entity);
} }
} }
@ -88,7 +88,7 @@ public class BlockShockSuppressor extends BlockContainerBase {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityShockSuppressor(); return new TileEntityShockSuppressor();
} }

View file

@ -17,6 +17,8 @@ import net.minecraft.util.math.AxisAlignedBB;
//Copied from BlockTorch. //Copied from BlockTorch.
//I have no idea what all of this means. //I have no idea what all of this means.
import net.minecraft.block.AbstractBlock.Properties;
public class BlockTinyTorch extends BlockBase { public class BlockTinyTorch extends BlockBase {
//Thanks to xdjackiexd for these. //Thanks to xdjackiexd for these.
@ -28,7 +30,7 @@ public class BlockTinyTorch extends BlockBase {
private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D);
public BlockTinyTorch() { public BlockTinyTorch() {
super(Properties.create(Material.MISCELLANEOUS).sound(SoundType.WOOD).hardnessAndResistance(0.0F, 0.8F)); super(Properties.of(Material.DECORATION).sound(SoundType.WOOD).strength(0.0F, 0.8F));
// TorchBlock // TorchBlock
// this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP)); // this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP));
// this.setTickRandomly(true); // this.setTickRandomly(true);

View file

@ -40,12 +40,12 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityMiner.class); return this.openGui(worldIn, player, pos, TileEntityMiner.class);
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader world) { public TileEntity newBlockEntity(IBlockReader world) {
return new TileEntityMiner(); return new TileEntityMiner();
} }
@ -55,21 +55,21 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I
if (!(rayCast instanceof BlockRayTraceResult)) { if (!(rayCast instanceof BlockRayTraceResult)) {
return; return;
} }
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos()); TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
if (tile instanceof TileEntityMiner) { if (tile instanceof TileEntityMiner) {
TileEntityMiner miner = (TileEntityMiner) tile; TileEntityMiner miner = (TileEntityMiner) tile;
String info = miner.checkY == 0 String info = miner.checkY == 0
? "Done Mining!" ? "Done Mining!"
: miner.checkY == -1 : miner.checkY == -1
? "Calculating positions..." ? "Calculating positions..."
: "Mining at " + (miner.getPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getPos().getZ() + miner.checkZ) + "."; : "Mining at " + (miner.getBlockPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getBlockPos().getZ() + miner.checkZ) + ".";
minecraft.fontRenderer.drawStringWithShadow(matrices, info, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f - 20, StringUtil.DECIMAL_COLOR_WHITE); minecraft.font.drawShadow(matrices, info, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f - 20, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
@Override @Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) { switch (state.getValue(FACING)) {
case NORTH: case NORTH:
return Shapes.MinerShapes.SHAPE_N; return Shapes.MinerShapes.SHAPE_N;
case EAST: case EAST:

View file

@ -14,13 +14,15 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockWildPlant extends BlockBushBase { public class BlockWildPlant extends BlockBushBase {
// public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values(); // public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
// public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class); // public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
public BlockWildPlant() { public BlockWildPlant() {
super(Properties.create(Material.PLANTS).sound(SoundType.PLANT).harvestLevel(0).hardnessAndResistance(0, 0)); super(Properties.of(Material.PLANT).sound(SoundType.GRASS).harvestLevel(0).strength(0, 0));
// this.setSoundType(SoundType.PLANT); // this.setSoundType(SoundType.PLANT);
} }

View file

@ -30,12 +30,12 @@ public class BlockXPSolidifier extends DirectionalBlock.Container {
} }
@Override @Override
public TileEntity createNewTileEntity(IBlockReader worldIn) { public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityXPSolidifier(); return new TileEntityXPSolidifier();
} }
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class); return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class);
} }

View file

@ -9,109 +9,109 @@ import java.util.Optional;
import java.util.stream.Stream; import java.util.stream.Stream;
public class Shapes { public class Shapes {
static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.makeCuboidShape(13, 0, 1, 15, 15.5, 3), Block.makeCuboidShape(2, 0, 2, 14, 6, 14), Block.makeCuboidShape(2, 10, 2, 14, 15, 14), Block.makeCuboidShape(3, 6, 3, 13, 10, 13), Block.makeCuboidShape(1, 0, 1, 3, 15.5, 3), Block.makeCuboidShape(1, 0, 13, 3, 15.5, 15), Block.makeCuboidShape(13, 0, 13, 15, 15.5, 15), Block.makeCuboidShape(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.makeCuboidShape(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.makeCuboidShape(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.makeCuboidShape(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.makeCuboidShape(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.makeCuboidShape(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.makeCuboidShape(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.makeCuboidShape(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.makeCuboidShape(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.makeCuboidShape(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.makeCuboidShape(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.makeCuboidShape(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.makeCuboidShape(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.makeCuboidShape(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.makeCuboidShape(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.makeCuboidShape(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.box(13, 0, 1, 15, 15.5, 3), Block.box(2, 0, 2, 14, 6, 14), Block.box(2, 10, 2, 14, 15, 14), Block.box(3, 6, 3, 13, 10, 13), Block.box(1, 0, 1, 3, 15.5, 3), Block.box(1, 0, 13, 3, 15.5, 15), Block.box(13, 0, 13, 15, 15.5, 15), Block.box(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.box(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.box(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.box(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.box(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.box(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.box(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.box(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.box(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.box(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.box(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.box(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.box(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.box(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.box(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.box(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.makeCuboidShape(5, 4, 5, 10, 19, 10), Block.makeCuboidShape(4, 0, 4, 11, 5, 11), Block.makeCuboidShape(3, 0, 3, 5, 4, 5), Block.makeCuboidShape(10, 0, 3, 12, 2, 5), Block.makeCuboidShape(12, 0, 4, 13, 1, 5), Block.makeCuboidShape(11, 0, 5, 12, 1, 6), Block.makeCuboidShape(10, 0, 10, 12, 3, 12), Block.makeCuboidShape(3, 0, 10, 5, 1, 12), Block.makeCuboidShape(9, 0, 3, 10, 3, 4), Block.makeCuboidShape(8, 0, 2, 11, 1, 4), Block.makeCuboidShape(4, 0, 2, 5, 2, 3), Block.makeCuboidShape(5, 0, 3, 7, 1, 4), Block.makeCuboidShape(2, 0, 4, 4, 1, 6), Block.makeCuboidShape(3, 0, 5, 4, 3, 6.5), Block.makeCuboidShape(3, 0, 9, 4, 2, 10), Block.makeCuboidShape(2, 0, 8, 4, 1, 10), Block.makeCuboidShape(5, 0, 11, 7, 2, 13), Block.makeCuboidShape(7, 0, 11, 11, 1, 13), Block.makeCuboidShape(10, 0, 9, 13, 1, 11), Block.makeCuboidShape(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.box(5, 4, 5, 10, 19, 10), Block.box(4, 0, 4, 11, 5, 11), Block.box(3, 0, 3, 5, 4, 5), Block.box(10, 0, 3, 12, 2, 5), Block.box(12, 0, 4, 13, 1, 5), Block.box(11, 0, 5, 12, 1, 6), Block.box(10, 0, 10, 12, 3, 12), Block.box(3, 0, 10, 5, 1, 12), Block.box(9, 0, 3, 10, 3, 4), Block.box(8, 0, 2, 11, 1, 4), Block.box(4, 0, 2, 5, 2, 3), Block.box(5, 0, 3, 7, 1, 4), Block.box(2, 0, 4, 4, 1, 6), Block.box(3, 0, 5, 4, 3, 6.5), Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10), Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13), Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.makeCuboidShape(1, 7, 0, 15, 8, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 1, 1, 15, 7, 15), Block.makeCuboidShape(6, 7, 6, 10, 9, 10), Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), Block.makeCuboidShape(0, 7, 0, 1, 8, 16), Block.makeCuboidShape(15, 7, 0, 16, 8, 16), Block.makeCuboidShape(1, 7, 15, 15, 8, 16), Block.makeCuboidShape(5, 7, 5, 6, 9, 6), Block.makeCuboidShape(5, 7, 10, 6, 9, 11), Block.makeCuboidShape(10, 7, 10, 11, 9, 11), Block.makeCuboidShape(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.box(1, 7, 0, 15, 8, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 7, 15), Block.box(6, 7, 6, 10, 9, 10), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(0, 7, 0, 1, 8, 16), Block.box(15, 7, 0, 16, 8, 16), Block.box(1, 7, 15, 15, 8, 16), Block.box(5, 7, 5, 6, 9, 6), Block.box(5, 7, 10, 6, 9, 11), Block.box(10, 7, 10, 11, 9, 11), Block.box(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 1, 1, 15, 6, 15), Block.makeCuboidShape(1, 6, 1, 15, 7, 15), Block.makeCuboidShape(0, 7, 0, 16, 8, 1), Block.makeCuboidShape(0, 7, 15, 16, 8, 16), Block.makeCuboidShape(0, 7, 1, 1, 8, 15), Block.makeCuboidShape(15, 7, 1, 16, 8, 15), Block.makeCuboidShape(4, 7, 4, 12, 9, 12), Block.makeCuboidShape(0, 1, 0, 1, 7, 1), Block.makeCuboidShape(15, 1, 0, 16, 7, 1), Block.makeCuboidShape(15, 1, 15, 16, 7, 16), Block.makeCuboidShape(0, 1, 15, 1, 7, 16), Block.makeCuboidShape(3, 7, 4, 4, 8, 5), Block.makeCuboidShape(3, 7, 11, 4, 8, 12), Block.makeCuboidShape(4, 7, 12, 5, 8, 13), Block.makeCuboidShape(11, 7, 12, 12, 8, 13), Block.makeCuboidShape(12, 7, 11, 13, 8, 12), Block.makeCuboidShape(12, 7, 4, 13, 8, 5), Block.makeCuboidShape(11, 7, 3, 12, 8, 4), Block.makeCuboidShape(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 6, 15), Block.box(1, 6, 1, 15, 7, 15), Block.box(0, 7, 0, 16, 8, 1), Block.box(0, 7, 15, 16, 8, 16), Block.box(0, 7, 1, 1, 8, 15), Block.box(15, 7, 1, 16, 8, 15), Block.box(4, 7, 4, 12, 9, 12), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(3, 7, 4, 4, 8, 5), Block.box(3, 7, 11, 4, 8, 12), Block.box(4, 7, 12, 5, 8, 13), Block.box(11, 7, 12, 12, 8, 13), Block.box(12, 7, 11, 13, 8, 12), Block.box(12, 7, 4, 13, 8, 5), Block.box(11, 7, 3, 12, 8, 4), Block.box(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(9, 3, 0, 13, 4, 1), Block.makeCuboidShape(3, 3, 15, 7, 4, 16), Block.makeCuboidShape(9, 12, 0, 13, 13, 1), Block.makeCuboidShape(3, 12, 15, 7, 13, 16), Block.makeCuboidShape(10, 4, 0, 12, 12, 1), Block.makeCuboidShape(4, 4, 15, 6, 12, 16), Block.makeCuboidShape(0, 3, 3, 1, 4, 7), Block.makeCuboidShape(15, 3, 9, 16, 4, 13), Block.makeCuboidShape(0, 12, 3, 1, 13, 7), Block.makeCuboidShape(15, 12, 9, 16, 13, 13), Block.makeCuboidShape(0, 4, 4, 1, 12, 6), Block.makeCuboidShape(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(9, 3, 0, 13, 4, 1), Block.box(3, 3, 15, 7, 4, 16), Block.box(9, 12, 0, 13, 13, 1), Block.box(3, 12, 15, 7, 13, 16), Block.box(10, 4, 0, 12, 12, 1), Block.box(4, 4, 15, 6, 12, 16), Block.box(0, 3, 3, 1, 4, 7), Block.box(15, 3, 9, 16, 4, 13), Block.box(0, 12, 3, 1, 13, 7), Block.box(15, 12, 9, 16, 13, 13), Block.box(0, 4, 4, 1, 12, 6), Block.box(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape BARREL_SHAPE = Stream.of(Block.makeCuboidShape(0, 12, 0, 16, 14, 1), Block.makeCuboidShape(1, 0.5, 1, 15, 15, 15), Block.makeCuboidShape(0, 2, 15, 16, 4, 16), Block.makeCuboidShape(0, 7, 15, 16, 9, 16), Block.makeCuboidShape(0, 12, 15, 16, 14, 16), Block.makeCuboidShape(0, 2, 0, 16, 4, 1), Block.makeCuboidShape(0, 7, 0, 16, 9, 1), Block.makeCuboidShape(0, 2, 1, 1, 4, 15), Block.makeCuboidShape(0, 7, 1, 1, 9, 15), Block.makeCuboidShape(0, 12, 1, 1, 14, 15), Block.makeCuboidShape(15, 12, 1, 16, 14, 15), Block.makeCuboidShape(15, 7, 1, 16, 9, 15), Block.makeCuboidShape(15, 2, 1, 16, 4, 15), Block.makeCuboidShape(7, 0, 0.5, 9, 16, 1.5), Block.makeCuboidShape(0.5, 0, 7, 1.5, 16, 9), Block.makeCuboidShape(7, 0, 14.5, 9, 16, 15.5), Block.makeCuboidShape(14.5, 0, 7, 15.5, 16, 9), Block.makeCuboidShape(2, 0, 0.5, 5, 16, 1.5), Block.makeCuboidShape(0.5, 0, 11, 1.5, 16, 14), Block.makeCuboidShape(2, 0, 14.5, 5, 16, 15.5), Block.makeCuboidShape(14.5, 0, 11, 15.5, 16, 14), Block.makeCuboidShape(11, 0, 0.5, 14, 16, 1.5), Block.makeCuboidShape(0.5, 0, 2, 1.5, 16, 5), Block.makeCuboidShape(11, 0, 14.5, 14, 16, 15.5), Block.makeCuboidShape(14.5, 0, 2, 15.5, 16, 5), Block.makeCuboidShape(4, 15, 7, 6, 15.3, 9), Block.makeCuboidShape(2, 15, 4, 3, 15.3, 12), Block.makeCuboidShape(4, 15, 13, 12, 15.3, 14), Block.makeCuboidShape(4, 15, 2, 12, 15.3, 3), Block.makeCuboidShape(13, 15, 4, 14, 15.3, 12), Block.makeCuboidShape(3, 15, 3, 4, 15.3, 4), Block.makeCuboidShape(3, 15, 12, 4, 15.3, 13), Block.makeCuboidShape(12, 15, 3, 13, 15.3, 4), Block.makeCuboidShape(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape BARREL_SHAPE = Stream.of(Block.box(0, 12, 0, 16, 14, 1), Block.box(1, 0.5, 1, 15, 15, 15), Block.box(0, 2, 15, 16, 4, 16), Block.box(0, 7, 15, 16, 9, 16), Block.box(0, 12, 15, 16, 14, 16), Block.box(0, 2, 0, 16, 4, 1), Block.box(0, 7, 0, 16, 9, 1), Block.box(0, 2, 1, 1, 4, 15), Block.box(0, 7, 1, 1, 9, 15), Block.box(0, 12, 1, 1, 14, 15), Block.box(15, 12, 1, 16, 14, 15), Block.box(15, 7, 1, 16, 9, 15), Block.box(15, 2, 1, 16, 4, 15), Block.box(7, 0, 0.5, 9, 16, 1.5), Block.box(0.5, 0, 7, 1.5, 16, 9), Block.box(7, 0, 14.5, 9, 16, 15.5), Block.box(14.5, 0, 7, 15.5, 16, 9), Block.box(2, 0, 0.5, 5, 16, 1.5), Block.box(0.5, 0, 11, 1.5, 16, 14), Block.box(2, 0, 14.5, 5, 16, 15.5), Block.box(14.5, 0, 11, 15.5, 16, 14), Block.box(11, 0, 0.5, 14, 16, 1.5), Block.box(0.5, 0, 2, 1.5, 16, 5), Block.box(11, 0, 14.5, 14, 16, 15.5), Block.box(14.5, 0, 2, 15.5, 16, 5), Block.box(4, 15, 7, 6, 15.3, 9), Block.box(2, 15, 4, 3, 15.3, 12), Block.box(4, 15, 13, 12, 15.3, 14), Block.box(4, 15, 2, 12, 15.3, 3), Block.box(13, 15, 4, 14, 15.3, 12), Block.box(3, 15, 3, 4, 15.3, 4), Block.box(3, 15, 12, 4, 15.3, 13), Block.box(12, 15, 3, 13, 15.3, 4), Block.box(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(10, 14, 9, 12, 15, 10), Block.makeCuboidShape(7, 14, 9, 9, 15, 10), Block.makeCuboidShape(4, 14, 9, 6, 15, 10), Block.makeCuboidShape(10, 14, 6, 12, 15, 7), Block.makeCuboidShape(7, 14, 6, 9, 15, 7), Block.makeCuboidShape(4, 14, 6, 6, 15, 7), Block.makeCuboidShape(6, 14, 4, 7, 15, 12), Block.makeCuboidShape(9, 14, 4, 10, 15, 12), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 13, 2, 14, 14, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(10, 14, 9, 12, 15, 10), Block.box(7, 14, 9, 9, 15, 10), Block.box(4, 14, 9, 6, 15, 10), Block.box(10, 14, 6, 12, 15, 7), Block.box(7, 14, 6, 9, 15, 7), Block.box(4, 14, 6, 6, 15, 7), Block.box(6, 14, 4, 7, 15, 12), Block.box(9, 14, 4, 10, 15, 12), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 13, 2, 14, 14, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape GLASS_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape GLASS_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape HEAT_COLLECTOR_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(15, 11, 4, 16, 12, 12), Block.makeCuboidShape(15, 5, 4, 16, 6, 12), Block.makeCuboidShape(15, 7, 4, 16, 8, 12), Block.makeCuboidShape(15, 9, 4, 16, 10, 12), Block.makeCuboidShape(4, 11, 15, 12, 12, 16), Block.makeCuboidShape(4, 9, 15, 12, 10, 16), Block.makeCuboidShape(4, 7, 15, 12, 8, 16), Block.makeCuboidShape(4, 5, 15, 12, 6, 16), Block.makeCuboidShape(0, 11, 4, 1, 12, 12), Block.makeCuboidShape(0, 5, 4, 1, 6, 12), Block.makeCuboidShape(0, 7, 4, 1, 8, 12), Block.makeCuboidShape(0, 9, 4, 1, 10, 12), Block.makeCuboidShape(4, 11, 0, 12, 12, 1), Block.makeCuboidShape(4, 9, 0, 12, 10, 1), Block.makeCuboidShape(4, 7, 0, 12, 8, 1), Block.makeCuboidShape(4, 5, 0, 12, 6, 1), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape HEAT_COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(15, 11, 4, 16, 12, 12), Block.box(15, 5, 4, 16, 6, 12), Block.box(15, 7, 4, 16, 8, 12), Block.box(15, 9, 4, 16, 10, 12), Block.box(4, 11, 15, 12, 12, 16), Block.box(4, 9, 15, 12, 10, 16), Block.box(4, 7, 15, 12, 8, 16), Block.box(4, 5, 15, 12, 6, 16), Block.box(0, 11, 4, 1, 12, 12), Block.box(0, 5, 4, 1, 6, 12), Block.box(0, 7, 4, 1, 8, 12), Block.box(0, 9, 4, 1, 10, 12), Block.box(4, 11, 0, 12, 12, 1), Block.box(4, 9, 0, 12, 10, 1), Block.box(4, 7, 0, 12, 8, 1), Block.box(4, 5, 0, 12, 6, 1), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.makeCuboidShape(0, 10, 0, 16, 11, 16), Block.makeCuboidShape(1, 11, 1, 2, 15, 15), Block.makeCuboidShape(14, 11, 1, 15, 15, 15), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(4, 4, 4, 12, 10, 12), Block.makeCuboidShape(6, 0, 6, 10, 4, 10), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 11, 0, 1, 15, 1), Block.makeCuboidShape(0, 11, 15, 1, 15, 16), Block.makeCuboidShape(15, 11, 15, 16, 15, 16), Block.makeCuboidShape(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.box(0, 10, 0, 16, 11, 16), Block.box(1, 11, 1, 2, 15, 15), Block.box(14, 11, 1, 15, 15, 15), Block.box(2, 11, 1, 14, 15, 2), Block.box(2, 11, 14, 14, 15, 15), Block.box(4, 4, 4, 12, 10, 12), Block.box(6, 0, 6, 10, 4, 10), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 11, 0, 1, 15, 1), Block.box(0, 11, 15, 1, 15, 16), Block.box(15, 11, 15, 16, 15, 16), Block.box(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape BOOSTER_SHAPE = Stream.of(Block.makeCuboidShape(5, 12, 12, 11, 13, 13), Block.makeCuboidShape(6, 0, 6, 10, 16, 10), Block.makeCuboidShape(5, 2, 5, 11, 3, 11), Block.makeCuboidShape(5, 4, 12, 11, 5, 13), Block.makeCuboidShape(5, 6, 12, 11, 7, 13), Block.makeCuboidShape(5, 8, 12, 11, 9, 13), Block.makeCuboidShape(5, 10, 12, 11, 11, 13), Block.makeCuboidShape(5, 4, 3, 11, 5, 4), Block.makeCuboidShape(5, 6, 3, 11, 7, 4), Block.makeCuboidShape(5, 8, 3, 11, 9, 4), Block.makeCuboidShape(5, 10, 3, 11, 11, 4), Block.makeCuboidShape(5, 12, 3, 11, 13, 4), Block.makeCuboidShape(3, 4, 5, 4, 5, 11), Block.makeCuboidShape(3, 6, 5, 4, 7, 11), Block.makeCuboidShape(3, 8, 5, 4, 9, 11), Block.makeCuboidShape(3, 10, 5, 4, 11, 11), Block.makeCuboidShape(3, 12, 5, 4, 13, 11), Block.makeCuboidShape(12, 4, 5, 13, 5, 11), Block.makeCuboidShape(12, 6, 5, 13, 7, 11), Block.makeCuboidShape(12, 8, 5, 13, 9, 11), Block.makeCuboidShape(12, 10, 5, 13, 11, 11), Block.makeCuboidShape(12, 12, 5, 13, 13, 11), Block.makeCuboidShape(5, 14, 5, 11, 15, 11), Block.makeCuboidShape(4, 4, 11, 5, 5, 12), Block.makeCuboidShape(4, 6, 11, 5, 7, 12), Block.makeCuboidShape(4, 8, 11, 5, 9, 12), Block.makeCuboidShape(4, 10, 11, 5, 11, 12), Block.makeCuboidShape(4, 12, 11, 5, 13, 12), Block.makeCuboidShape(4, 4, 4, 5, 5, 5), Block.makeCuboidShape(4, 6, 4, 5, 7, 5), Block.makeCuboidShape(4, 8, 4, 5, 9, 5), Block.makeCuboidShape(4, 10, 4, 5, 11, 5), Block.makeCuboidShape(4, 12, 4, 5, 13, 5), Block.makeCuboidShape(11, 4, 4, 12, 5, 5), Block.makeCuboidShape(11, 6, 4, 12, 7, 5), Block.makeCuboidShape(11, 8, 4, 12, 9, 5), Block.makeCuboidShape(11, 10, 4, 12, 11, 5), Block.makeCuboidShape(11, 12, 4, 12, 13, 5), Block.makeCuboidShape(11, 4, 11, 12, 5, 12), Block.makeCuboidShape(11, 6, 11, 12, 7, 12), Block.makeCuboidShape(11, 8, 11, 12, 9, 12), Block.makeCuboidShape(11, 10, 11, 12, 11, 12), Block.makeCuboidShape(11, 12, 11, 12, 13, 12)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape BOOSTER_SHAPE = Stream.of(Block.box(5, 12, 12, 11, 13, 13), Block.box(6, 0, 6, 10, 16, 10), Block.box(5, 2, 5, 11, 3, 11), Block.box(5, 4, 12, 11, 5, 13), Block.box(5, 6, 12, 11, 7, 13), Block.box(5, 8, 12, 11, 9, 13), Block.box(5, 10, 12, 11, 11, 13), Block.box(5, 4, 3, 11, 5, 4), Block.box(5, 6, 3, 11, 7, 4), Block.box(5, 8, 3, 11, 9, 4), Block.box(5, 10, 3, 11, 11, 4), Block.box(5, 12, 3, 11, 13, 4), Block.box(3, 4, 5, 4, 5, 11), Block.box(3, 6, 5, 4, 7, 11), Block.box(3, 8, 5, 4, 9, 11), Block.box(3, 10, 5, 4, 11, 11), Block.box(3, 12, 5, 4, 13, 11), Block.box(12, 4, 5, 13, 5, 11), Block.box(12, 6, 5, 13, 7, 11), Block.box(12, 8, 5, 13, 9, 11), Block.box(12, 10, 5, 13, 11, 11), Block.box(12, 12, 5, 13, 13, 11), Block.box(5, 14, 5, 11, 15, 11), Block.box(4, 4, 11, 5, 5, 12), Block.box(4, 6, 11, 5, 7, 12), Block.box(4, 8, 11, 5, 9, 12), Block.box(4, 10, 11, 5, 11, 12), Block.box(4, 12, 11, 5, 13, 12), Block.box(4, 4, 4, 5, 5, 5), Block.box(4, 6, 4, 5, 7, 5), Block.box(4, 8, 4, 5, 9, 5), Block.box(4, 10, 4, 5, 11, 5), Block.box(4, 12, 4, 5, 13, 5), Block.box(11, 4, 4, 12, 5, 5), Block.box(11, 6, 4, 12, 7, 5), Block.box(11, 8, 4, 12, 9, 5), Block.box(11, 10, 4, 12, 11, 5), Block.box(11, 12, 4, 12, 13, 5), Block.box(11, 4, 11, 12, 5, 12), Block.box(11, 6, 11, 12, 7, 12), Block.box(11, 8, 11, 12, 9, 12), Block.box(11, 10, 11, 12, 11, 12), Block.box(11, 12, 11, 12, 13, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 1, 4, 2, 4, 12), Block.makeCuboidShape(14, 1, 4, 15, 4, 12), Block.makeCuboidShape(4, 1, 1, 12, 4, 2), Block.makeCuboidShape(4, 1, 14, 12, 4, 15), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(1, 1, 12, 2, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 4), Block.makeCuboidShape(1, 1, 1, 4, 15, 2), Block.makeCuboidShape(12, 1, 14, 15, 15, 15), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 4), Block.makeCuboidShape(14, 1, 12, 15, 15, 14), Block.makeCuboidShape(12, 1, 1, 15, 15, 2), Block.makeCuboidShape(1, 1, 14, 4, 15, 15), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 2, 2, 14, 14, 14), Block.makeCuboidShape(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 1, 4, 2, 4, 12), Block.box(14, 1, 4, 15, 4, 12), Block.box(4, 1, 1, 12, 4, 2), Block.box(4, 1, 14, 12, 4, 15), Block.box(4, 14, 12, 12, 15, 14), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 12, 4, 15, 15, 12), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 14, 2, 12, 15, 4), Block.box(1, 1, 12, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 4), Block.box(1, 1, 1, 4, 15, 2), Block.box(12, 1, 14, 15, 15, 15), Block.box(12, 14, 2, 14, 15, 14), Block.box(1, 1, 2, 2, 15, 4), Block.box(14, 1, 12, 15, 15, 14), Block.box(12, 1, 1, 15, 15, 2), Block.box(1, 1, 14, 4, 15, 15), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 2, 2, 14, 14, 14), Block.box(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SUPPRESSOR_SHAPE = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(9, 13, 9, 13, 16, 13), Block.makeCuboidShape(9, 2, 9, 13, 3, 13), Block.makeCuboidShape(3, 13, 9, 7, 16, 13), Block.makeCuboidShape(3, 2, 9, 7, 3, 13), Block.makeCuboidShape(9, 13, 3, 13, 16, 7), Block.makeCuboidShape(9, 2, 3, 13, 3, 7), Block.makeCuboidShape(3, 13, 3, 7, 16, 7), Block.makeCuboidShape(3, 2, 3, 7, 3, 7), Block.makeCuboidShape(4, 3, 10, 6, 13, 12), Block.makeCuboidShape(10, 3, 10, 12, 13, 12), Block.makeCuboidShape(10, 3, 4, 12, 13, 6), Block.makeCuboidShape(4, 3, 4, 6, 13, 6)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SUPPRESSOR_SHAPE = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(9, 13, 9, 13, 16, 13), Block.box(9, 2, 9, 13, 3, 13), Block.box(3, 13, 9, 7, 16, 13), Block.box(3, 2, 9, 7, 3, 13), Block.box(9, 13, 3, 13, 16, 7), Block.box(9, 2, 3, 13, 3, 7), Block.box(3, 13, 3, 7, 16, 7), Block.box(3, 2, 3, 7, 3, 7), Block.box(4, 3, 10, 6, 13, 12), Block.box(10, 3, 10, 12, 13, 12), Block.box(10, 3, 4, 12, 13, 6), Block.box(4, 3, 4, 6, 13, 6)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape RELAY_SHAPE = Stream.of(Block.makeCuboidShape(6, 4, 6, 7, 6, 7), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(4, 2, 4, 12, 4, 12), Block.makeCuboidShape(9, 4, 9, 10, 6, 10), Block.makeCuboidShape(6, 4, 9, 7, 6, 10), Block.makeCuboidShape(3, 1, 12, 4, 5, 13), Block.makeCuboidShape(12, 1, 12, 13, 5, 13), Block.makeCuboidShape(3, 1, 3, 4, 5, 4), Block.makeCuboidShape(12, 1, 3, 13, 5, 4), Block.makeCuboidShape(3, 4, 4, 4, 5, 12), Block.makeCuboidShape(3, 1, 4, 4, 2, 12), Block.makeCuboidShape(12, 4, 4, 13, 5, 12), Block.makeCuboidShape(12, 1, 4, 13, 2, 12), Block.makeCuboidShape(4, 4, 12, 12, 5, 13), Block.makeCuboidShape(4, 4, 3, 12, 5, 4), Block.makeCuboidShape(4, 1, 12, 12, 2, 13), Block.makeCuboidShape(4, 1, 3, 12, 2, 4), Block.makeCuboidShape(9, 4, 6, 10, 6, 7), Block.makeCuboidShape(7, 4, 7, 9, 6, 9), Block.makeCuboidShape(7, 6, 7, 9, 10, 9), Block.makeCuboidShape(6.5, 5, 7, 7, 6, 9), Block.makeCuboidShape(6.5, 7, 7, 7, 7.5, 9), Block.makeCuboidShape(6.5, 9, 7, 7, 9.5, 9), Block.makeCuboidShape(9, 5, 7, 9.5, 6, 9), Block.makeCuboidShape(9, 7, 7, 9.5, 7.5, 9), Block.makeCuboidShape(9, 9, 7, 9.5, 9.5, 9), Block.makeCuboidShape(7, 5, 6.5, 9, 6, 7), Block.makeCuboidShape(7, 7, 6.5, 9, 7.5, 7), Block.makeCuboidShape(7, 9, 6.5, 9, 9.5, 7), Block.makeCuboidShape(7, 5, 9, 9, 6, 9.5), Block.makeCuboidShape(7, 7, 9, 9, 7.5, 9.5), Block.makeCuboidShape(7, 9, 9, 9, 9.5, 9.5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape RELAY_SHAPE = Stream.of(Block.box(6, 4, 6, 7, 6, 7), Block.box(1, 0, 1, 15, 1, 15), Block.box(4, 2, 4, 12, 4, 12), Block.box(9, 4, 9, 10, 6, 10), Block.box(6, 4, 9, 7, 6, 10), Block.box(3, 1, 12, 4, 5, 13), Block.box(12, 1, 12, 13, 5, 13), Block.box(3, 1, 3, 4, 5, 4), Block.box(12, 1, 3, 13, 5, 4), Block.box(3, 4, 4, 4, 5, 12), Block.box(3, 1, 4, 4, 2, 12), Block.box(12, 4, 4, 13, 5, 12), Block.box(12, 1, 4, 13, 2, 12), Block.box(4, 4, 12, 12, 5, 13), Block.box(4, 4, 3, 12, 5, 4), Block.box(4, 1, 12, 12, 2, 13), Block.box(4, 1, 3, 12, 2, 4), Block.box(9, 4, 6, 10, 6, 7), Block.box(7, 4, 7, 9, 6, 9), Block.box(7, 6, 7, 9, 10, 9), Block.box(6.5, 5, 7, 7, 6, 9), Block.box(6.5, 7, 7, 7, 7.5, 9), Block.box(6.5, 9, 7, 7, 9.5, 9), Block.box(9, 5, 7, 9.5, 6, 9), Block.box(9, 7, 7, 9.5, 7.5, 9), Block.box(9, 9, 7, 9.5, 9.5, 9), Block.box(7, 5, 6.5, 9, 6, 7), Block.box(7, 7, 6.5, 9, 7.5, 7), Block.box(7, 9, 6.5, 9, 9.5, 7), Block.box(7, 5, 9, 9, 6, 9.5), Block.box(7, 7, 9, 9, 7.5, 9.5), Block.box(7, 9, 9, 9, 9.5, 9.5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final class CoalGeneratorShapes { static final class CoalGeneratorShapes {
static final VoxelShape NORTH = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(3, 11, 0, 13, 12, 1), Block.makeCuboidShape(5, 3, 1, 6, 8, 2), Block.makeCuboidShape(10, 3, 1, 11, 8, 2), Block.makeCuboidShape(3, 8, 1, 13, 15, 2), Block.makeCuboidShape(3, 0, 1, 13, 3, 2), Block.makeCuboidShape(1, 0, 1, 3, 15, 2), Block.makeCuboidShape(13, 0, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape NORTH = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 11, 0, 13, 12, 1), Block.box(5, 3, 1, 6, 8, 2), Block.box(10, 3, 1, 11, 8, 2), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape EAST = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(15, 11, 3, 16, 12, 13), Block.makeCuboidShape(14, 3, 5, 15, 8, 6), Block.makeCuboidShape(14, 3, 10, 15, 8, 11), Block.makeCuboidShape(14, 8, 3, 15, 15, 13), Block.makeCuboidShape(14, 0, 3, 15, 3, 13), Block.makeCuboidShape(14, 0, 1, 15, 15, 3), Block.makeCuboidShape(14, 0, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape EAST = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(15, 11, 3, 16, 12, 13), Block.box(14, 3, 5, 15, 8, 6), Block.box(14, 3, 10, 15, 8, 11), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SOUTH = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(3, 11, 15, 13, 12, 16), Block.makeCuboidShape(10, 3, 14, 11, 8, 15), Block.makeCuboidShape(5, 3, 14, 6, 8, 15), Block.makeCuboidShape(3, 8, 14, 13, 15, 15), Block.makeCuboidShape(3, 0, 14, 13, 3, 15), Block.makeCuboidShape(13, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SOUTH = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 11, 15, 13, 12, 16), Block.box(10, 3, 14, 11, 8, 15), Block.box(5, 3, 14, 6, 8, 15), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape WEST = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(0, 11, 3, 1, 12, 13), Block.makeCuboidShape(1, 3, 10, 2, 8, 11), Block.makeCuboidShape(1, 3, 5, 2, 8, 6), Block.makeCuboidShape(1, 8, 3, 2, 15, 13), Block.makeCuboidShape(1, 0, 3, 2, 3, 13), Block.makeCuboidShape(1, 0, 13, 2, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape WEST = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 11, 3, 1, 12, 13), Block.box(1, 3, 10, 2, 8, 11), Block.box(1, 3, 5, 2, 8, 6), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static class CoffeeMachineShapes { static class CoffeeMachineShapes {
static final VoxelShape NORTH = Stream.of(Block.makeCuboidShape(8, 11, 7, 13, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(7, 1, 8, 14, 9, 14), Block.makeCuboidShape(6, 9, 3, 15, 11, 15), Block.makeCuboidShape(8, 11, 8, 13, 13, 13), Block.makeCuboidShape(10, 8, 3.5, 11, 9, 4.5), Block.makeCuboidShape(9, 1, 2, 12, 2, 5), Block.makeCuboidShape(9, 2, 5, 12, 7, 6), Block.makeCuboidShape(9, 2, 1, 12, 7, 2), Block.makeCuboidShape(12, 2, 2, 13, 7, 5), Block.makeCuboidShape(8, 2, 2, 9, 7, 5), Block.makeCuboidShape(13, 2, 3, 14, 3, 4), Block.makeCuboidShape(13, 5, 3, 14, 6, 4), Block.makeCuboidShape(14, 3, 3, 15, 5, 4), Block.makeCuboidShape(13, 10.2, 4.2, 14, 11.2, 5.2), Block.makeCuboidShape(11, 10.2, 4.2, 12, 11.2, 5.2), Block.makeCuboidShape(13, 11, 7, 14, 14, 14), Block.makeCuboidShape(7, 11, 7, 8, 14, 14), Block.makeCuboidShape(8, 11, 13, 13, 14, 14), Block.makeCuboidShape(14, 1, 14, 15, 9, 15), Block.makeCuboidShape(6, 1, 14, 7, 9, 15), Block.makeCuboidShape(14, 1, 7, 15, 9, 8), Block.makeCuboidShape(6, 1, 7, 7, 9, 8), Block.makeCuboidShape(6.8, 1.9, 11.9, 7, 3.1, 13.1), Block.makeCuboidShape(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.makeCuboidShape(3, 3, 10, 4, 5, 11), Block.makeCuboidShape(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.makeCuboidShape(2.9, 4.8, 11.9, 4.1, 5, 13.1), Block.makeCuboidShape(3, 2, 12, 7, 3, 13), Block.makeCuboidShape(3, 2, 10, 7, 3, 11), Block.makeCuboidShape(3, 3, 12, 4, 5, 13), Block.makeCuboidShape(2, 5, 9, 5, 11, 14), Block.makeCuboidShape(2, 11, 11, 4, 12, 13), Block.makeCuboidShape(1, 1, 11, 2, 12, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape NORTH = Stream.of(Block.box(8, 11, 7, 13, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(7, 1, 8, 14, 9, 14), Block.box(6, 9, 3, 15, 11, 15), Block.box(8, 11, 8, 13, 13, 13), Block.box(10, 8, 3.5, 11, 9, 4.5), Block.box(9, 1, 2, 12, 2, 5), Block.box(9, 2, 5, 12, 7, 6), Block.box(9, 2, 1, 12, 7, 2), Block.box(12, 2, 2, 13, 7, 5), Block.box(8, 2, 2, 9, 7, 5), Block.box(13, 2, 3, 14, 3, 4), Block.box(13, 5, 3, 14, 6, 4), Block.box(14, 3, 3, 15, 5, 4), Block.box(13, 10.2, 4.2, 14, 11.2, 5.2), Block.box(11, 10.2, 4.2, 12, 11.2, 5.2), Block.box(13, 11, 7, 14, 14, 14), Block.box(7, 11, 7, 8, 14, 14), Block.box(8, 11, 13, 13, 14, 14), Block.box(14, 1, 14, 15, 9, 15), Block.box(6, 1, 14, 7, 9, 15), Block.box(14, 1, 7, 15, 9, 8), Block.box(6, 1, 7, 7, 9, 8), Block.box(6.8, 1.9, 11.9, 7, 3.1, 13.1), Block.box(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.box(3, 3, 10, 4, 5, 11), Block.box(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.box(2.9, 4.8, 11.9, 4.1, 5, 13.1), Block.box(3, 2, 12, 7, 3, 13), Block.box(3, 2, 10, 7, 3, 11), Block.box(3, 3, 12, 4, 5, 13), Block.box(2, 5, 9, 5, 11, 14), Block.box(2, 11, 11, 4, 12, 13), Block.box(1, 1, 11, 2, 12, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape EAST = Stream.of(Block.makeCuboidShape(8, 11, 8, 9, 14, 13), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(2, 1, 7, 8, 9, 14), Block.makeCuboidShape(1, 9, 6, 13, 11, 15), Block.makeCuboidShape(3, 11, 8, 8, 13, 13), Block.makeCuboidShape(11.5, 8, 10, 12.5, 9, 11), Block.makeCuboidShape(11, 1, 9, 14, 2, 12), Block.makeCuboidShape(10, 2, 9, 11, 7, 12), Block.makeCuboidShape(14, 2, 9, 15, 7, 12), Block.makeCuboidShape(11, 2, 12, 14, 7, 13), Block.makeCuboidShape(11, 2, 8, 14, 7, 9), Block.makeCuboidShape(12, 2, 13, 13, 3, 14), Block.makeCuboidShape(12, 5, 13, 13, 6, 14), Block.makeCuboidShape(12, 3, 14, 13, 5, 15), Block.makeCuboidShape(10.8, 10.2, 13, 11.8, 11.2, 14), Block.makeCuboidShape(10.8, 10.2, 11, 11.8, 11.2, 12), Block.makeCuboidShape(2, 11, 13, 9, 14, 14), Block.makeCuboidShape(2, 11, 7, 9, 14, 8), Block.makeCuboidShape(2, 11, 8, 3, 14, 13), Block.makeCuboidShape(1, 1, 14, 2, 9, 15), Block.makeCuboidShape(1, 1, 6, 2, 9, 7), Block.makeCuboidShape(8, 1, 14, 9, 9, 15), Block.makeCuboidShape(8, 1, 6, 9, 9, 7), Block.makeCuboidShape(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), Block.makeCuboidShape(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.makeCuboidShape(5, 3, 3, 6, 5, 4), Block.makeCuboidShape(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.makeCuboidShape(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), Block.makeCuboidShape(3, 2, 3, 4, 3, 7), Block.makeCuboidShape(5, 2, 3, 6, 3, 7), Block.makeCuboidShape(3, 3, 3, 4, 5, 4), Block.makeCuboidShape(2, 5, 2, 7, 11, 5), Block.makeCuboidShape(3, 11, 2, 5, 12, 4), Block.makeCuboidShape(3, 1, 1, 5, 12, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape EAST = Stream.of(Block.box(8, 11, 8, 9, 14, 13), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 7, 8, 9, 14), Block.box(1, 9, 6, 13, 11, 15), Block.box(3, 11, 8, 8, 13, 13), Block.box(11.5, 8, 10, 12.5, 9, 11), Block.box(11, 1, 9, 14, 2, 12), Block.box(10, 2, 9, 11, 7, 12), Block.box(14, 2, 9, 15, 7, 12), Block.box(11, 2, 12, 14, 7, 13), Block.box(11, 2, 8, 14, 7, 9), Block.box(12, 2, 13, 13, 3, 14), Block.box(12, 5, 13, 13, 6, 14), Block.box(12, 3, 14, 13, 5, 15), Block.box(10.8, 10.2, 13, 11.8, 11.2, 14), Block.box(10.8, 10.2, 11, 11.8, 11.2, 12), Block.box(2, 11, 13, 9, 14, 14), Block.box(2, 11, 7, 9, 14, 8), Block.box(2, 11, 8, 3, 14, 13), Block.box(1, 1, 14, 2, 9, 15), Block.box(1, 1, 6, 2, 9, 7), Block.box(8, 1, 14, 9, 9, 15), Block.box(8, 1, 6, 9, 9, 7), Block.box(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), Block.box(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.box(5, 3, 3, 6, 5, 4), Block.box(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.box(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), Block.box(3, 2, 3, 4, 3, 7), Block.box(5, 2, 3, 6, 3, 7), Block.box(3, 3, 3, 4, 5, 4), Block.box(2, 5, 2, 7, 11, 5), Block.box(3, 11, 2, 5, 12, 4), Block.box(3, 1, 1, 5, 12, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SOUTH = Stream.of(Block.makeCuboidShape(3, 11, 8, 8, 14, 9), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(2, 1, 2, 9, 9, 8), Block.makeCuboidShape(1, 9, 1, 10, 11, 13), Block.makeCuboidShape(3, 11, 3, 8, 13, 8), Block.makeCuboidShape(5, 8, 11.5, 6, 9, 12.5), Block.makeCuboidShape(4, 1, 11, 7, 2, 14), Block.makeCuboidShape(4, 2, 10, 7, 7, 11), Block.makeCuboidShape(4, 2, 14, 7, 7, 15), Block.makeCuboidShape(3, 2, 11, 4, 7, 14), Block.makeCuboidShape(7, 2, 11, 8, 7, 14), Block.makeCuboidShape(2, 2, 12, 3, 3, 13), Block.makeCuboidShape(2, 5, 12, 3, 6, 13), Block.makeCuboidShape(1, 3, 12, 2, 5, 13), Block.makeCuboidShape(2, 10.2, 10.8, 3, 11.2, 11.8), Block.makeCuboidShape(4, 10.2, 10.8, 5, 11.2, 11.8), Block.makeCuboidShape(2, 11, 2, 3, 14, 9), Block.makeCuboidShape(8, 11, 2, 9, 14, 9), Block.makeCuboidShape(3, 11, 2, 8, 14, 3), Block.makeCuboidShape(1, 1, 1, 2, 9, 2), Block.makeCuboidShape(9, 1, 1, 10, 9, 2), Block.makeCuboidShape(1, 1, 8, 2, 9, 9), Block.makeCuboidShape(9, 1, 8, 10, 9, 9), Block.makeCuboidShape(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), Block.makeCuboidShape(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.makeCuboidShape(12, 3, 5, 13, 5, 6), Block.makeCuboidShape(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.makeCuboidShape(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), Block.makeCuboidShape(9, 2, 3, 13, 3, 4), Block.makeCuboidShape(9, 2, 5, 13, 3, 6), Block.makeCuboidShape(12, 3, 3, 13, 5, 4), Block.makeCuboidShape(11, 5, 2, 14, 11, 7), Block.makeCuboidShape(12, 11, 3, 14, 12, 5), Block.makeCuboidShape(14, 1, 3, 15, 12, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SOUTH = Stream.of(Block.box(3, 11, 8, 8, 14, 9), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 2, 9, 9, 8), Block.box(1, 9, 1, 10, 11, 13), Block.box(3, 11, 3, 8, 13, 8), Block.box(5, 8, 11.5, 6, 9, 12.5), Block.box(4, 1, 11, 7, 2, 14), Block.box(4, 2, 10, 7, 7, 11), Block.box(4, 2, 14, 7, 7, 15), Block.box(3, 2, 11, 4, 7, 14), Block.box(7, 2, 11, 8, 7, 14), Block.box(2, 2, 12, 3, 3, 13), Block.box(2, 5, 12, 3, 6, 13), Block.box(1, 3, 12, 2, 5, 13), Block.box(2, 10.2, 10.8, 3, 11.2, 11.8), Block.box(4, 10.2, 10.8, 5, 11.2, 11.8), Block.box(2, 11, 2, 3, 14, 9), Block.box(8, 11, 2, 9, 14, 9), Block.box(3, 11, 2, 8, 14, 3), Block.box(1, 1, 1, 2, 9, 2), Block.box(9, 1, 1, 10, 9, 2), Block.box(1, 1, 8, 2, 9, 9), Block.box(9, 1, 8, 10, 9, 9), Block.box(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), Block.box(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.box(12, 3, 5, 13, 5, 6), Block.box(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.box(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), Block.box(9, 2, 3, 13, 3, 4), Block.box(9, 2, 5, 13, 3, 6), Block.box(12, 3, 3, 13, 5, 4), Block.box(11, 5, 2, 14, 11, 7), Block.box(12, 11, 3, 14, 12, 5), Block.box(14, 1, 3, 15, 12, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape WEST = Stream.of(Block.makeCuboidShape(7, 11, 3, 8, 14, 8), Block.makeCuboidShape(1, 0, 1, 15, 1, 15), Block.makeCuboidShape(8, 1, 2, 14, 9, 9), Block.makeCuboidShape(3, 9, 1, 15, 11, 10), Block.makeCuboidShape(8, 11, 3, 13, 13, 8), Block.makeCuboidShape(3.5, 8, 5, 4.5, 9, 6), Block.makeCuboidShape(2, 1, 4, 5, 2, 7), Block.makeCuboidShape(5, 2, 4, 6, 7, 7), Block.makeCuboidShape(1, 2, 4, 2, 7, 7), Block.makeCuboidShape(2, 2, 3, 5, 7, 4), Block.makeCuboidShape(2, 2, 7, 5, 7, 8), Block.makeCuboidShape(3, 2, 2, 4, 3, 3), Block.makeCuboidShape(3, 5, 2, 4, 6, 3), Block.makeCuboidShape(3, 3, 1, 4, 5, 2), Block.makeCuboidShape(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.makeCuboidShape(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), Block.makeCuboidShape(7, 11, 2, 14, 14, 3), Block.makeCuboidShape(7, 11, 8, 14, 14, 9), Block.makeCuboidShape(13, 11, 3, 14, 14, 8), Block.makeCuboidShape(14, 1, 1, 15, 9, 2), Block.makeCuboidShape(14, 1, 9, 15, 9, 10), Block.makeCuboidShape(7, 1, 1, 8, 9, 2), Block.makeCuboidShape(7, 1, 9, 8, 9, 10), Block.makeCuboidShape(11.9, 1.9, 9, 13.1, 3.1, 9.2), Block.makeCuboidShape(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.makeCuboidShape(10, 3, 12, 11, 5, 13), Block.makeCuboidShape(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.makeCuboidShape(11.9, 4.8, 11.9, 13.1, 5, 13.1), Block.makeCuboidShape(12, 2, 9, 13, 3, 13), Block.makeCuboidShape(10, 2, 9, 11, 3, 13), Block.makeCuboidShape(12, 3, 12, 13, 5, 13), Block.makeCuboidShape(9, 5, 11, 14, 11, 14), Block.makeCuboidShape(11, 11, 12, 13, 12, 14), Block.makeCuboidShape(11, 1, 14, 13, 12, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape WEST = Stream.of(Block.box(7, 11, 3, 8, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(8, 1, 2, 14, 9, 9), Block.box(3, 9, 1, 15, 11, 10), Block.box(8, 11, 3, 13, 13, 8), Block.box(3.5, 8, 5, 4.5, 9, 6), Block.box(2, 1, 4, 5, 2, 7), Block.box(5, 2, 4, 6, 7, 7), Block.box(1, 2, 4, 2, 7, 7), Block.box(2, 2, 3, 5, 7, 4), Block.box(2, 2, 7, 5, 7, 8), Block.box(3, 2, 2, 4, 3, 3), Block.box(3, 5, 2, 4, 6, 3), Block.box(3, 3, 1, 4, 5, 2), Block.box(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.box(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), Block.box(7, 11, 2, 14, 14, 3), Block.box(7, 11, 8, 14, 14, 9), Block.box(13, 11, 3, 14, 14, 8), Block.box(14, 1, 1, 15, 9, 2), Block.box(14, 1, 9, 15, 9, 10), Block.box(7, 1, 1, 8, 9, 2), Block.box(7, 1, 9, 8, 9, 10), Block.box(11.9, 1.9, 9, 13.1, 3.1, 9.2), Block.box(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.box(10, 3, 12, 11, 5, 13), Block.box(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.box(11.9, 4.8, 11.9, 13.1, 5, 13.1), Block.box(12, 2, 9, 13, 3, 13), Block.box(10, 2, 9, 11, 3, 13), Block.box(12, 3, 12, 13, 5, 13), Block.box(9, 5, 11, 14, 11, 14), Block.box(11, 11, 12, 13, 12, 14), Block.box(11, 1, 14, 13, 12, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static class DirectionalBlockBreakerShapes { static class DirectionalBlockBreakerShapes {
static final VoxelShape SHAPE_U = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 9, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 13, 7), Block.makeCuboidShape(0, 3, 9, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 7), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 9, 16, 13, 13), Block.box(15, 3, 3, 16, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_D = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 3, 16, 13, 7), Block.makeCuboidShape(15, 3, 9, 16, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 7), Block.makeCuboidShape(0, 3, 9, 1, 13, 13), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 3, 16, 13, 7), Block.box(15, 3, 9, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 9, 3, 1, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 7, 13), Block.makeCuboidShape(15, 9, 3, 16, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 7, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 9, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 0, 13, 7, 1), Block.makeCuboidShape(3, 9, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 15, 13, 7, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static class FarmerShapes { static class FarmerShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 5, 15, 2), Block.makeCuboidShape(5, 5, 2, 11, 11, 3), Block.makeCuboidShape(5, 0, 1, 11, 5, 2), Block.makeCuboidShape(5, 11, 1, 11, 15, 2), Block.makeCuboidShape(11, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(11, 14, 4, 12, 15, 5), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 5, 15, 2), Block.box(5, 5, 2, 11, 11, 3), Block.box(5, 0, 1, 11, 5, 2), Block.box(5, 11, 1, 11, 15, 2), Block.box(11, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 5), Block.makeCuboidShape(13, 5, 5, 14, 11, 11), Block.makeCuboidShape(14, 0, 5, 15, 5, 11), Block.makeCuboidShape(14, 11, 5, 15, 15, 11), Block.makeCuboidShape(14, 0, 11, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(11, 14, 11, 12, 15, 12), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 5), Block.box(13, 5, 5, 14, 11, 11), Block.box(14, 0, 5, 15, 5, 11), Block.box(14, 11, 5, 15, 15, 11), Block.box(14, 0, 11, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(11, 0, 14, 15, 15, 15), Block.makeCuboidShape(5, 5, 13, 11, 11, 14), Block.makeCuboidShape(5, 0, 14, 11, 5, 15), Block.makeCuboidShape(5, 11, 14, 11, 15, 15), Block.makeCuboidShape(1, 0, 14, 5, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(4, 14, 11, 5, 15, 12), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(11, 0, 14, 15, 15, 15), Block.box(5, 5, 13, 11, 11, 14), Block.box(5, 0, 14, 11, 5, 15), Block.box(5, 11, 14, 11, 15, 15), Block.box(1, 0, 14, 5, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 11, 2, 15, 15), Block.makeCuboidShape(2, 5, 5, 3, 11, 11), Block.makeCuboidShape(1, 0, 5, 2, 5, 11), Block.makeCuboidShape(1, 11, 5, 2, 15, 11), Block.makeCuboidShape(1, 0, 1, 2, 15, 5), Block.makeCuboidShape(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(4, 14, 4, 5, 15, 5), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 11, 2, 15, 15), Block.box(2, 5, 5, 3, 11, 11), Block.box(1, 0, 5, 2, 5, 11), Block.box(1, 11, 5, 2, 15, 11), Block.box(1, 0, 1, 2, 15, 5), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static class FluidCollectorShapes { static class FluidCollectorShapes {
static final VoxelShape SHAPE_U = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 15, 5, 11, 16, 11), Block.makeCuboidShape(3, 15, 6, 5, 16, 10), Block.makeCuboidShape(11, 15, 6, 13, 16, 10), Block.makeCuboidShape(6, 15, 11, 10, 16, 13), Block.makeCuboidShape(6, 15, 3, 10, 16, 5)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10), Block.box(6, 15, 11, 10, 16, 13), Block.box(6, 15, 3, 10, 16, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_D = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(15, 3, 6, 16, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 13, 10), Block.makeCuboidShape(5, 0, 5, 11, 1, 11), Block.makeCuboidShape(3, 0, 6, 5, 1, 10), Block.makeCuboidShape(11, 0, 6, 13, 1, 10), Block.makeCuboidShape(6, 0, 3, 10, 1, 5), Block.makeCuboidShape(6, 0, 11, 10, 1, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10), Block.box(6, 0, 3, 10, 1, 5), Block.box(6, 0, 11, 10, 1, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 6, 3, 16, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 13), Block.makeCuboidShape(5, 5, 0, 11, 11, 1), Block.makeCuboidShape(3, 6, 0, 5, 10, 1), Block.makeCuboidShape(11, 6, 0, 13, 10, 1), Block.makeCuboidShape(6, 11, 0, 10, 13, 1), Block.makeCuboidShape(6, 3, 0, 10, 5, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 6, 3, 16, 10, 13), Block.box(0, 6, 3, 1, 10, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1), Block.box(6, 11, 0, 10, 13, 1), Block.box(6, 3, 0, 10, 5, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 0, 13, 10, 1), Block.makeCuboidShape(15, 5, 5, 16, 11, 11), Block.makeCuboidShape(15, 6, 3, 16, 10, 5), Block.makeCuboidShape(15, 6, 11, 16, 10, 13), Block.makeCuboidShape(15, 11, 6, 16, 13, 10), Block.makeCuboidShape(15, 3, 6, 16, 5, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 6, 15, 13, 10, 16), Block.box(3, 6, 0, 13, 10, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13), Block.box(15, 11, 6, 16, 13, 10), Block.box(15, 3, 6, 16, 5, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 6, 3, 1, 10, 13), Block.makeCuboidShape(15, 6, 3, 16, 10, 13), Block.makeCuboidShape(5, 5, 15, 11, 11, 16), Block.makeCuboidShape(11, 6, 15, 13, 10, 16), Block.makeCuboidShape(3, 6, 15, 5, 10, 16), Block.makeCuboidShape(6, 11, 15, 10, 13, 16), Block.makeCuboidShape(6, 3, 15, 10, 5, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 6, 3, 1, 10, 13), Block.box(15, 6, 3, 16, 10, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16), Block.box(6, 11, 15, 10, 13, 16), Block.box(6, 3, 15, 10, 5, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 6, 0, 13, 10, 1), Block.makeCuboidShape(3, 6, 15, 13, 10, 16), Block.makeCuboidShape(0, 5, 5, 1, 11, 11), Block.makeCuboidShape(0, 6, 11, 1, 10, 13), Block.makeCuboidShape(0, 6, 3, 1, 10, 5), Block.makeCuboidShape(0, 11, 6, 1, 13, 10), Block.makeCuboidShape(0, 3, 6, 1, 5, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 6, 0, 13, 10, 1), Block.box(3, 6, 15, 13, 10, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5), Block.box(0, 11, 6, 1, 13, 10), Block.box(0, 3, 6, 1, 5, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static class FurnaceDoubleShapes { static class FurnaceDoubleShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 14), Block.makeCuboidShape(1, 1, 14, 15, 15, 15), Block.makeCuboidShape(7, 3, 1, 9, 7, 2), Block.makeCuboidShape(3, 7, 1, 13, 15, 2), Block.makeCuboidShape(3, 1, 1, 13, 3, 2), Block.makeCuboidShape(1, 1, 1, 3, 15, 2), Block.makeCuboidShape(13, 1, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 14, 15, 15, 15), Block.box(7, 3, 1, 9, 7, 2), Block.box(3, 7, 1, 13, 15, 2), Block.box(3, 1, 1, 13, 3, 2), Block.box(1, 1, 1, 3, 15, 2), Block.box(13, 1, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(2, 1, 14, 14, 15, 15), Block.makeCuboidShape(1, 1, 1, 2, 15, 15), Block.makeCuboidShape(14, 3, 7, 15, 7, 9), Block.makeCuboidShape(14, 7, 3, 15, 15, 13), Block.makeCuboidShape(14, 1, 3, 15, 3, 13), Block.makeCuboidShape(14, 1, 1, 15, 15, 3), Block.makeCuboidShape(14, 1, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 1, 1, 14, 15, 2), Block.box(2, 1, 14, 14, 15, 15), Block.box(1, 1, 1, 2, 15, 15), Block.box(14, 3, 7, 15, 7, 9), Block.box(14, 7, 3, 15, 15, 13), Block.box(14, 1, 3, 15, 3, 13), Block.box(14, 1, 1, 15, 15, 3), Block.box(14, 1, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 1, 2, 15, 15, 14), Block.makeCuboidShape(1, 1, 2, 2, 15, 14), Block.makeCuboidShape(1, 1, 1, 15, 15, 2), Block.makeCuboidShape(7, 3, 14, 9, 7, 15), Block.makeCuboidShape(3, 7, 14, 13, 15, 15), Block.makeCuboidShape(3, 1, 14, 13, 3, 15), Block.makeCuboidShape(13, 1, 14, 15, 15, 15), Block.makeCuboidShape(1, 1, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(1, 1, 1, 15, 15, 2), Block.box(7, 3, 14, 9, 7, 15), Block.box(3, 7, 14, 13, 15, 15), Block.box(3, 1, 14, 13, 3, 15), Block.box(13, 1, 14, 15, 15, 15), Block.box(1, 1, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 1, 14, 14, 15, 15), Block.makeCuboidShape(2, 1, 1, 14, 15, 2), Block.makeCuboidShape(14, 1, 1, 15, 15, 15), Block.makeCuboidShape(1, 3, 7, 2, 7, 9), Block.makeCuboidShape(1, 7, 3, 2, 15, 13), Block.makeCuboidShape(1, 1, 3, 2, 3, 13), Block.makeCuboidShape(1, 1, 13, 2, 15, 15), Block.makeCuboidShape(1, 1, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 1, 14, 14, 15, 15), Block.box(2, 1, 1, 14, 15, 2), Block.box(14, 1, 1, 15, 15, 15), Block.box(1, 3, 7, 2, 7, 9), Block.box(1, 7, 3, 2, 15, 13), Block.box(1, 1, 3, 2, 3, 13), Block.box(1, 1, 13, 2, 15, 15), Block.box(1, 1, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class GrinderShapes { static final class GrinderShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(1, 0, 4, 2, 4, 12), Block.makeCuboidShape(14, 0, 4, 15, 4, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 4), Block.makeCuboidShape(14, 0, 2, 15, 15, 4), Block.makeCuboidShape(1, 0, 12, 2, 15, 14), Block.makeCuboidShape(14, 0, 12, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(13, 4, 4, 14, 12, 12), Block.makeCuboidShape(2, 4, 4, 3, 12, 12), Block.makeCuboidShape(3, 8, 0, 6, 10, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 4), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15), Block.box(13, 4, 4, 14, 12, 12), Block.box(2, 4, 4, 3, 12, 12), Block.box(3, 8, 0, 6, 10, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 12, 4, 2, 15, 12), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(4, 0, 1, 12, 4, 2), Block.makeCuboidShape(4, 0, 14, 12, 4, 15), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(12, 0, 1, 14, 15, 2), Block.makeCuboidShape(12, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 4, 15, 2), Block.makeCuboidShape(2, 0, 14, 4, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(4, 4, 13, 12, 12, 14), Block.makeCuboidShape(4, 4, 2, 12, 12, 3), Block.makeCuboidShape(15, 8, 3, 16, 10, 6), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(12, 0, 1, 14, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(2, 0, 14, 4, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(4, 4, 13, 12, 12, 14), Block.box(4, 4, 2, 12, 12, 3), Block.box(15, 8, 3, 16, 10, 6), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(4, 12, 1, 12, 15, 2), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 12, 4, 2, 15, 12), Block.makeCuboidShape(14, 0, 4, 15, 4, 12), Block.makeCuboidShape(1, 0, 4, 2, 4, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 12, 15, 15, 14), Block.makeCuboidShape(1, 0, 12, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 4), Block.makeCuboidShape(1, 0, 2, 2, 15, 4), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(2, 4, 4, 3, 12, 12), Block.makeCuboidShape(13, 4, 4, 14, 12, 12), Block.makeCuboidShape(10, 8, 15, 13, 10, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(14, 12, 4, 15, 15, 12), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 2, 2, 15, 4), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2), Block.box(2, 4, 4, 3, 12, 12), Block.box(13, 4, 4, 14, 12, 12), Block.box(10, 8, 15, 13, 10, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(4, 12, 1, 12, 15, 2), Block.makeCuboidShape(4, 0, 14, 12, 4, 15), Block.makeCuboidShape(4, 0, 1, 12, 4, 2), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 4, 15, 15), Block.makeCuboidShape(2, 0, 1, 4, 15, 2), Block.makeCuboidShape(12, 0, 14, 14, 15, 15), Block.makeCuboidShape(12, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(4, 4, 2, 12, 12, 3), Block.makeCuboidShape(4, 4, 13, 12, 12, 14), Block.makeCuboidShape(0, 8, 10, 1, 10, 13), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(4, 12, 14, 12, 15, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 4, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(12, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(4, 4, 2, 12, 12, 3), Block.box(4, 4, 13, 12, 12, 14), Block.box(0, 8, 10, 1, 10, 13), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(4, 12, 14, 12, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class LampPowererShapes { static final class LampPowererShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(0, 7, 7, 1, 9, 10), Block.makeCuboidShape(15, 7, 6, 16, 9, 9)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(0, 7, 7, 1, 9, 10), Block.box(15, 7, 6, 16, 9, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(6, 7, 0, 9, 9, 1), Block.makeCuboidShape(7, 7, 15, 10, 9, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 3, 3, 1, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(6, 7, 0, 9, 9, 1), Block.box(7, 7, 15, 10, 9, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(15, 7, 6, 16, 9, 9), Block.makeCuboidShape(0, 7, 7, 1, 9, 10)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(15, 7, 6, 16, 9, 9), Block.box(0, 7, 7, 1, 9, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(1, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(7, 7, 15, 10, 9, 16), Block.makeCuboidShape(6, 7, 0, 9, 9, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 3, 3, 16, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(7, 7, 15, 10, 9, 16), Block.box(6, 7, 0, 9, 9, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class OilGeneratorShapes { static final class OilGeneratorShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(4, 3, 1.5, 12, 4, 2), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(12, 3, 1, 13, 4, 2), Block.makeCuboidShape(3, 3, 1, 4, 4, 2), Block.makeCuboidShape(3, 7, 1, 4, 8, 2), Block.makeCuboidShape(12, 7, 1, 13, 8, 2), Block.makeCuboidShape(4, 10, 0.5, 6, 11, 1), Block.makeCuboidShape(4, 13, 0.5, 6, 14, 1), Block.makeCuboidShape(3, 11, 0.5, 4, 13, 1), Block.makeCuboidShape(6, 11, 0.5, 7, 13, 1), Block.makeCuboidShape(4, 11, 0, 6, 13, 1), Block.makeCuboidShape(5, 5, 1.5, 6, 6, 2), Block.makeCuboidShape(6, 4, 1.5, 7, 5, 2), Block.makeCuboidShape(10, 5, 1.5, 11, 6, 2), Block.makeCuboidShape(9, 6, 1.5, 10, 7, 2), Block.makeCuboidShape(4, 7, 1.5, 12, 8, 2), Block.makeCuboidShape(3, 4, 1.5, 4, 7, 2), Block.makeCuboidShape(12, 4, 1.5, 13, 7, 2), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 6, 11, 15, 7), Block.makeCuboidShape(5, 14, 8, 11, 15, 9), Block.makeCuboidShape(5, 14, 10, 11, 15, 14), Block.makeCuboidShape(5, 14, 2, 11, 15, 5), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(3, 8, 1, 13, 15, 2), Block.makeCuboidShape(3, 0, 1, 13, 3, 2), Block.makeCuboidShape(1, 0, 1, 3, 15, 2), Block.makeCuboidShape(13, 0, 1, 15, 15, 2), Block.makeCuboidShape(5, 13, 5, 11, 14, 10), Block.makeCuboidShape(2, 3, 2, 14, 8, 3), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(4, 3, 1.5, 12, 4, 2), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 3, 1, 13, 4, 2), Block.box(3, 3, 1, 4, 4, 2), Block.box(3, 7, 1, 4, 8, 2), Block.box(12, 7, 1, 13, 8, 2), Block.box(4, 10, 0.5, 6, 11, 1), Block.box(4, 13, 0.5, 6, 14, 1), Block.box(3, 11, 0.5, 4, 13, 1), Block.box(6, 11, 0.5, 7, 13, 1), Block.box(4, 11, 0, 6, 13, 1), Block.box(5, 5, 1.5, 6, 6, 2), Block.box(6, 4, 1.5, 7, 5, 2), Block.box(10, 5, 1.5, 11, 6, 2), Block.box(9, 6, 1.5, 10, 7, 2), Block.box(4, 7, 1.5, 12, 8, 2), Block.box(3, 4, 1.5, 4, 7, 2), Block.box(12, 4, 1.5, 13, 7, 2), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(14, 3, 12, 15, 4, 13), Block.makeCuboidShape(14, 3, 3, 15, 4, 4), Block.makeCuboidShape(14, 7, 3, 15, 8, 4), Block.makeCuboidShape(14, 7, 12, 15, 8, 13), Block.makeCuboidShape(15, 10, 4, 15.5, 11, 6), Block.makeCuboidShape(15, 13, 4, 15.5, 14, 6), Block.makeCuboidShape(15, 11, 3, 15.5, 13, 4), Block.makeCuboidShape(15, 11, 6, 15.5, 13, 7), Block.makeCuboidShape(15, 11, 4, 16, 13, 6), Block.makeCuboidShape(14, 5, 5, 14.5, 6, 6), Block.makeCuboidShape(14, 4, 6, 14.5, 5, 7), Block.makeCuboidShape(14, 5, 10, 14.5, 6, 11), Block.makeCuboidShape(14, 6, 9, 14.5, 7, 10), Block.makeCuboidShape(14, 3, 4, 14.5, 4, 12), Block.makeCuboidShape(14, 7, 4, 14.5, 8, 12), Block.makeCuboidShape(14, 4, 3, 14.5, 7, 4), Block.makeCuboidShape(14, 4, 12, 14.5, 7, 13), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(9, 14, 5, 10, 15, 11), Block.makeCuboidShape(7, 14, 5, 8, 15, 11), Block.makeCuboidShape(2, 14, 5, 6, 15, 11), Block.makeCuboidShape(11, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 8, 3, 15, 15, 13), Block.makeCuboidShape(14, 0, 3, 15, 3, 13), Block.makeCuboidShape(14, 0, 1, 15, 15, 3), Block.makeCuboidShape(14, 0, 13, 15, 15, 15), Block.makeCuboidShape(6, 13, 5, 11, 14, 11), Block.makeCuboidShape(13, 3, 2, 14, 8, 14), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(14, 3, 12, 15, 4, 13), Block.box(14, 3, 3, 15, 4, 4), Block.box(14, 7, 3, 15, 8, 4), Block.box(14, 7, 12, 15, 8, 13), Block.box(15, 10, 4, 15.5, 11, 6), Block.box(15, 13, 4, 15.5, 14, 6), Block.box(15, 11, 3, 15.5, 13, 4), Block.box(15, 11, 6, 15.5, 13, 7), Block.box(15, 11, 4, 16, 13, 6), Block.box(14, 5, 5, 14.5, 6, 6), Block.box(14, 4, 6, 14.5, 5, 7), Block.box(14, 5, 10, 14.5, 6, 11), Block.box(14, 6, 9, 14.5, 7, 10), Block.box(14, 3, 4, 14.5, 4, 12), Block.box(14, 7, 4, 14.5, 8, 12), Block.box(14, 4, 3, 14.5, 7, 4), Block.box(14, 4, 12, 14.5, 7, 13), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 3, 14, 4, 4, 15), Block.makeCuboidShape(12, 3, 14, 13, 4, 15), Block.makeCuboidShape(12, 7, 14, 13, 8, 15), Block.makeCuboidShape(3, 7, 14, 4, 8, 15), Block.makeCuboidShape(10, 10, 15, 12, 11, 15.5), Block.makeCuboidShape(10, 13, 15, 12, 14, 15.5), Block.makeCuboidShape(12, 11, 15, 13, 13, 15.5), Block.makeCuboidShape(9, 11, 15, 10, 13, 15.5), Block.makeCuboidShape(10, 11, 15, 12, 13, 16), Block.makeCuboidShape(10, 5, 14, 11, 6, 14.5), Block.makeCuboidShape(9, 4, 14, 10, 5, 14.5), Block.makeCuboidShape(5, 5, 14, 6, 6, 14.5), Block.makeCuboidShape(6, 6, 14, 7, 7, 14.5), Block.makeCuboidShape(4, 3, 14, 12, 4, 14.5), Block.makeCuboidShape(4, 7, 14, 12, 8, 14.5), Block.makeCuboidShape(12, 4, 14, 13, 7, 14.5), Block.makeCuboidShape(3, 4, 14, 4, 7, 14.5), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(5, 14, 9, 11, 15, 10), Block.makeCuboidShape(5, 14, 7, 11, 15, 8), Block.makeCuboidShape(5, 14, 2, 11, 15, 6), Block.makeCuboidShape(5, 14, 11, 11, 15, 14), Block.makeCuboidShape(2, 14, 2, 5, 15, 14), Block.makeCuboidShape(11, 14, 2, 14, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(3, 8, 14, 13, 15, 15), Block.makeCuboidShape(3, 0, 14, 13, 3, 15), Block.makeCuboidShape(13, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 14, 3, 15, 15), Block.makeCuboidShape(5, 13, 6, 11, 14, 11), Block.makeCuboidShape(2, 3, 13, 14, 8, 14), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16), Block.makeCuboidShape(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 14, 4, 4, 15), Block.box(12, 3, 14, 13, 4, 15), Block.box(12, 7, 14, 13, 8, 15), Block.box(3, 7, 14, 4, 8, 15), Block.box(10, 10, 15, 12, 11, 15.5), Block.box(10, 13, 15, 12, 14, 15.5), Block.box(12, 11, 15, 13, 13, 15.5), Block.box(9, 11, 15, 10, 13, 15.5), Block.box(10, 11, 15, 12, 13, 16), Block.box(10, 5, 14, 11, 6, 14.5), Block.box(9, 4, 14, 10, 5, 14.5), Block.box(5, 5, 14, 6, 6, 14.5), Block.box(6, 6, 14, 7, 7, 14.5), Block.box(4, 3, 14, 12, 4, 14.5), Block.box(4, 7, 14, 12, 8, 14.5), Block.box(12, 4, 14, 13, 7, 14.5), Block.box(3, 4, 14, 4, 7, 14.5), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(1, 3, 3, 2, 4, 4), Block.makeCuboidShape(1, 3, 12, 2, 4, 13), Block.makeCuboidShape(1, 7, 12, 2, 8, 13), Block.makeCuboidShape(1, 7, 3, 2, 8, 4), Block.makeCuboidShape(0.5, 10, 10, 1, 11, 12), Block.makeCuboidShape(0.5, 13, 10, 1, 14, 12), Block.makeCuboidShape(0.5, 11, 12, 1, 13, 13), Block.makeCuboidShape(0.5, 11, 9, 1, 13, 10), Block.makeCuboidShape(0, 11, 10, 1, 13, 12), Block.makeCuboidShape(1.5, 5, 10, 2, 6, 11), Block.makeCuboidShape(1.5, 4, 9, 2, 5, 10), Block.makeCuboidShape(1.5, 5, 5, 2, 6, 6), Block.makeCuboidShape(1.5, 6, 6, 2, 7, 7), Block.makeCuboidShape(1.5, 3, 4, 2, 4, 12), Block.makeCuboidShape(1.5, 7, 4, 2, 8, 12), Block.makeCuboidShape(1.5, 4, 12, 2, 7, 13), Block.makeCuboidShape(1.5, 4, 3, 2, 7, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(6, 14, 5, 7, 15, 11), Block.makeCuboidShape(8, 14, 5, 9, 15, 11), Block.makeCuboidShape(10, 14, 5, 14, 15, 11), Block.makeCuboidShape(2, 14, 5, 5, 15, 11), Block.makeCuboidShape(2, 14, 2, 14, 15, 5), Block.makeCuboidShape(2, 14, 11, 14, 15, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 8, 3, 2, 15, 13), Block.makeCuboidShape(1, 0, 3, 2, 3, 13), Block.makeCuboidShape(1, 0, 13, 2, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 3), Block.makeCuboidShape(5, 13, 5, 10, 14, 11), Block.makeCuboidShape(2, 3, 2, 3, 8, 14), Block.makeCuboidShape(15, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 1), Block.makeCuboidShape(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(1, 3, 3, 2, 4, 4), Block.box(1, 3, 12, 2, 4, 13), Block.box(1, 7, 12, 2, 8, 13), Block.box(1, 7, 3, 2, 8, 4), Block.box(0.5, 10, 10, 1, 11, 12), Block.box(0.5, 13, 10, 1, 14, 12), Block.box(0.5, 11, 12, 1, 13, 13), Block.box(0.5, 11, 9, 1, 13, 10), Block.box(0, 11, 10, 1, 13, 12), Block.box(1.5, 5, 10, 2, 6, 11), Block.box(1.5, 4, 9, 2, 5, 10), Block.box(1.5, 5, 5, 2, 6, 6), Block.box(1.5, 6, 6, 2, 7, 7), Block.box(1.5, 3, 4, 2, 4, 12), Block.box(1.5, 7, 4, 2, 8, 12), Block.box(1.5, 4, 12, 2, 7, 13), Block.box(1.5, 4, 3, 2, 7, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class MinerShapes { static final class MinerShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 3, 3, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 3, 3, 1, 13, 13), Block.makeCuboidShape(15, 3, 3, 16, 13, 13), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 2, 15, 15, 14), Block.makeCuboidShape(1, 0, 2, 2, 15, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 3, 3, 1, 13, 13), Block.box(15, 3, 3, 16, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(3, 3, 0, 13, 13, 1), Block.makeCuboidShape(3, 3, 15, 13, 13, 16), Block.makeCuboidShape(4, 11, 4, 12, 12, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(5, 12, 12, 11, 14, 13), Block.makeCuboidShape(5, 12, 3, 11, 14, 4), Block.makeCuboidShape(3, 12, 5, 4, 14, 11), Block.makeCuboidShape(12, 12, 5, 13, 14, 11), Block.makeCuboidShape(11, 12, 4, 12, 14, 5), Block.makeCuboidShape(4, 12, 4, 5, 14, 5), Block.makeCuboidShape(4, 12, 11, 5, 14, 12), Block.makeCuboidShape(11, 12, 11, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(2, 0, 14, 14, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 15, 2), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class LeafGeneratorShapes { static final class LeafGeneratorShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(1, 0, 2, 2, 5, 14), Block.makeCuboidShape(2, 1, 2, 3, 14, 14), Block.makeCuboidShape(1, 11, 2, 2, 15, 14), Block.makeCuboidShape(1, 5, 2, 2, 11, 5), Block.makeCuboidShape(1, 5, 11, 2, 11, 14), Block.makeCuboidShape(13, 1, 2, 14, 14, 14), Block.makeCuboidShape(14, 11, 2, 15, 15, 14), Block.makeCuboidShape(14, 5, 11, 15, 11, 14), Block.makeCuboidShape(14, 5, 2, 15, 11, 5), Block.makeCuboidShape(14, 0, 2, 15, 5, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 0, 14, 15, 15, 15), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(15, 4, 5, 16, 5, 11), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 2, 2, 5, 14), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(14, 0, 2, 15, 5, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(2, 0, 1, 14, 5, 2), Block.makeCuboidShape(2, 1, 2, 14, 14, 3), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(11, 5, 1, 14, 11, 2), Block.makeCuboidShape(2, 5, 1, 5, 11, 2), Block.makeCuboidShape(2, 1, 13, 14, 14, 14), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(2, 5, 14, 5, 11, 15), Block.makeCuboidShape(11, 5, 14, 14, 11, 15), Block.makeCuboidShape(2, 0, 14, 14, 5, 15)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 0, 1, 2, 15, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 11, 0, 11, 12, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 4, 0, 5, 12, 1), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 1, 15, 15, 15), Block.box(2, 0, 1, 14, 5, 2), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 0, 14, 14, 5, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(1, 0, 1, 15, 15, 2), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(15, 11, 5, 16, 12, 11), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(15, 4, 5, 16, 5, 11), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(15, 4, 11, 16, 12, 12), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(15, 4, 4, 16, 12, 5), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(2, 14, 2, 4, 15, 14), Block.makeCuboidShape(4, 14, 2, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 14), Block.makeCuboidShape(12, 14, 2, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 14, 15, 15, 15), Block.makeCuboidShape(14, 0, 2, 15, 5, 14), Block.makeCuboidShape(13, 1, 2, 14, 14, 14), Block.makeCuboidShape(14, 11, 2, 15, 15, 14), Block.makeCuboidShape(14, 5, 11, 15, 11, 14), Block.makeCuboidShape(14, 5, 2, 15, 11, 5), Block.makeCuboidShape(2, 1, 2, 3, 14, 14), Block.makeCuboidShape(1, 11, 2, 2, 15, 14), Block.makeCuboidShape(1, 5, 2, 2, 11, 5), Block.makeCuboidShape(1, 5, 11, 2, 11, 14), Block.makeCuboidShape(1, 0, 2, 2, 5, 14)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 0, 1, 15, 15, 2), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(0, 4, 5, 1, 5, 11), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(0, 4, 4, 1, 12, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(14, 0, 2, 15, 5, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(1, 0, 2, 2, 5, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(14, 0, 1, 15, 15, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 11, 5, 1, 12, 11), Block.makeCuboidShape(5, 11, 15, 11, 12, 16), Block.makeCuboidShape(5, 11, 0, 11, 12, 1), Block.makeCuboidShape(0, 4, 5, 1, 5, 11), Block.makeCuboidShape(5, 4, 15, 11, 5, 16), Block.makeCuboidShape(5, 4, 0, 11, 5, 1), Block.makeCuboidShape(0, 4, 11, 1, 12, 12), Block.makeCuboidShape(4, 4, 15, 5, 12, 16), Block.makeCuboidShape(4, 4, 0, 5, 12, 1), Block.makeCuboidShape(0, 4, 4, 1, 12, 5), Block.makeCuboidShape(11, 4, 15, 12, 12, 16), Block.makeCuboidShape(11, 4, 0, 12, 12, 1), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(11, 14, 11, 12, 15, 12), Block.makeCuboidShape(11, 14, 4, 12, 15, 5), Block.makeCuboidShape(4, 14, 4, 5, 15, 5), Block.makeCuboidShape(4, 14, 11, 5, 15, 12), Block.makeCuboidShape(2, 14, 2, 14, 15, 4), Block.makeCuboidShape(12, 14, 4, 14, 15, 12), Block.makeCuboidShape(2, 14, 4, 4, 15, 12), Block.makeCuboidShape(2, 14, 12, 14, 15, 14), Block.makeCuboidShape(2, 0, 2, 14, 1, 14), Block.makeCuboidShape(1, 0, 1, 2, 15, 15), Block.makeCuboidShape(2, 0, 14, 14, 5, 15), Block.makeCuboidShape(2, 1, 13, 14, 14, 14), Block.makeCuboidShape(2, 11, 14, 14, 15, 15), Block.makeCuboidShape(2, 5, 14, 5, 11, 15), Block.makeCuboidShape(11, 5, 14, 14, 11, 15), Block.makeCuboidShape(2, 1, 2, 14, 14, 3), Block.makeCuboidShape(2, 11, 1, 14, 15, 2), Block.makeCuboidShape(11, 5, 1, 14, 11, 2), Block.makeCuboidShape(2, 5, 1, 5, 11, 2), Block.makeCuboidShape(2, 0, 1, 14, 5, 2)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 11, 15, 11, 12, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(11, 4, 15, 12, 12, 16), Block.box(11, 4, 0, 12, 12, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 2, 15, 15), Block.box(2, 0, 14, 14, 5, 15), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 0, 1, 14, 5, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
static final class LavaFactoryShapes { static final class LavaFactoryShapes {
static final VoxelShape SHAPE_N = Stream.of(Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 12, 12, 15, 15), Block.makeCuboidShape(4, 14, 1, 12, 15, 4), Block.makeCuboidShape(1, 14, 1, 4, 15, 15), Block.makeCuboidShape(12, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(5, 15, 12, 11, 16, 13)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11), Block.box(11, 14, 11, 12, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 12, 12, 15, 15), Block.box(4, 14, 1, 12, 15, 4), Block.box(1, 14, 1, 4, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_E = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(1, 14, 4, 4, 15, 12), Block.makeCuboidShape(12, 14, 4, 15, 15, 12), Block.makeCuboidShape(1, 14, 1, 15, 15, 4), Block.makeCuboidShape(1, 14, 12, 15, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(3, 15, 5, 4, 16, 11)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_S = Stream.of(Block.makeCuboidShape(15, 0, 0, 16, 1, 16), Block.makeCuboidShape(15, 15, 0, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 1, 16, 16), Block.makeCuboidShape(1, 15, 15, 15, 16, 16), Block.makeCuboidShape(1, 15, 0, 15, 16, 1), Block.makeCuboidShape(1, 0, 0, 15, 1, 1), Block.makeCuboidShape(1, 0, 15, 15, 1, 16), Block.makeCuboidShape(0, 0, 0, 1, 1, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(12, 15, 5, 13, 16, 11), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(4, 14, 1, 12, 15, 4), Block.makeCuboidShape(4, 14, 12, 12, 15, 15), Block.makeCuboidShape(12, 14, 1, 15, 15, 15), Block.makeCuboidShape(1, 14, 1, 4, 15, 15), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 2, 14, 15), Block.makeCuboidShape(14, 2, 1, 15, 14, 15), Block.makeCuboidShape(2, 2, 1, 14, 14, 2), Block.makeCuboidShape(2, 2, 14, 14, 14, 15), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(5, 15, 3, 11, 16, 4)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 1, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 14, 1, 4, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape SHAPE_W = Stream.of(Block.makeCuboidShape(0, 0, 15, 16, 1, 16), Block.makeCuboidShape(0, 15, 15, 16, 16, 16), Block.makeCuboidShape(0, 15, 0, 16, 16, 1), Block.makeCuboidShape(0, 15, 1, 1, 16, 15), Block.makeCuboidShape(15, 15, 1, 16, 16, 15), Block.makeCuboidShape(15, 0, 1, 16, 1, 15), Block.makeCuboidShape(0, 0, 1, 1, 1, 15), Block.makeCuboidShape(0, 0, 0, 16, 1, 1), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(5, 15, 3, 11, 16, 4), Block.makeCuboidShape(5, 15, 12, 11, 16, 13), Block.makeCuboidShape(11, 14, 4, 12, 16, 5), Block.makeCuboidShape(4, 14, 4, 5, 16, 5), Block.makeCuboidShape(11, 14, 11, 12, 16, 12), Block.makeCuboidShape(4, 14, 11, 5, 16, 12), Block.makeCuboidShape(4, 13, 4, 12, 14, 12), Block.makeCuboidShape(12, 14, 4, 15, 15, 12), Block.makeCuboidShape(1, 14, 4, 4, 15, 12), Block.makeCuboidShape(1, 14, 12, 15, 15, 15), Block.makeCuboidShape(1, 14, 1, 15, 15, 4), Block.makeCuboidShape(1, 1, 1, 15, 2, 15), Block.makeCuboidShape(1, 2, 1, 15, 14, 2), Block.makeCuboidShape(1, 2, 14, 15, 14, 15), Block.makeCuboidShape(14, 2, 2, 15, 14, 14), Block.makeCuboidShape(1, 2, 2, 2, 14, 14), Block.makeCuboidShape(3, 15, 5, 4, 16, 11), Block.makeCuboidShape(12, 15, 5, 13, 16, 11)).reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)).get(); static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
} }
public static final VoxelShape FEEDER_SHAPE = ShapeBuilder.get() public static final VoxelShape FEEDER_SHAPE = ShapeBuilder.get()
@ -138,7 +138,7 @@ public class Shapes {
Stream.Builder<VoxelShape> shapes = Stream.builder(); Stream.Builder<VoxelShape> shapes = Stream.builder();
public ShapeBuilder add(double x1, double y1, double z1, double x2, double y2, double z2) { public ShapeBuilder add(double x1, double y1, double z1, double x2, double y2, double z2) {
this.shapes.add(Block.makeCuboidShape(x1, y1, z1, x2, y2, z2)); this.shapes.add(Block.box(x1, y1, z1, x2, y2, z2));
return this; return this;
} }
@ -147,7 +147,7 @@ public class Shapes {
} }
public Optional<VoxelShape> standardReduceBuild() { public Optional<VoxelShape> standardReduceBuild() {
return this.shapes.build().reduce((v1, v2) -> VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR)); return this.shapes.build().reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR));
} }
public static ShapeBuilder get() { public static ShapeBuilder get() {

View file

@ -14,13 +14,15 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockBase extends Block { public class BlockBase extends Block {
public BlockBase(Properties properties) { public BlockBase(Properties properties) {
super(properties); super(properties);
} }
protected ItemBlockBase getItemBlock() { protected ItemBlockBase getItemBlock() {
return new ItemBlockBase(this, new Item.Properties().group(ActuallyAdditions.GROUP)); return new ItemBlockBase(this, new Item.Properties().tab(ActuallyAdditions.GROUP));
} }
public boolean shouldAddCreative() { public boolean shouldAddCreative() {

View file

@ -13,8 +13,10 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
import net.minecraft.block.BushBlock; import net.minecraft.block.BushBlock;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.AbstractBlock.Properties;
public class BlockBushBase extends BushBlock { public class BlockBushBase extends BushBlock {
public BlockBushBase(Properties properties) { public BlockBushBase(Properties properties) {
super(properties.sound(SoundType.PLANT)); super(properties.sound(SoundType.GRASS));
} }
} }

View file

@ -42,14 +42,16 @@ import net.minecraftforge.fml.network.NetworkHooks;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;
import net.minecraft.block.AbstractBlock.Properties;
public abstract class BlockContainerBase extends ContainerBlock { public abstract class BlockContainerBase extends ContainerBlock {
public BlockContainerBase(Properties properties) { public BlockContainerBase(Properties properties) {
super(properties); super(properties);
} }
public ActionResultType openGui(World world, PlayerEntity player, BlockPos pos, Class<? extends INamedContainerProvider> expectedInstance) { public ActionResultType openGui(World world, PlayerEntity player, BlockPos pos, Class<? extends INamedContainerProvider> expectedInstance) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile != null && tile.getClass().isInstance(expectedInstance)) { if (tile != null && tile.getClass().isInstance(expectedInstance)) {
NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos);
} }
@ -60,8 +62,8 @@ public abstract class BlockContainerBase extends ContainerBlock {
} }
private void dropInventory(World world, BlockPos position) { private void dropInventory(World world, BlockPos position) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntity aTile = world.getTileEntity(position); TileEntity aTile = world.getBlockEntity(position);
if (aTile instanceof TileEntityInventoryBase) { if (aTile instanceof TileEntityInventoryBase) {
TileEntityInventoryBase tile = (TileEntityInventoryBase) aTile; TileEntityInventoryBase tile = (TileEntityInventoryBase) aTile;
if (tile.inv.getSlots() > 0) { if (tile.inv.getSlots() > 0) {
@ -79,24 +81,24 @@ public abstract class BlockContainerBase extends ContainerBlock {
return; return;
} }
float dX = world.rand.nextFloat() * 0.8F + 0.1F; float dX = world.random.nextFloat() * 0.8F + 0.1F;
float dY = world.rand.nextFloat() * 0.8F + 0.1F; float dY = world.random.nextFloat() * 0.8F + 0.1F;
float dZ = world.rand.nextFloat() * 0.8F + 0.1F; float dZ = world.random.nextFloat() * 0.8F + 0.1F;
ItemEntity entityItem = new ItemEntity(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ, stack.copy()); ItemEntity entityItem = new ItemEntity(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ, stack.copy());
float factor = 0.05F; float factor = 0.05F;
entityItem.addVelocity(world.rand.nextGaussian() * factor, world.rand.nextGaussian() * factor + 0.2F, world.rand.nextGaussian() * factor); entityItem.push(world.random.nextGaussian() * factor, world.random.nextGaussian() * factor + 0.2F, world.random.nextGaussian() * factor);
world.addEntity(entityItem); world.addFreshEntity(entityItem);
} }
public boolean tryToggleRedstone(World world, BlockPos pos, PlayerEntity player) { public boolean tryToggleRedstone(World world, BlockPos pos, PlayerEntity player) {
ItemStack stack = player.getHeldItemMainhand(); ItemStack stack = player.getMainHandItem();
if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) { if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
TileEntityBase base = (TileEntityBase) tile; TileEntityBase base = (TileEntityBase) tile;
if (!world.isRemote && base.isRedstoneToggle()) { if (!world.isClientSide && base.isRedstoneToggle()) {
base.isPulseMode = !base.isPulseMode; base.isPulseMode = !base.isPulseMode;
base.markDirty(); base.setChanged();
base.sendUpdate(); base.sendUpdate();
} }
return true; return true;
@ -107,8 +109,8 @@ public abstract class BlockContainerBase extends ContainerBlock {
@Override @Override
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
TileEntityBase base = (TileEntityBase) tile; TileEntityBase base = (TileEntityBase) tile;
if (base.respondsToPulses()) { if (base.respondsToPulses()) {
@ -121,7 +123,7 @@ public abstract class BlockContainerBase extends ContainerBlock {
public void neighborsChangedCustom(World world, BlockPos pos) { public void neighborsChangedCustom(World world, BlockPos pos) {
this.updateRedstoneState(world, pos); this.updateRedstoneState(world, pos);
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
TileEntityBase base = (TileEntityBase) tile; TileEntityBase base = (TileEntityBase) tile;
if (base.shouldSaveDataOnChangeOrWorldStart()) { if (base.shouldSaveDataOnChangeOrWorldStart()) {
@ -144,11 +146,11 @@ public abstract class BlockContainerBase extends ContainerBlock {
} }
public void updateRedstoneState(World world, BlockPos pos) { public void updateRedstoneState(World world, BlockPos pos) {
if (!world.isRemote) { if (!world.isClientSide) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
TileEntityBase base = (TileEntityBase) tile; TileEntityBase base = (TileEntityBase) tile;
boolean powered = world.getRedstonePowerFromNeighbors(pos) > 0; boolean powered = world.getBestNeighborSignal(pos) > 0;
boolean wasPowered = base.isRedstonePowered; boolean wasPowered = base.isRedstonePowered;
if (powered && !wasPowered) { if (powered && !wasPowered) {
if (base.respondsToPulses()) { if (base.respondsToPulses()) {
@ -164,20 +166,20 @@ public abstract class BlockContainerBase extends ContainerBlock {
} }
protected boolean tryUseItemOnTank(PlayerEntity player, Hand hand, FluidTank tank) { protected boolean tryUseItemOnTank(PlayerEntity player, Hand hand, FluidTank tank) {
ItemStack heldItem = player.getHeldItem(hand); ItemStack heldItem = player.getItemInHand(hand);
return StackUtil.isValid(heldItem) && FluidUtil.interactWithFluidHandler(player, hand, tank); return StackUtil.isValid(heldItem) && FluidUtil.interactWithFluidHandler(player, hand, tank);
} }
@Override @Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
this.updateRedstoneState(worldIn, pos); this.updateRedstoneState(worldIn, pos);
} }
@Override @Override
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { public void setPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
if (stack.hasTag()) { if (stack.hasTag()) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
TileEntityBase base = (TileEntityBase) tile; TileEntityBase base = (TileEntityBase) tile;
CompoundNBT compound = stack.getOrCreateTag().getCompound("Data"); CompoundNBT compound = stack.getOrCreateTag().getCompound("Data");
@ -187,23 +189,23 @@ public abstract class BlockContainerBase extends ContainerBlock {
} }
@Override @Override
public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) { public void playerWillDestroy(World world, BlockPos pos, BlockState state, PlayerEntity player) {
if (!player.isCreative()) { if (!player.isCreative()) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase && ((TileEntityBase) tile).stopFromDropping) { if (tile instanceof TileEntityBase && ((TileEntityBase) tile).stopFromDropping) {
player.sendStatusMessage(new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".machineBroke").mergeStyle(TextFormatting.RED), false); player.displayClientMessage(new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".machineBroke").withStyle(TextFormatting.RED), false);
} }
} }
} }
@Override @Override
public boolean hasComparatorInputOverride(BlockState state) { public boolean hasAnalogOutputSignal(BlockState state) {
return true; return true;
} }
@Override @Override
public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) { public int getAnalogOutputSignal(BlockState state, World world, BlockPos pos) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getBlockEntity(pos);
if (tile instanceof TileEntityBase) { if (tile instanceof TileEntityBase) {
return ((TileEntityBase) tile).getComparatorStrength(); return ((TileEntityBase) tile).getComparatorStrength();
} }
@ -265,13 +267,13 @@ public abstract class BlockContainerBase extends ContainerBlock {
@Override @Override
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
if (state != newState) { if (state != newState) {
if (this.shouldDropInventory(world, pos)) { if (this.shouldDropInventory(world, pos)) {
this.dropInventory(world, pos); this.dropInventory(world, pos);
} }
} }
super.onReplaced(state, world, pos, newState, isMoving); super.onRemove(state, world, pos, newState, isMoving);
} }
public boolean shouldDropInventory(World world, BlockPos pos) { public boolean shouldDropInventory(World world, BlockPos pos) {

View file

@ -33,13 +33,15 @@ import net.minecraftforge.items.ItemHandlerHelper;
import java.util.List; import java.util.List;
// CROP BLOCK DEFAULTS TO 7 YEARS OF AGE. // CROP BLOCK DEFAULTS TO 7 YEARS OF AGE.
import net.minecraft.block.AbstractBlock.Properties;
public class BlockPlant extends CropsBlock { public class BlockPlant extends CropsBlock {
public Item seedItem; public Item seedItem;
// Stolen from potato for now // Stolen from potato for now
// PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP))); // PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP)));
public BlockPlant(Item seedItem) { public BlockPlant(Item seedItem) {
super(Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP)); super(Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP));
this.seedItem = seedItem; this.seedItem = seedItem;
} }
@ -65,12 +67,12 @@ public class BlockPlant extends CropsBlock {
@Override @Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.getAge(state) < 7) { if (this.getAge(state) < 7) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
if (!world.isRemote) { if (!world.isClientSide) {
List<ItemStack> drops = Block.getDrops(state, (ServerWorld) world, pos, null); List<ItemStack> drops = Block.getDrops(state, (ServerWorld) world, pos, null);
boolean deductedSeedSize = false; boolean deductedSeedSize = false;
for (ItemStack drop : drops) { for (ItemStack drop : drops) {
@ -85,14 +87,14 @@ public class BlockPlant extends CropsBlock {
} }
} }
world.setBlockState(pos, this.getDefaultState().with(AGE, 0)); world.setBlockAndUpdate(pos, this.defaultBlockState().setValue(AGE, 0));
} }
return super.onBlockActivated(state, world, pos, player, handIn, hit); return super.use(state, world, pos, player, handIn, hit);
} }
@Override @Override
protected IItemProvider getSeedsItem() { protected IItemProvider getBaseSeedId() {
return this.seedItem; return this.seedItem;
} }

View file

@ -8,6 +8,8 @@ import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.block.AbstractBlock.Properties;
/** /**
* Wrapper for Directional block states extending from our base blocks. It's not super nice but it'll do. * Wrapper for Directional block states extending from our base blocks. It's not super nice but it'll do.
*/ */
@ -34,16 +36,16 @@ public abstract class DirectionalBlock extends BlockBase {
public Container(Properties properties) { public Container(Properties properties) {
super(properties); super(properties);
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
} }
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite()); return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(FACING); builder.add(FACING);
} }
} }

View file

@ -8,6 +8,8 @@ import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.block.AbstractBlock.Properties;
/** /**
* Wrapper for Fully Direction block states extending from our base blocks. It's not super nice but it'll do. * Wrapper for Fully Direction block states extending from our base blocks. It's not super nice but it'll do.
*/ */
@ -16,17 +18,17 @@ public abstract class FullyDirectionalBlock extends BlockBase {
public FullyDirectionalBlock(Properties properties) { public FullyDirectionalBlock(Properties properties) {
super(properties); super(properties);
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
} }
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite()); return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(FACING); builder.add(FACING);
} }
@ -36,16 +38,16 @@ public abstract class FullyDirectionalBlock extends BlockBase {
public Container(Properties properties) { public Container(Properties properties) {
super(properties); super(properties);
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
} }
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite()); return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
} }
@Override @Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(FACING); builder.add(FACING);
} }
} }

View file

@ -56,7 +56,7 @@ public enum TheColoredLampColors implements IStringSerializable {
} }
@Override @Override
public String getString() { public String getSerializedName() {
return this.regName; return this.regName;
} }
} }

View file

@ -36,7 +36,7 @@ public enum TheMiscBlocks implements IStringSerializable {
} }
@Override @Override
public String getString() { public String getSerializedName() {
return this.name; return this.name;
} }
} }

View file

@ -35,7 +35,7 @@ public enum TheWildPlants implements IStringSerializable {
} }
@Override @Override
public String getString() { public String getSerializedName() {
return this.name; return this.name;
} }

View file

@ -43,26 +43,26 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
return; return;
} }
matrices.push(); matrices.pushPose();
matrices.translate(.5f, .35f, .5f); matrices.translate(.5f, .35f, .5f);
matrices.rotate(Vector3f.ZP.rotationDegrees(180)); matrices.mulPose(Vector3f.ZP.rotationDegrees(180));
matrices.push(); matrices.pushPose();
matrices.scale(0.0075F, 0.0075F, 0.0075F); matrices.scale(0.0075F, 0.0075F, 0.0075F);
matrices.translate(0F, 0F, -60F); matrices.translate(0F, 0F, -60F);
stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> { stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> {
FontRenderer font = Minecraft.getInstance().fontRenderer; FontRenderer font = Minecraft.getInstance().font;
String energyTotal = Lang.cleanEnergyValues(cap, false); String energyTotal = Lang.cleanEnergyValues(cap, false);
String energyName = Lang.transI18n("misc", "power_name_long"); String energyName = Lang.transI18n("misc", "power_name_long");
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
font.drawString(matrices, energyTotal, -font.getStringWidth(energyTotal) / 2F, 10F, 0xFFFFFF); font.draw(matrices, energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF);
font.drawString(matrices, energyName, -font.getStringWidth(energyName) / 2F, 20F, 0xFFFFFF); font.draw(matrices, energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF);
matrices.translate(-60F, 0F, 60F); matrices.translate(-60F, 0F, 60F);
matrices.rotate(Vector3f.YP.rotationDegrees(90)); matrices.mulPose(Vector3f.YP.rotationDegrees(90));
} }
// TODO: Remove if the above works // TODO: Remove if the above works
// NumberFormat format = NumberFormat.getInstance(); // NumberFormat format = NumberFormat.getInstance();
@ -82,27 +82,27 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
// } // }
}); });
matrices.pop(); // text rotation matrices.popPose(); // text rotation
matrices.pop(); // rotation + centering matrices.popPose(); // rotation + centering
double boop = Util.milliTime() / 800D; double boop = Util.getMillis() / 800D;
float scale = stack.getItem() instanceof BlockItem float scale = stack.getItem() instanceof BlockItem
? 0.85F ? 0.85F
: 0.65F; : 0.65F;
matrices.push(); matrices.pushPose();
matrices.translate(.5f, 1f + Math.sin(boop % (2 * Math.PI)) * 0.065, .5f); matrices.translate(.5f, 1f + Math.sin(boop % (2 * Math.PI)) * 0.065, .5f);
matrices.rotate(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360))); matrices.mulPose(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360)));
matrices.scale(scale, scale, scale); matrices.scale(scale, scale, scale);
try { try {
Minecraft.getInstance().getItemRenderer().renderItem( Minecraft.getInstance().getItemRenderer().renderStatic(
stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer
); );
} catch (Exception e) { } catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a battery box! The item is " + stack.getItem().getRegistryName() + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a battery box! The item is " + stack.getItem().getRegistryName() + "!", e);
} }
matrices.pop(); matrices.popPose();
} }
} }

View file

@ -35,12 +35,12 @@ public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStan
return; return;
} }
matrices.push(); matrices.pushPose();
matrices.translate(0.5F, 1F, 0.5F); matrices.translate(0.5F, 1F, 0.5F);
double boop = Util.milliTime() / 800D; double boop = Util.getMillis() / 800D;
matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D); matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); matrices.mulPose(new Quaternion((float) (boop * 40D % 360), 0, 1, 0));
float scale = stack.getItem() instanceof BlockItem float scale = stack.getItem() instanceof BlockItem
? 0.85F ? 0.85F
@ -52,6 +52,6 @@ public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStan
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is " + stack.getItem().getRegistryName() + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is " + stack.getItem().getRegistryName() + "!", e);
} }
matrices.pop(); matrices.popPose();
} }
} }

View file

@ -37,12 +37,12 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
ItemStack stack = tile.inv.getStackInSlot(0); ItemStack stack = tile.inv.getStackInSlot(0);
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
// TODO: [port][refactor] migrate this logic into a single method, most renders use it // TODO: [port][refactor] migrate this logic into a single method, most renders use it
matrices.push(); matrices.pushPose();
matrices.translate(0.5F, 1F, 0.5F); matrices.translate(0.5F, 1F, 0.5F);
double boop = Util.milliTime() / 800D; double boop = Util.getMillis() / 800D;
matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D); matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port] might not work matrices.mulPose(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port] might not work
float scale = stack.getItem() instanceof BlockItem float scale = stack.getItem() instanceof BlockItem
? 0.85F ? 0.85F
@ -54,7 +54,7 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + stack.getItem().getRegistryName() + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + stack.getItem().getRegistryName() + "!", e);
} }
matrices.pop(); matrices.popPose();
} }
int index = tile.recipeForRenderIndex; int index = tile.recipeForRenderIndex;
@ -62,10 +62,10 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index); EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
if (recipe != null) { if (recipe != null) {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
Direction facing = Direction.byHorizontalIndex(i); // TODO: [port][test] validate this works Direction facing = Direction.from2DDataValue(i); // TODO: [port][test] validate this works
BlockPos offset = tile.getPos().offset(facing, 3); BlockPos offset = tile.getBlockPos().relative(facing, 3);
AssetUtil.renderLaser(tile.getPos().getX() + 0.5, tile.getPos().getY() + 0.5, tile.getPos().getZ() + 0.5, offset.getX() + 0.5, offset.getY() + 0.95, offset.getZ() + 0.5, 80, 1F, 0.1F, recipe.getParticleColors()); AssetUtil.renderLaser(tile.getBlockPos().getX() + 0.5, tile.getBlockPos().getY() + 0.5, tile.getBlockPos().getZ() + 0.5, offset.getX() + 0.5, offset.getY() + 0.95, offset.getZ() + 0.5, 80, 1F, 0.1F, recipe.getParticleColors());
} }
} }
} }

View file

@ -58,31 +58,31 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
hasInvis = true; hasInvis = true;
} }
ItemStack hand = player.getHeldItemMainhand(); ItemStack hand = player.getMainHandItem();
if (hasGoggles || StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench) || "themattabase".equals(player.getName().getString())) { if (hasGoggles || StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench) || "themattabase".equals(player.getName().getString())) {
matrices.push(); matrices.pushPose();
float yTrans = 0.2f; //tile.getBlockMetadata() == 0 ? 0.2F : 0.8F; // TODO: [port][fix] no clue what this is float yTrans = 0.2f; //tile.getBlockMetadata() == 0 ? 0.2F : 0.8F; // TODO: [port][fix] no clue what this is
matrices.translate(0.5F, yTrans, 0.5F); matrices.translate(0.5F, yTrans, 0.5F);
matrices.scale(0.2F, 0.2F, 0.2F); matrices.scale(0.2F, 0.2F, 0.2F);
double boop = Util.milliTime() / 800D; double boop = Util.getMillis() / 800D;
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port][test] this might not work matrices.mulPose(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port][test] this might not work
AssetUtil.renderItemInWorld(upgrade, combinedLight, combinedOverlay, matrices, buffer); AssetUtil.renderItemInWorld(upgrade, combinedLight, combinedOverlay, matrices, buffer);
matrices.pop(); matrices.popPose();
} }
} }
ConcurrentSet<IConnectionPair> connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(tile.getPos(), tile.getWorld()); ConcurrentSet<IConnectionPair> connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(tile.getBlockPos(), tile.getLevel());
if (connections != null && !connections.isEmpty()) { if (connections != null && !connections.isEmpty()) {
for (IConnectionPair pair : connections) { for (IConnectionPair pair : connections) {
if (!pair.doesSuppressRender() && tile.getPos().equals(pair.getPositions()[0])) { if (!pair.doesSuppressRender() && tile.getBlockPos().equals(pair.getPositions()[0])) {
BlockPos first = tile.getPos(); BlockPos first = tile.getBlockPos();
BlockPos second = pair.getPositions()[1]; BlockPos second = pair.getPositions()[1];
TileEntity secondTile = tile.getWorld().getTileEntity(second); TileEntity secondTile = tile.getLevel().getBlockEntity(second);
if (secondTile instanceof TileEntityLaserRelay) { if (secondTile instanceof TileEntityLaserRelay) {
ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0); ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0);
boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == ActuallyItems.LASER_UPGRADE_INVISIBILITY.get(); boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == ActuallyItems.LASER_UPGRADE_INVISIBILITY.get();
@ -107,7 +107,7 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
} }
@Override @Override
public boolean isGlobalRenderer(TileEntityLaserRelay tile) { public boolean shouldRenderOffScreen(TileEntityLaserRelay tile) {
return true; return true;
} }
} }

View file

@ -36,19 +36,19 @@ public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomic
return; return;
} }
matrices.push(); matrices.pushPose();
matrices.translate(0.5F, 0.5F, 0.5F); matrices.translate(0.5F, 0.5F, 0.5F);
matrices.rotate(new Quaternion(180F, 0.0F, 0.0F, 1.0F)); matrices.mulPose(new Quaternion(180F, 0.0F, 0.0F, 1.0F));
BlockState state = tile.getWorld().getBlockState(tile.getPos()); BlockState state = tile.getLevel().getBlockState(tile.getBlockPos());
int meta = 0; //state.getBlock().getMetaFromState(state); // TODO: [port][fix] this needs to be checking direction not meta int meta = 0; //state.getBlock().getMetaFromState(state); // TODO: [port][fix] this needs to be checking direction not meta
if (meta == 0) { if (meta == 0) {
matrices.translate(0F, -0.5F, 0F); matrices.translate(0F, -0.5F, 0F);
matrices.rotate(new Quaternion(90F, 1F, 0F, 0F)); matrices.mulPose(new Quaternion(90F, 1F, 0F, 0F));
} }
if (meta == 1) { if (meta == 1) {
matrices.translate(0F, -1.5F - 0.5F / 16F, 0F); matrices.translate(0F, -1.5F - 0.5F / 16F, 0F);
matrices.rotate(new Quaternion(90F, 1F, 0F, 0F)); matrices.mulPose(new Quaternion(90F, 1F, 0F, 0F));
} }
if (meta == 2) { if (meta == 2) {
matrices.translate(0F, -1F, 0F); matrices.translate(0F, -1F, 0F);
@ -61,17 +61,17 @@ public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomic
if (meta == 4) { if (meta == 4) {
matrices.translate(0F, -1F, 0F); matrices.translate(0F, -1F, 0F);
matrices.translate(0.5F + 0.5F / 16F, 0F, 0F); matrices.translate(0.5F + 0.5F / 16F, 0F, 0F);
matrices.rotate(new Quaternion(90F, 0F, 1F, 0F)); matrices.mulPose(new Quaternion(90F, 0F, 1F, 0F));
} }
if (meta == 5) { if (meta == 5) {
matrices.translate(0F, -1F, 0F); matrices.translate(0F, -1F, 0F);
matrices.translate(-0.5F, 0F, 0F); matrices.translate(-0.5F, 0F, 0F);
matrices.rotate(new Quaternion(90F, 0F, 1F, 0F)); matrices.mulPose(new Quaternion(90F, 0F, 1F, 0F));
} }
matrices.scale(0.5F, 0.5F, 0.5F); matrices.scale(0.5F, 0.5F, 0.5F);
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer); AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
matrices.pop(); matrices.popPose();
} }
} }

View file

@ -49,7 +49,7 @@ public class BookmarkButton extends Button {
button.assignedPage = null; button.assignedPage = null;
} else if (!(button.booklet instanceof GuiPage) || ((GuiPage) button.booklet).pages[0] != button.assignedPage) { } else if (!(button.booklet instanceof GuiPage) || ((GuiPage) button.booklet).pages[0] != button.assignedPage) {
GuiPage gui = BookletUtils.createPageGui(button.booklet.previousScreen, button.booklet, button.assignedPage); GuiPage gui = BookletUtils.createPageGui(button.booklet.previousScreen, button.booklet, button.assignedPage);
Minecraft.getInstance().displayGuiScreen(gui); Minecraft.getInstance().setScreen(gui);
} }
} else { } else {
if (button.booklet instanceof GuiPage) { if (button.booklet instanceof GuiPage) {
@ -63,16 +63,16 @@ public class BookmarkButton extends Button {
@Override @Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
if (this.visible) { if (this.visible) {
Minecraft.getInstance().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); Minecraft.getInstance().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager._color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.isHovered = mouseX >= this.x && mouseY >= this.y && this.x < this.x + this.width && this.y < this.y + this.height; this.isHovered = mouseX >= this.x && mouseY >= this.y && this.x < this.x + this.width && this.y < this.y + this.height;
int offset = this.isHovered int offset = this.isHovered
? 1 ? 1
: 0; : 0;
GlStateManager.enableBlend(); GlStateManager._enableBlend();
GlStateManager.blendFuncSeparate(770, 771, 1, 0); GlStateManager._blendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager._blendFunc(770, 771);
int renderHeight = 25; int renderHeight = 25;
this.blit(matrices, this.x, this.y, 224 + (this.assignedPage == null this.blit(matrices, this.x, this.y, 224 + (this.assignedPage == null
? 0 ? 0
@ -84,9 +84,9 @@ public class BookmarkButton extends Button {
if (this.assignedPage != null) { if (this.assignedPage != null) {
ItemStack display = this.assignedPage.getChapter().getDisplayItemStack(); ItemStack display = this.assignedPage.getChapter().getDisplayItemStack();
if (StackUtil.isValid(display)) { if (StackUtil.isValid(display)) {
GlStateManager.pushMatrix(); GlStateManager._pushMatrix();
AssetUtil.renderStackToGui(display, this.x + 2, this.y + 1, 0.725F); AssetUtil.renderStackToGui(display, this.x + 2, this.y + 1, 0.725F);
GlStateManager.popMatrix(); GlStateManager._popMatrix();
} }
} }
} }
@ -113,7 +113,7 @@ public class BookmarkButton extends Button {
} }
Minecraft mc = Minecraft.getInstance(); Minecraft mc = Minecraft.getInstance();
GuiUtils.drawHoveringText(stack, list.stream().map(StringTextComponent::new).collect(Collectors.toList()), mouseX, mouseY, mc.currentScreen.width, mc.currentScreen.height, -1, mc.fontRenderer); GuiUtils.drawHoveringText(stack, list.stream().map(StringTextComponent::new).collect(Collectors.toList()), mouseX, mouseY, mc.screen.width, mc.screen.height, -1, mc.font);
} }
} }
} }

View file

@ -38,30 +38,30 @@ public class EntryButton extends Button {
@Override @Override
public void drawButton(Minecraft minecraft, int mouseX, int mouseY, float f) { public void drawButton(Minecraft minecraft, int mouseX, int mouseY, float f) {
if (this.visible) { if (this.visible) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color3arg(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height; this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
GlStateManager.enableBlend(); GlStateManager._enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager._blendFunc(770, 771);
this.mouseDragged(minecraft, mouseX, mouseY); this.mouseDragged(minecraft, mouseX, mouseY);
int textOffsetX = 0; int textOffsetX = 0;
if (StackUtil.isValid(this.stackToRender)) { if (StackUtil.isValid(this.stackToRender)) {
GlStateManager.pushMatrix(); GlStateManager._pushMatrix();
AssetUtil.renderStackToGui(this.stackToRender, this.x - 4, this.y, 0.725F); AssetUtil.renderStackToGui(this.stackToRender, this.x - 4, this.y, 0.725F);
GlStateManager.popMatrix(); GlStateManager._popMatrix();
textOffsetX = 10; textOffsetX = 10;
} }
float scale = this.gui.getMediumFontSize(); float scale = this.gui.getMediumFontSize();
if (this.hovered) { if (this.hovered) {
GlStateManager.pushMatrix(); GlStateManager._pushMatrix();
AssetUtil.drawHorizontalGradientRect(this.x + textOffsetX - 1, this.y + this.height - 1, this.x + (int) (minecraft.fontRenderer.getStringWidth(this.displayString) * scale) + textOffsetX + 1, this.y + this.height, 0x80 << 24 | 22271, 22271, this.zLevel); AssetUtil.drawHorizontalGradientRect(this.x + textOffsetX - 1, this.y + this.height - 1, this.x + (int) (minecraft.font.width(this.displayString) * scale) + textOffsetX + 1, this.y + this.height, 0x80 << 24 | 22271, 22271, this.zLevel);
GlStateManager.popMatrix(); GlStateManager._popMatrix();
} }
StringUtil.renderScaledAsciiString(minecraft.fontRenderer, this.displayString, this.x + textOffsetX, this.y + 2 + (this.height - 8) / 2, 0, false, scale); StringUtil.renderScaledAsciiString(minecraft.font, this.displayString, this.x + textOffsetX, this.y + 2 + (this.height - 8) / 2, 0, false, scale);
} }
} }
} }

View file

@ -16,6 +16,8 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button.IPressable;
public class TrialsButton extends TexturedButton { public class TrialsButton extends TexturedButton {
private final boolean isTrials; private final boolean isTrials;
@ -32,7 +34,7 @@ public class TrialsButton extends TexturedButton {
if (this.visible) { if (this.visible) {
if (this.isHovered || this.isTrials) { if (this.isHovered || this.isTrials) {
this.drawCenteredString(minecraft.fontRenderer, StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".trialsButton.name"), this.x + (this.width - 8) / 2, this.y + (this.height - 8) / 2, 14737632); this.drawCenteredString(minecraft.font, StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".trialsButton.name"), this.x + (this.width - 8) / 2, this.y + (this.height - 8) / 2, 14737632);
} }
} }
} }

View file

@ -57,7 +57,7 @@ public class BookletEntry implements IBookletEntry {
if (!items.isEmpty()) { if (!items.isEmpty()) {
for (ItemStack stack : items) { for (ItemStack stack : items) {
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
List<String> tooltip = stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips List<String> tooltip = stack.getTooltipLines(mc.player, mc.options.advancedItemTooltips
? ITooltipFlag.TooltipFlags.ADVANCED ? ITooltipFlag.TooltipFlags.ADVANCED
: ITooltipFlag.TooltipFlags.NORMAL); : ITooltipFlag.TooltipFlags.NORMAL);
for (String strg : tooltip) { for (String strg : tooltip) {

View file

@ -116,8 +116,8 @@ public abstract class GuiBooklet extends GuiBookletBase {
if (this.hasSearchBar()) { if (this.hasSearchBar()) {
this.searchField = new TextFieldWidget(this.font, this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 64, 12, StringTextComponent.EMPTY); this.searchField = new TextFieldWidget(this.font, this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 64, 12, StringTextComponent.EMPTY);
this.searchField.setMaxStringLength(50); this.searchField.setMaxLength(50);
this.searchField.setEnableBackgroundDrawing(false); this.searchField.setBordered(false);
this.children.add(this.searchField); this.children.add(this.searchField);
} }
@ -135,13 +135,13 @@ public abstract class GuiBooklet extends GuiBookletBase {
} }
} }
this.buttonTrials = new TrialsButton(this, btn -> this.getMinecraft().displayGuiScreen(new GuiEntry(this.previousScreen, this, ActuallyAdditionsAPI.entryTrials, 0, "", false))); this.buttonTrials = new TrialsButton(this, btn -> this.getMinecraft().setScreen(new GuiEntry(this.previousScreen, this, ActuallyAdditionsAPI.entryTrials, 0, "", false)));
this.addButton(this.buttonTrials); this.addButton(this.buttonTrials);
} }
@Override @Override
public void onClose() { public void removed() {
super.onClose(); super.removed();
//Don't cache the parent GUI, otherwise it opens again when you close the cached book! //Don't cache the parent GUI, otherwise it opens again when you close the cached book!
this.previousScreen = null; this.previousScreen = null;
@ -173,19 +173,19 @@ public abstract class GuiBooklet extends GuiBookletBase {
} }
public void drawScreenPre(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
GlStateManager.color4f(1F, 1F, 1F, 1F); GlStateManager._color4f(1F, 1F, 1F, 1F);
this.getMinecraft().getTextureManager().bindTexture(RES_LOC_GUI); this.getMinecraft().getTextureManager().bind(RES_LOC_GUI);
blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize, 512, 512); blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize, 512, 512);
if (this.hasSearchBar()) { if (this.hasSearchBar()) {
this.getMinecraft().getTextureManager().bindTexture(RES_LOC_GADGETS); this.getMinecraft().getTextureManager().bind(RES_LOC_GADGETS);
this.blit(matrices, this.guiLeft + this.xSize, this.guiTop + this.ySize - 40, 188, 0, 68, 14); this.blit(matrices, this.guiLeft + this.xSize, this.guiTop + this.ySize - 40, 188, 0, 68, 14);
// boolean unicodeBefore = this.font.getUnicodeFlag(); // boolean unicodeBefore = this.font.getUnicodeFlag();
// this.font.setUnicodeFlag(true); // this.font.setUnicodeFlag(true);
if (!this.searchField.isFocused() && (this.searchField.getText() == null || this.searchField.getText().isEmpty())) { if (!this.searchField.isFocused() && (this.searchField.getValue() == null || this.searchField.getValue().isEmpty())) {
this.font.drawString(matrices, TextFormatting.ITALIC + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.searchField"), this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 0xFFFFFF); this.font.draw(matrices, TextFormatting.ITALIC + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.searchField"), this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 0xFFFFFF);
} }
this.searchField.render(matrices, mouseX, mouseY, partialTicks); this.searchField.render(matrices, mouseX, mouseY, partialTicks);
@ -279,7 +279,7 @@ public abstract class GuiBooklet extends GuiBookletBase {
} }
public void onBackButtonPressed() { public void onBackButtonPressed() {
this.getMinecraft().displayGuiScreen(new GuiMainPage(this.previousScreen)); this.getMinecraft().setScreen(new GuiMainPage(this.previousScreen));
} }
public boolean hasSearchBar() { public boolean hasSearchBar() {
@ -310,7 +310,7 @@ public abstract class GuiBooklet extends GuiBookletBase {
GuiBookletBase parent = !(this instanceof GuiEntry) GuiBookletBase parent = !(this instanceof GuiEntry)
? this ? this
: this.parentPage; : this.parentPage;
this.getMinecraft().displayGuiScreen(new GuiEntry(this.previousScreen, parent, ActuallyAdditionsAPI.entryAllAndSearch, 0, searchBarText, true)); this.getMinecraft().setScreen(new GuiEntry(this.previousScreen, parent, ActuallyAdditionsAPI.entryAllAndSearch, 0, searchBarText, true));
} }
// TODO: ensure typing still works // TODO: ensure typing still works

View file

@ -80,7 +80,7 @@ public class GuiEntry extends GuiBooklet {
super.init(); super.init();
if (this.hasSearchBar() && this.searchText != null) { if (this.hasSearchBar() && this.searchText != null) {
this.searchField.setText(this.searchText); this.searchField.setValue(this.searchText);
if (this.focusSearch) { if (this.focusSearch) {
this.searchField.setFocused(true); this.searchField.setFocused(true);
} }

View file

@ -73,12 +73,12 @@ public class GuiMainPage extends GuiBooklet {
super.init(); super.init();
int flavor = 1; int flavor = 1;
if (this.getMinecraft().world.rand.nextFloat() <= 0.1) { if (this.getMinecraft().level.random.nextFloat() <= 0.1) {
flavor = MathHelper.nextInt(this.getMinecraft().world.rand, 2, 7); flavor = MathHelper.nextInt(this.getMinecraft().level.random, 2, 7);
} }
this.bookletName = "info." + ActuallyAdditions.MODID + ".booklet.manualName.1." + flavor; this.bookletName = "info." + ActuallyAdditions.MODID + ".booklet.manualName.1." + flavor;
String usedQuote = QUOTES[this.getMinecraft().world.rand.nextInt(QUOTES.length)]; String usedQuote = QUOTES[this.getMinecraft().level.random.nextInt(QUOTES.length)];
String[] quoteSplit = usedQuote.split("@"); String[] quoteSplit = usedQuote.split("@");
if (quoteSplit.length == 2) { if (quoteSplit.length == 2) {
this.quote = this.font.listFormattedStringToWidth(quoteSplit[0], 120); this.quote = this.font.listFormattedStringToWidth(quoteSplit[0], 120);
@ -107,7 +107,7 @@ public class GuiMainPage extends GuiBooklet {
} else if (playerName.equalsIgnoreCase("ellpeck") || playerName.equalsIgnoreCase("profprospector")) { } else if (playerName.equalsIgnoreCase("ellpeck") || playerName.equalsIgnoreCase("profprospector")) {
String[] colors = new String[15]; String[] colors = new String[15];
for (int i = 0; i < colors.length; i++) { for (int i = 0; i < colors.length; i++) {
colors[i] = TextFormatting.fromColorIndex(this.getMinecraft().world.rand.nextInt(15)).toString() + TextFormatting.ITALIC; colors[i] = TextFormatting.getById(this.getMinecraft().level.random.nextInt(15)).toString() + TextFormatting.ITALIC;
} }
this.bookletEdition = String.format("%sC%so%sl%so%sr%sf%su%sl %sE%sd%si%st%si%so%sn", (Object[]) colors); this.bookletEdition = String.format("%sC%so%sl%so%sr%sf%su%sl %sE%sd%si%st%si%so%sn", (Object[]) colors);
} else if (playerName.equalsIgnoreCase("oitsjustjose")) { } else if (playerName.equalsIgnoreCase("oitsjustjose")) {
@ -174,7 +174,7 @@ public class GuiMainPage extends GuiBooklet {
if (displayed.size() > button.id) { if (displayed.size() > button.id) {
IBookletEntry entry = displayed.get(button.id); IBookletEntry entry = displayed.get(button.id);
if (entry != null) { if (entry != null) {
this.getMinecraft().displayGuiScreen(new GuiEntry(this.previousScreen, this, entry, 0, "", false)); this.getMinecraft().setScreen(new GuiEntry(this.previousScreen, this, entry, 0, "", false));
} }
} }
} }
@ -184,7 +184,7 @@ public class GuiMainPage extends GuiBooklet {
}*/ }*/
else if (button == this.configButton) { else if (button == this.configButton) {
GuiScreen config = new GuiConfiguration(this); GuiScreen config = new GuiConfiguration(this);
this.getMinecraft().displayGuiScreen(config); this.getMinecraft().setScreen(config);
} else if (this.showTutorial && button == this.tutorialButton) { } else if (this.showTutorial && button == this.tutorialButton) {
if (this.hasBookmarkButtons()) { if (this.hasBookmarkButtons()) {
if (!isShiftKeyDown()) { if (!isShiftKeyDown()) {
@ -212,12 +212,12 @@ public class GuiMainPage extends GuiBooklet {
super.drawScreenPre(mouseX, mouseY, partialTicks); super.drawScreenPre(mouseX, mouseY, partialTicks);
String strg = TextFormatting.DARK_GREEN + StringUtil.localize(this.bookletName); String strg = TextFormatting.DARK_GREEN + StringUtil.localize(this.bookletName);
this.font.drawString(strg, this.guiLeft + 72 - this.font.getStringWidth(strg) / 2 - 3, this.guiTop + 19, 0); this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19, 0);
strg = TextFormatting.DARK_GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.manualName.2"); strg = TextFormatting.DARK_GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".booklet.manualName.2");
this.font.drawString(strg, this.guiLeft + 72 - this.font.getStringWidth(strg) / 2 - 3, this.guiTop + 19 + this.font.FONT_HEIGHT, 0); this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 19 + this.font.lineHeight, 0);
strg = TextFormatting.GOLD + TextFormatting.ITALIC.toString() + this.bookletEdition; strg = TextFormatting.GOLD + TextFormatting.ITALIC.toString() + this.bookletEdition;
this.font.drawString(strg, this.guiLeft + 72 - this.font.getStringWidth(strg) / 2 - 3, this.guiTop + 40, 0); this.font.draw(strg, this.guiLeft + 72 - this.font.width(strg) / 2 - 3, this.guiTop + 40, 0);
if (this.showTutorial) { if (this.showTutorial) {
String text = TextFormatting.BLUE + "It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with " + ActuallyAdditions.NAME + "! \nIf you don't want this, shift-click the button."; String text = TextFormatting.BLUE + "It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with " + ActuallyAdditions.NAME + "! \nIf you don't want this, shift-click the button.";

View file

@ -176,7 +176,7 @@ public class GuiPage extends GuiBooklet {
String pageStrg = "Page " + (chapter.getPageIndex(this.pages[i]) + 1) + "/" + chapter.getAllPages().length; String pageStrg = "Page " + (chapter.getPageIndex(this.pages[i]) + 1) + "/" + chapter.getAllPages().length;
this.renderScaledAsciiString(pageStrg, this.guiLeft + 25 + i * 136, this.guiTop + this.ySize - 7, 0xFFFFFF, false, this.getLargeFontSize()); this.renderScaledAsciiString(pageStrg, this.guiLeft + 25 + i * 136, this.guiTop + this.ySize - 7, 0xFFFFFF, false, this.getLargeFontSize());
GlStateManager.color(1F, 1F, 1F); GlStateManager.color1arg(1F, 1F, 1F);
page.drawScreenPre(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks); page.drawScreenPre(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
} }
} }
@ -192,7 +192,7 @@ public class GuiPage extends GuiBooklet {
for (int i = 0; i < this.pages.length; i++) { for (int i = 0; i < this.pages.length; i++) {
IBookletPage page = this.pages[i]; IBookletPage page = this.pages[i];
if (page != null) { if (page != null) {
GlStateManager.color(1F, 1F, 1F); GlStateManager.color1arg(1F, 1F, 1F);
page.drawScreenPost(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks); page.drawScreenPost(this, this.guiLeft + 6 + i * 142, this.guiTop + 7, mouseX, mouseY, partialTicks);
} }
} }

View file

@ -57,10 +57,10 @@ public class ItemDisplay {
public void drawPost(int mouseX, int mouseY) { public void drawPost(int mouseX, int mouseY) {
if (this.isHovered(mouseX, mouseY)) { if (this.isHovered(mouseX, mouseY)) {
Minecraft mc = this.gui.mc; Minecraft mc = this.gui.mc;
boolean flagBefore = mc.fontRenderer.getUnicodeFlag(); boolean flagBefore = mc.font.getUnicodeFlag();
mc.fontRenderer.setUnicodeFlag(false); mc.font.setUnicodeFlag(false);
List<String> list = this.stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips List<String> list = this.stack.getTooltipLines(mc.player, mc.options.advancedItemTooltips
? TooltipFlags.ADVANCED ? TooltipFlags.ADVANCED
: TooltipFlags.NORMAL); : TooltipFlags.NORMAL);
@ -76,9 +76,9 @@ public class ItemDisplay {
list.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".clickToSeeRecipe")); list.add(TextFormatting.GOLD + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".clickToSeeRecipe"));
} }
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.font);
mc.fontRenderer.setUnicodeFlag(flagBefore); mc.font.setUnicodeFlag(flagBefore);
} }
} }

View file

@ -33,7 +33,7 @@ public class PageCoffeeMachine extends BookletPage {
public PageCoffeeMachine(int localizationKey, CoffeeIngredient ingredient) { public PageCoffeeMachine(int localizationKey, CoffeeIngredient ingredient) {
super(localizationKey); super(localizationKey);
this.ingredient = ingredient; this.ingredient = ingredient;
this.stacks = ingredient.getInput().getMatchingStacks(); this.stacks = ingredient.getInput().getItems();
this.outcome = new ItemStack(ActuallyItems.COFFEE.get()); this.outcome = new ItemStack(ActuallyItems.COFFEE.get());
ActuallyAdditionsAPI.methodHandler.addEffectToStack(this.outcome, this.ingredient); ActuallyAdditionsAPI.methodHandler.addEffectToStack(this.outcome, this.ingredient);
@ -44,7 +44,7 @@ public class PageCoffeeMachine extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); gui.getMinecraft().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GuiUtils.drawTexturedModalRect(startX + 5, startY + 10, 0, 74, 117, 72, 0); GuiUtils.drawTexturedModalRect(startX + 5, startY + 10, 0, 74, 117, 72, 0);
gui.renderScaledAsciiString("(Coffee Maker Recipe)", startX + 6, startY + 78, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("(Coffee Maker Recipe)", startX + 6, startY + 78, 0, false, gui.getMediumFontSize());

View file

@ -109,7 +109,7 @@ public class PageCrafting extends BookletPage {
if (!this.recipes.isEmpty()) { if (!this.recipes.isEmpty()) {
for (IRecipe recipe : this.recipes) { for (IRecipe recipe : this.recipes) {
if (recipe != null) { if (recipe != null) {
ItemStack output = recipe.getRecipeOutput(); ItemStack output = recipe.getResultItem();
if (StackUtil.isValid(output)) { if (StackUtil.isValid(output)) {
ItemStack copy = output.copy(); ItemStack copy = output.copy();
if (this.isWildcard) { if (this.isWildcard) {
@ -129,7 +129,7 @@ public class PageCrafting extends BookletPage {
if (recipe instanceof BlankRecipe) { if (recipe instanceof BlankRecipe) {
this.recipeTypeLocKey = "tooltip." + ActuallyAdditions.MODID + ".disabled"; this.recipeTypeLocKey = "tooltip." + ActuallyAdditions.MODID + ".disabled";
gui.addOrModifyItemRenderer(recipe.getRecipeOutput(), startX + 100, startY + 25, 1F, false); gui.addOrModifyItemRenderer(recipe.getResultItem(), startX + 100, startY + 25, 1F, false);
return; return;
} else if (recipe instanceof ShapedRecipes) { } else if (recipe instanceof ShapedRecipes) {
ShapedRecipes shaped = (ShapedRecipes) recipe; ShapedRecipes shaped = (ShapedRecipes) recipe;
@ -167,7 +167,7 @@ public class PageCrafting extends BookletPage {
for (int y = 0; y < height; y++) { for (int y = 0; y < height; y++) {
Ingredient ing = ings[y * width + x]; Ingredient ing = ings[y * width + x];
if (ing != null) { if (ing != null) {
ItemStack[] stacks = ing.getMatchingStacks(); ItemStack[] stacks = ing.getItems();
if (stacks != null && stacks.length > 0) { if (stacks != null && stacks.length > 0) {
ItemStack stack = stacks[0]; ItemStack stack = stacks[0];
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
@ -184,6 +184,6 @@ public class PageCrafting extends BookletPage {
} }
} }
gui.addOrModifyItemRenderer(recipe.getRecipeOutput(), startX + 100, startY + 25, 1F, false); gui.addOrModifyItemRenderer(recipe.getResultItem(), startX + 100, startY + 25, 1F, false);
} }
} }

View file

@ -33,7 +33,7 @@ public class PageCrusherRecipe extends BookletPage {
public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe) { public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe) {
super(localizationKey); super(localizationKey);
this.recipe = recipe; this.recipe = recipe;
this.stacks = recipe.getInput().getMatchingStacks(); this.stacks = recipe.getInput().getItems();
} }
@Override @Override
@ -41,7 +41,7 @@ public class PageCrusherRecipe extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); gui.getMinecraft().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GuiUtils.drawTexturedModalRect(startX + 38, startY + 6, 136, 0, 52, 74, 0); GuiUtils.drawTexturedModalRect(startX + 38, startY + 6, 136, 0, 52, 74, 0);
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".crusherRecipe") + ")", startX + 36, startY + 85, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".crusherRecipe") + ")", startX + 36, startY + 85, 0, false, gui.getMediumFontSize());

View file

@ -37,11 +37,11 @@ public class PageEmpowerer extends BookletPage {
super(localizationKey); super(localizationKey);
this.recipe = recipe; this.recipe = recipe;
if (recipe != null) { if (recipe != null) {
this.inputs = recipe.getInput().getMatchingStacks(); this.inputs = recipe.getInput().getItems();
this.stand1 = recipe.getStandOne().getMatchingStacks(); this.stand1 = recipe.getStandOne().getItems();
this.stand2 = recipe.getStandTwo().getMatchingStacks(); this.stand2 = recipe.getStandTwo().getItems();
this.stand3 = recipe.getStandThree().getMatchingStacks(); this.stand3 = recipe.getStandThree().getItems();
this.stand4 = recipe.getStandFour().getMatchingStacks(); this.stand4 = recipe.getStandFour().getItems();
} }
} }
@ -50,7 +50,7 @@ public class PageEmpowerer extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); gui.getMinecraft().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GuiUtils.drawTexturedModalRect(startX + 5, startY + 10, 117, 74, 116, 72, 0); GuiUtils.drawTexturedModalRect(startX + 5, startY + 10, 117, 74, 116, 72, 0);
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".empowererRecipe") + ")", startX + 6, startY + 85, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".empowererRecipe") + ")", startX + 6, startY + 85, 0, false, gui.getMediumFontSize());

View file

@ -43,7 +43,7 @@ public class PageFurnace extends BookletPage {
for (Map.Entry<ItemStack, ItemStack> entry : FurnaceRecipes.instance().getSmeltingList().entrySet()) { for (Map.Entry<ItemStack, ItemStack> entry : FurnaceRecipes.instance().getSmeltingList().entrySet()) {
ItemStack stack = entry.getValue(); ItemStack stack = entry.getValue();
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
if (stack.isItemEqual(output)) { if (stack.sameItem(output)) {
return entry.getKey(); return entry.getKey();
} }
} }
@ -56,7 +56,7 @@ public class PageFurnace extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); gui.getMinecraft().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GuiUtils.drawTexturedModalRect(startX + 23, startY + 10, 0, 146, 80, 26, 0); GuiUtils.drawTexturedModalRect(startX + 23, startY + 10, 0, 146, 80, 26, 0);
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".furnaceRecipe") + ")", startX + 32, startY + 42, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".furnaceRecipe") + ")", startX + 32, startY + 42, 0, false, gui.getMediumFontSize());

View file

@ -44,7 +44,7 @@ public class PagePicture extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(this.resLoc); gui.getMinecraft().getTextureManager().bind(this.resLoc);
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.enableBlend(); RenderSystem.enableBlend();

View file

@ -35,7 +35,7 @@ public class PageReconstructor extends BookletPage {
super(localizationKey); super(localizationKey);
this.recipe = recipe; this.recipe = recipe;
if (recipe != null) { if (recipe != null) {
this.stacks = recipe.getInput().getMatchingStacks(); this.stacks = recipe.getInput().getItems();
} }
} }
@ -44,7 +44,7 @@ public class PageReconstructor extends BookletPage {
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
gui.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); gui.getMinecraft().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
GuiUtils.drawTexturedModalRect(startX + 30, startY + 10, 80, 146, 68, 48, 0); GuiUtils.drawTexturedModalRect(startX + 30, startY + 10, 80, 146, 68, 48, 0);
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".reconstructorRecipe") + ")", startX + 6, startY + 63, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".reconstructorRecipe") + ")", startX + 6, startY + 63, 0, false, gui.getMediumFontSize());
@ -75,7 +75,7 @@ public class PageReconstructor extends BookletPage {
if (this.recipe != null) { if (this.recipe != null) {
ItemStack copy = this.recipe.getOutput().copy(); ItemStack copy = this.recipe.getOutput().copy();
if (this.isWildcard) { if (this.isWildcard) {
copy.setDamage(Util.WILDCARD); copy.setDamageValue(Util.WILDCARD);
} }
list.add(copy); list.add(copy);
} }

View file

@ -59,7 +59,7 @@ public final class ConfigValues {
if (itemRedstoneTorchConfigurator == null || itemCompassConfigurator == null) { if (itemRedstoneTorchConfigurator == null || itemCompassConfigurator == null) {
ActuallyAdditions.LOGGER.error("Parsing the Configuration Items config failed, reverting back to the default settings!"); ActuallyAdditions.LOGGER.error("Parsing the Configuration Items config failed, reverting back to the default settings!");
itemRedstoneTorchConfigurator = Item.getItemFromBlock(Blocks.REDSTONE_TORCH); itemRedstoneTorchConfigurator = Item.byBlock(Blocks.REDSTONE_TORCH);
itemCompassConfigurator = Items.COMPASS; itemCompassConfigurator = Items.COMPASS;
} }
} }

View file

@ -28,9 +28,9 @@ import java.util.concurrent.ConcurrentHashMap;
public final class PlayerData { public final class PlayerData {
public static PlayerSave getDataFromPlayer(PlayerEntity player) { public static PlayerSave getDataFromPlayer(PlayerEntity player) {
WorldData worldData = WorldData.get(player.getEntityWorld()); WorldData worldData = WorldData.get(player.getCommandSenderWorld());
ConcurrentHashMap<UUID, PlayerSave> data = worldData.playerSaveData; ConcurrentHashMap<UUID, PlayerSave> data = worldData.playerSaveData;
UUID id = player.getUniqueID(); UUID id = player.getUUID();
if (data.containsKey(id)) { if (data.containsKey(id)) {
PlayerSave save = data.get(id); PlayerSave save = data.get(id);
@ -42,7 +42,7 @@ public final class PlayerData {
//Add Data if none is existant //Add Data if none is existant
PlayerSave save = new PlayerSave(id); PlayerSave save = new PlayerSave(id);
data.put(id, save); data.put(id, save);
worldData.markDirty(); worldData.setDirty();
return save; return save;
} }

View file

@ -38,12 +38,12 @@ public class WorldData extends WorldSavedData {
} }
public static WorldData get(World world) { public static WorldData get(World world) {
WorldData storage = ((ServerWorld) world).getSavedData().get(WorldData::new, SAVE_NAME); WorldData storage = ((ServerWorld) world).getDataStorage().get(WorldData::new, SAVE_NAME);
if (storage == null) { if (storage == null) {
storage = new WorldData(); storage = new WorldData();
storage.markDirty(); storage.setDirty();
((ServerWorld) world).getSavedData().set(storage); ((ServerWorld) world).getDataStorage().set(storage);
} }
return storage; return storage;
@ -57,7 +57,7 @@ public class WorldData extends WorldSavedData {
} }
@Override @Override
public void read(CompoundNBT compound) { public void load(CompoundNBT compound) {
this.laserRelayNetworks.clear(); this.laserRelayNetworks.clear();
ListNBT networkList = compound.getList("Networks", 10); ListNBT networkList = compound.getList("Networks", 10);
for (int i = 0; i < networkList.size(); i++) { for (int i = 0; i < networkList.size(); i++) {
@ -70,7 +70,7 @@ public class WorldData extends WorldSavedData {
for (int i = 0; i < playerList.size(); i++) { for (int i = 0; i < playerList.size(); i++) {
CompoundNBT player = playerList.getCompound(i); CompoundNBT player = playerList.getCompound(i);
UUID id = player.getUniqueId("UUID"); UUID id = player.getUUID("UUID");
CompoundNBT data = player.getCompound("Data"); CompoundNBT data = player.getCompound("Data");
PlayerSave save = new PlayerSave(id); PlayerSave save = new PlayerSave(id);
@ -80,7 +80,7 @@ public class WorldData extends WorldSavedData {
} }
@Override @Override
public CompoundNBT write(CompoundNBT compound) { public CompoundNBT save(CompoundNBT compound) {
//Laser World Data //Laser World Data
ListNBT networkList = new ListNBT(); ListNBT networkList = new ListNBT();
for (Network network : this.laserRelayNetworks) { for (Network network : this.laserRelayNetworks) {
@ -92,7 +92,7 @@ public class WorldData extends WorldSavedData {
ListNBT playerList = new ListNBT(); ListNBT playerList = new ListNBT();
for (PlayerSave save : this.playerSaveData.values()) { for (PlayerSave save : this.playerSaveData.values()) {
CompoundNBT player = new CompoundNBT(); CompoundNBT player = new CompoundNBT();
player.putUniqueId("UUID", save.id); player.putUUID("UUID", save.id);
CompoundNBT data = new CompoundNBT(); CompoundNBT data = new CompoundNBT();
save.writeToNBT(data, true); save.writeToNBT(data, true);

View file

@ -35,10 +35,10 @@ public class EntityWorm extends Entity {
Block block = state.getBlock(); Block block = state.getBlock();
boolean rightBlock = block instanceof BlockFarmland || block instanceof BlockDirt || block instanceof BlockGrass; boolean rightBlock = block instanceof BlockFarmland || block instanceof BlockDirt || block instanceof BlockGrass;
if (rightBlock) { if (rightBlock) {
BlockPos posUp = pos.up(); BlockPos posUp = pos.above();
BlockState stateUp = world.getBlockState(posUp); BlockState stateUp = world.getBlockState(posUp);
Block blockUp = stateUp.getBlock(); Block blockUp = stateUp.getBlock();
return blockUp instanceof IPlantable || blockUp instanceof BlockBush || blockUp.isReplaceable(world, posUp); return blockUp instanceof IPlantable || blockUp instanceof BlockBush || blockUp.canBeReplaced(world, posUp);
} else { } else {
return false; return false;
} }
@ -66,53 +66,53 @@ public class EntityWorm extends Entity {
@Override @Override
public void onEntityUpdate() { public void onEntityUpdate() {
if (!this.world.isRemote) { if (!this.level.isClientSide) {
this.timer++; this.timer++;
if (this.timer % 50 == 0) { if (this.timer % 50 == 0) {
for (int x = -1; x <= 1; x++) { for (int x = -1; x <= 1; x++) {
for (int z = -1; z <= 1; z++) { for (int z = -1; z <= 1; z++) {
BlockPos pos = new BlockPos(this.posX + x, this.posY, this.posZ + z); BlockPos pos = new BlockPos(this.posX + x, this.posY, this.posZ + z);
BlockState state = this.world.getBlockState(pos); BlockState state = this.level.getBlockState(pos);
Block block = state.getBlock(); Block block = state.getBlock();
boolean isMiddlePose = x == 0 && z == 0; boolean isMiddlePose = x == 0 && z == 0;
if (canWormify(this.world, pos, state)) { if (canWormify(this.level, pos, state)) {
boolean isFarmland = block instanceof BlockFarmland; boolean isFarmland = block instanceof BlockFarmland;
if (!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7) { if (!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7) {
if (isMiddlePose || this.world.rand.nextFloat() >= 0.45F) { if (isMiddlePose || this.level.random.nextFloat() >= 0.45F) {
if (!isFarmland) { if (!isFarmland) {
DefaultFarmerBehavior.useHoeAt(this.world, pos); DefaultFarmerBehavior.useHoeAt(this.level, pos);
} }
state = this.world.getBlockState(pos); state = this.level.getBlockState(pos);
isFarmland = state.getBlock() instanceof BlockFarmland; isFarmland = state.getBlock() instanceof BlockFarmland;
if (isFarmland) { if (isFarmland) {
this.world.setBlockState(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2); this.level.setBlock(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2);
} }
} }
} }
if (isFarmland && this.world.rand.nextFloat() >= 0.95F) { if (isFarmland && this.level.random.nextFloat() >= 0.95F) {
BlockPos plant = pos.up(); BlockPos plant = pos.above();
if (!this.world.isAirBlock(plant)) { if (!this.level.isEmptyBlock(plant)) {
BlockState plantState = this.world.getBlockState(plant); BlockState plantState = this.level.getBlockState(plant);
Block plantBlock = plantState.getBlock(); Block plantBlock = plantState.getBlock();
if ((plantBlock instanceof IGrowable || plantBlock instanceof IPlantable) && !(plantBlock instanceof BlockGrass)) { if ((plantBlock instanceof IGrowable || plantBlock instanceof IPlantable) && !(plantBlock instanceof BlockGrass)) {
plantBlock.updateTick(this.world, plant, plantState, this.world.rand); plantBlock.updateTick(this.level, plant, plantState, this.level.random);
BlockState newState = this.world.getBlockState(plant); BlockState newState = this.level.getBlockState(plant);
if (newState != plantState) { if (newState != plantState) {
this.world.playEvent(2005, plant, 0); this.level.levelEvent(2005, plant, 0);
} }
} }
} }
} }
} else if (isMiddlePose) { } else if (isMiddlePose) {
this.setDead(); this.removeAfterChangingDimensions();
} }
} }
} }
@ -120,7 +120,7 @@ public class EntityWorm extends Entity {
int dieTime = ConfigIntValues.WORMS_DIE_TIME.getValue(); int dieTime = ConfigIntValues.WORMS_DIE_TIME.getValue();
if (dieTime > 0 && this.timer >= dieTime) { if (dieTime > 0 && this.timer >= dieTime) {
this.setDead(); this.removeAfterChangingDimensions();
} }
} }
} }

View file

@ -41,8 +41,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class ClientEvents { public class ClientEvents {
private static final ITextComponent ADVANCED_INFO_TEXT_PRE = new StringTextComponent(" -").mergeStyle(TextFormatting.DARK_GRAY); private static final ITextComponent ADVANCED_INFO_TEXT_PRE = new StringTextComponent(" -").withStyle(TextFormatting.DARK_GRAY);
private static final ITextComponent ADVANCED_INFO_HEADER_PRE = new StringTextComponent(" -").mergeStyle(TextFormatting.GRAY); private static final ITextComponent ADVANCED_INFO_HEADER_PRE = new StringTextComponent(" -").withStyle(TextFormatting.GRAY);
private static EnergyDisplay energyDisplay; private static EnergyDisplay energyDisplay;
@ -52,7 +52,7 @@ public class ClientEvents {
if (event.phase == TickEvent.Phase.END) { if (event.phase == TickEvent.Phase.END) {
Minecraft mc = Minecraft.getInstance(); Minecraft mc = Minecraft.getInstance();
if (mc.world == null) { if (mc.level == null) {
WorldData.clear(); WorldData.clear();
} }
} }
@ -162,15 +162,15 @@ public class ClientEvents {
@SubscribeEvent @SubscribeEvent
public void onGameOverlay(RenderGameOverlayEvent.Post event) { public void onGameOverlay(RenderGameOverlayEvent.Post event) {
Minecraft minecraft = Minecraft.getInstance(); Minecraft minecraft = Minecraft.getInstance();
if (event.getType() == RenderGameOverlayEvent.ElementType.ALL && minecraft.currentScreen == null) { if (event.getType() == RenderGameOverlayEvent.ElementType.ALL && minecraft.screen == null) {
PlayerEntity player = minecraft.player; PlayerEntity player = minecraft.player;
if (player == null) { if (player == null) {
return; return;
} }
RayTraceResult posHit = minecraft.objectMouseOver; RayTraceResult posHit = minecraft.hitResult;
FontRenderer font = minecraft.fontRenderer; FontRenderer font = minecraft.font;
ItemStack stack = player.getHeldItemMainhand(); ItemStack stack = player.getMainHandItem();
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof IHudDisplay) { if (stack.getItem() instanceof IHudDisplay) {
@ -180,8 +180,8 @@ public class ClientEvents {
if (posHit != null && posHit.getType() == RayTraceResult.Type.BLOCK) { if (posHit != null && posHit.getType() == RayTraceResult.Type.BLOCK) {
BlockRayTraceResult rayCast = (BlockRayTraceResult) posHit; BlockRayTraceResult rayCast = (BlockRayTraceResult) posHit;
Block blockHit = minecraft.world.getBlockState(rayCast.getPos()).getBlock(); Block blockHit = minecraft.level.getBlockState(rayCast.getBlockPos()).getBlock();
TileEntity tileHit = minecraft.world.getTileEntity(rayCast.getPos()); TileEntity tileHit = minecraft.level.getBlockEntity(rayCast.getBlockPos());
if (blockHit instanceof IHudDisplay) { if (blockHit instanceof IHudDisplay) {
((IHudDisplay) blockHit).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow()); ((IHudDisplay) blockHit).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow());
@ -193,30 +193,30 @@ public class ClientEvents {
String strg = String.format("%s: %s", StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.name"), TextFormatting.DARK_RED + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode." + (base.isPulseMode String strg = String.format("%s: %s", StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.name"), TextFormatting.DARK_RED + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode." + (base.isPulseMode
? "pulse" ? "pulse"
: "deactivation")) + TextFormatting.RESET); : "deactivation")) + TextFormatting.RESET);
font.drawStringWithShadow(event.getMatrixStack(), strg, event.getWindow().getScaledWidth() / 2f + 5, event.getWindow().getScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE); font.drawShadow(event.getMatrixStack(), strg, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 5, StringUtil.DECIMAL_COLOR_WHITE);
String expl; String expl;
if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) { if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) {
expl = TextFormatting.GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem"); expl = TextFormatting.GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem");
} else { } else {
expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", StringUtil.localize(ConfigValues.itemRedstoneTorchConfigurator.getTranslationKey() + ".name")); expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", StringUtil.localize(ConfigValues.itemRedstoneTorchConfigurator.getDescriptionId() + ".name"));
} }
font.drawStringWithShadow(event.getMatrixStack(), expl, event.getWindow().getScaledWidth() / 2f + 5, event.getWindow().getScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE); font.drawShadow(event.getMatrixStack(), expl, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
if (tileHit instanceof IEnergyDisplay) { if (tileHit instanceof IEnergyDisplay) {
IEnergyDisplay display = (IEnergyDisplay) tileHit; IEnergyDisplay display = (IEnergyDisplay) tileHit;
if (!display.needsHoldShift() || player.isSneaking()) { if (!display.needsHoldShift() || player.isShiftKeyDown()) {
if (energyDisplay == null) { if (energyDisplay == null) {
energyDisplay = new EnergyDisplay(0, 0, null); energyDisplay = new EnergyDisplay(0, 0, null);
} }
energyDisplay.setData(2, event.getWindow().getScaledHeight() - 96, display.getEnergyStorage(), true, true); energyDisplay.setData(2, event.getWindow().getGuiScaledHeight() - 96, display.getEnergyStorage(), true, true);
GlStateManager.pushMatrix(); GlStateManager._pushMatrix();
GlStateManager.color4f(1F, 1F, 1F, 1F); GlStateManager._color4f(1F, 1F, 1F, 1F);
energyDisplay.draw(); energyDisplay.draw();
GlStateManager.popMatrix(); GlStateManager._popMatrix();
} }
} }
} }

View file

@ -61,10 +61,10 @@ public class CommonEvents {
if (item != null && item.isAlive()) { if (item != null && item.isAlive()) {
ItemStack stack = item.getItem(); ItemStack stack = item.getItem();
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
for (int i = 0; i < player.inventory.getSizeInventory(); i++) { for (int i = 0; i < player.inventory.getContainerSize(); i++) {
if (i != player.inventory.currentItem) { if (i != player.inventory.selected) {
ItemStack invStack = player.inventory.getStackInSlot(i); ItemStack invStack = player.inventory.getItem(i);
if (StackUtil.isValid(invStack) && invStack.getItem() instanceof ItemBag && invStack.hasTag()) { if (StackUtil.isValid(invStack) && invStack.getItem() instanceof ItemBag && invStack.hasTag()) {
if (invStack.getOrCreateTag().getBoolean("AutoInsert")) { if (invStack.getOrCreateTag().getBoolean("AutoInsert")) {
boolean changed = false; boolean changed = false;
@ -139,11 +139,11 @@ public class CommonEvents {
@SubscribeEvent @SubscribeEvent
public void onEntityDropEvent(LivingDropsEvent event) { public void onEntityDropEvent(LivingDropsEvent event) {
if (event.getEntityLiving().world != null && !event.getEntityLiving().world.isRemote && event.getSource().getTrueSource() instanceof PlayerEntity) { if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && event.getSource().getEntity() instanceof PlayerEntity) {
//Drop Cobwebs from Spiders //Drop Cobwebs from Spiders
if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof SpiderEntity) { if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof SpiderEntity) {
if (event.getEntityLiving().world.rand.nextInt(20) <= event.getLootingLevel() * 2) { if (event.getEntityLiving().level.random.nextInt(20) <= event.getLootingLevel() * 2) {
event.getDrops().add(new ItemEntity(event.getEntityLiving().world, event.getEntityLiving().getPosX(), event.getEntityLiving().getPosY(), event.getEntityLiving().getPosZ(), new ItemStack(Blocks.COBWEB, event.getEntityLiving().world.rand.nextInt(2 + event.getLootingLevel()) + 1))); event.getDrops().add(new ItemEntity(event.getEntityLiving().level, event.getEntityLiving().getX(), event.getEntityLiving().getY(), event.getEntityLiving().getZ(), new ItemStack(Blocks.COBWEB, event.getEntityLiving().level.random.nextInt(2 + event.getLootingLevel()) + 1)));
} }
} }
} }
@ -151,10 +151,10 @@ public class CommonEvents {
@SubscribeEvent @SubscribeEvent
public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event) { public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event) {
if (!event.getPlayer().world.isRemote && event.getPlayer() instanceof ServerPlayerEntity) { if (!event.getPlayer().level.isClientSide && event.getPlayer() instanceof ServerPlayerEntity) {
ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer(); ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer();
PacketHandlerHelper.syncPlayerData(player, true); PacketHandlerHelper.syncPlayerData(player, true);
ActuallyAdditions.LOGGER.info("Sending Player Data to player " + player.getName() + " with UUID " + player.getUniqueID() + "."); ActuallyAdditions.LOGGER.info("Sending Player Data to player " + player.getName() + " with UUID " + player.getUUID() + ".");
} }
} }
@ -163,18 +163,18 @@ public class CommonEvents {
//checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING); //checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING);
if (ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()) { if (ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()) {
if (!event.getPlayer().world.isRemote && StackUtil.isValid(event.getCrafting()) && event.getCrafting().getItem() != ActuallyItems.ITEM_BOOKLET.get()) { if (!event.getPlayer().level.isClientSide && StackUtil.isValid(event.getCrafting()) && event.getCrafting().getItem() != ActuallyItems.ITEM_BOOKLET.get()) {
String name = event.getCrafting().getItem().getRegistryName().toString(); String name = event.getCrafting().getItem().getRegistryName().toString();
if (name != null && name.toLowerCase(Locale.ROOT).contains(ActuallyAdditions.MODID)) { if (name != null && name.toLowerCase(Locale.ROOT).contains(ActuallyAdditions.MODID)) {
PlayerData.PlayerSave save = PlayerData.getDataFromPlayer(event.getPlayer()); PlayerData.PlayerSave save = PlayerData.getDataFromPlayer(event.getPlayer());
if (save != null && !save.bookGottenAlready) { if (save != null && !save.bookGottenAlready) {
save.bookGottenAlready = true; save.bookGottenAlready = true;
WorldData.get(event.getPlayer().getEntityWorld()).markDirty(); WorldData.get(event.getPlayer().getCommandSenderWorld()).setDirty();
ItemEntity entityItem = new ItemEntity(event.getPlayer().world, event.getPlayer().getPosX(), event.getPlayer().getPosY(), event.getPlayer().getPosZ(), new ItemStack(ActuallyItems.ITEM_BOOKLET.get())); ItemEntity entityItem = new ItemEntity(event.getPlayer().level, event.getPlayer().getX(), event.getPlayer().getY(), event.getPlayer().getZ(), new ItemStack(ActuallyItems.ITEM_BOOKLET.get()));
entityItem.setPickupDelay(0); entityItem.setPickUpDelay(0);
event.getPlayer().world.addEntity(entityItem); event.getPlayer().level.addFreshEntity(entityItem);
} }
} }
} }

View file

@ -52,7 +52,7 @@ public class ContainerBag extends Container implements IButtonReactor {
private final ItemStack sack; private final ItemStack sack;
public static ContainerBag fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { public static ContainerBag fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerBag(windowId, inv, data.readItemStack(), data.readBoolean()); return new ContainerBag(windowId, inv, data.readItem(), data.readBoolean());
} }
public ContainerBag(int windowId, PlayerInventory inventory, ItemStack sack, boolean isVoid) { public ContainerBag(int windowId, PlayerInventory inventory, ItemStack sack, boolean isVoid) {
@ -70,7 +70,7 @@ public class ContainerBag extends Container implements IButtonReactor {
if (this.isVoid) { if (this.isVoid) {
this.addSlot(new SlotDeletion(this.bagInventory, 0, 64, 65) { this.addSlot(new SlotDeletion(this.bagInventory, 0, 64, 65) {
@Override @Override
public boolean isItemValid(ItemStack stack) { public boolean mayPlace(ItemStack stack) {
return ContainerBag.this.filter.check(stack); return ContainerBag.this.filter.check(stack);
} }
}); });
@ -79,7 +79,7 @@ public class ContainerBag extends Container implements IButtonReactor {
for (int j = 0; j < 7; j++) { for (int j = 0; j < 7; j++) {
this.addSlot(new SlotItemHandlerUnconditioned(this.bagInventory, j + i * 7, 10 + j * 18, 10 + i * 18) { this.addSlot(new SlotItemHandlerUnconditioned(this.bagInventory, j + i * 7, 10 + j * 18, 10 + i * 18) {
@Override @Override
public boolean isItemValid(ItemStack stack) { public boolean mayPlace(ItemStack stack) {
return !isBlacklisted(stack) && ContainerBag.this.filter.check(stack); return !isBlacklisted(stack) && ContainerBag.this.filter.check(stack);
} }
}); });
@ -93,16 +93,16 @@ public class ContainerBag extends Container implements IButtonReactor {
} }
} }
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
if (i == inventory.currentItem) { if (i == inventory.selected) {
this.addSlot(new SlotImmovable(inventory, i, 8 + i * 18, 152)); this.addSlot(new SlotImmovable(inventory, i, 8 + i * 18, 152));
} else { } else {
this.addSlot(new Slot(inventory, i, 8 + i * 18, 152)); this.addSlot(new Slot(inventory, i, 8 + i * 18, 152));
} }
} }
ItemStack stack = inventory.getCurrentItem(); ItemStack stack = inventory.getSelected();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) { if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getCurrentItem()); ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getSelected());
if (stack.hasTag()) { if (stack.hasTag()) {
CompoundNBT compound = stack.getOrCreateTag(); CompoundNBT compound = stack.getOrCreateTag();
this.filter.readFromNBT(compound, "Filter"); this.filter.readFromNBT(compound, "Filter");
@ -118,25 +118,25 @@ public class ContainerBag extends Container implements IButtonReactor {
} }
@Override @Override
public void detectAndSendChanges() { public void broadcastChanges() {
super.detectAndSendChanges(); super.broadcastChanges();
if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) { if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) {
for (IContainerListener listener : this.listeners) { for (IContainerListener listener : this.containerListeners) {
listener.sendWindowProperty(this, 0, this.filter.isWhitelist listener.setContainerData(this, 0, this.filter.isWhitelist
? 1 ? 1
: 0); : 0);
listener.sendWindowProperty(this, 1, this.filter.respectMeta listener.setContainerData(this, 1, this.filter.respectMeta
? 1 ? 1
: 0); : 0);
listener.sendWindowProperty(this, 2, this.filter.respectNBT listener.setContainerData(this, 2, this.filter.respectNBT
? 1 ? 1
: 0); : 0);
listener.sendWindowProperty(this, 3, this.filter.respectOredict); listener.setContainerData(this, 3, this.filter.respectOredict);
listener.sendWindowProperty(this, 4, this.autoInsert listener.setContainerData(this, 4, this.autoInsert
? 1 ? 1
: 0); : 0);
listener.sendWindowProperty(this, 5, this.filter.respectMod listener.setContainerData(this, 5, this.filter.respectMod
? 1 ? 1
: 0); : 0);
} }
@ -147,7 +147,7 @@ public class ContainerBag extends Container implements IButtonReactor {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void updateProgressBar(int id, int data) { public void setData(int id, int data) {
if (id == 0) { if (id == 0) {
this.filter.isWhitelist = data == 1; this.filter.isWhitelist = data == 1;
} else if (id == 1) { } else if (id == 1) {
@ -164,40 +164,40 @@ public class ContainerBag extends Container implements IButtonReactor {
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = this.bagInventory.getSlots() + 4; int inventoryStart = this.bagInventory.getSlots() + 4;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.slots.get(slot);
if (theSlot != null && theSlot.getHasStack()) { if (theSlot != null && theSlot.hasItem()) {
ItemStack newStack = theSlot.getStack(); ItemStack newStack = theSlot.getItem();
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (this.isVoid || !this.filter.check(newStack) || !this.mergeItemStack(newStack, 4, 32, false)) { if (this.isVoid || !this.filter.check(newStack) || !this.moveItemStackTo(newStack, 4, 32, false)) {
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.moveItemStackTo(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }
// //
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { } else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.set(StackUtil.getEmpty());
} else { } else {
theSlot.onSlotChanged(); theSlot.setChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { if (newStack.getCount() == currentStack.getCount()) {
@ -211,31 +211,31 @@ public class ContainerBag extends Container implements IButtonReactor {
} }
@Override @Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) {
if (SlotFilter.checkFilter(this, slotId, player)) { if (SlotFilter.checkFilter(this, slotId, player)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.currentItem) { } else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.selected) {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} else { } else {
return super.slotClick(slotId, dragType, clickTypeIn, player); return super.clicked(slotId, dragType, clickTypeIn, player);
} }
} }
@Override @Override
public void onContainerClosed(PlayerEntity player) { public void removed(PlayerEntity player) {
ItemStack stack = this.inventory.getCurrentItem(); ItemStack stack = this.inventory.getSelected();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) { if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getCurrentItem()); ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getSelected());
CompoundNBT compound = stack.getOrCreateTag(); CompoundNBT compound = stack.getOrCreateTag();
this.filter.writeToNBT(compound, "Filter"); this.filter.writeToNBT(compound, "Filter");
compound.putBoolean("AutoInsert", this.autoInsert); compound.putBoolean("AutoInsert", this.autoInsert);
} }
super.onContainerClosed(player); super.removed(player);
} }
@Override @Override
public boolean canInteractWith(PlayerEntity player) { public boolean stillValid(PlayerEntity player) {
return !this.sack.isEmpty() && player.getHeldItemMainhand() == this.sack; return !this.sack.isEmpty() && player.getMainHandItem() == this.sack;
} }
@Override @Override

View file

@ -26,7 +26,7 @@ public class ContainerBioReactor extends Container {
public final TileEntityBioReactor tile; public final TileEntityBioReactor tile;
public static ContainerBioReactor fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { public static ContainerBioReactor fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.world.getTileEntity(data.readBlockPos()))); return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
} }
public ContainerBioReactor(int windowId, PlayerInventory inventory, TileEntityBioReactor tile) { public ContainerBioReactor(int windowId, PlayerInventory inventory, TileEntityBioReactor tile) {
@ -51,43 +51,43 @@ public class ContainerBioReactor extends Container {
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 8; int inventoryStart = 8;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.slots.get(slot);
if (theSlot != null && theSlot.getHasStack()) { if (theSlot != null && theSlot.hasItem()) {
ItemStack newStack = theSlot.getStack(); ItemStack newStack = theSlot.getItem();
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (TileEntityBioReactor.isValidItem(newStack)) { if (TileEntityBioReactor.isValidItem(newStack)) {
if (!this.mergeItemStack(newStack, 0, 8, false)) { if (!this.moveItemStackTo(newStack, 0, 8, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.moveItemStackTo(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { } else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.set(StackUtil.getEmpty());
} else { } else {
theSlot.onSlotChanged(); theSlot.setChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { if (newStack.getCount() == currentStack.getCount()) {
@ -101,7 +101,7 @@ public class ContainerBioReactor extends Container {
} }
@Override @Override
public boolean canInteractWith(PlayerEntity player) { public boolean stillValid(PlayerEntity player) {
return this.tile.canPlayerUse(player); return this.tile.canPlayerUse(player);
} }
} }

View file

@ -27,7 +27,7 @@ public class ContainerBreaker extends Container {
public final TileEntityBreaker breaker; public final TileEntityBreaker breaker;
public static ContainerBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { public static ContainerBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerBreaker(windowId, inv, (TileEntityBreaker) Objects.requireNonNull(inv.player.world.getTileEntity(data.readBlockPos()))); return new ContainerBreaker(windowId, inv, (TileEntityBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
} }
public ContainerBreaker(int windowId, PlayerInventory inventory, TileEntityBreaker tile) { public ContainerBreaker(int windowId, PlayerInventory inventory, TileEntityBreaker tile) {
@ -52,39 +52,39 @@ public class ContainerBreaker extends Container {
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 9; int inventoryStart = 9;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.slots.get(slot);
if (theSlot != null && theSlot.getHasStack()) { if (theSlot != null && theSlot.hasItem()) {
ItemStack newStack = theSlot.getStack(); ItemStack newStack = theSlot.getItem();
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.moveItemStackTo(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.moveItemStackTo(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { } else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.set(StackUtil.getEmpty());
} else { } else {
theSlot.onSlotChanged(); theSlot.setChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { if (newStack.getCount() == currentStack.getCount()) {
@ -98,7 +98,7 @@ public class ContainerBreaker extends Container {
} }
@Override @Override
public boolean canInteractWith(PlayerEntity player) { public boolean stillValid(PlayerEntity player) {
return this.breaker.canPlayerUse(player); return this.breaker.canPlayerUse(player);
} }
} }

View file

@ -28,7 +28,7 @@ public class ContainerCanolaPress extends Container {
public final TileEntityCanolaPress press; public final TileEntityCanolaPress press;
public static ContainerCanolaPress fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { public static ContainerCanolaPress fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerCanolaPress(windowId, inv, (TileEntityCanolaPress) Objects.requireNonNull(inv.player.world.getTileEntity(data.readBlockPos()))); return new ContainerCanolaPress(windowId, inv, (TileEntityCanolaPress) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
} }
public ContainerCanolaPress(int windowId, PlayerInventory inventory, TileEntityCanolaPress tile) { public ContainerCanolaPress(int windowId, PlayerInventory inventory, TileEntityCanolaPress tile) {
@ -48,43 +48,43 @@ public class ContainerCanolaPress extends Container {
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 1; int inventoryStart = 1;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.slots.get(slot);
if (theSlot != null && theSlot.getHasStack()) { if (theSlot != null && theSlot.hasItem()) {
ItemStack newStack = theSlot.getStack(); ItemStack newStack = theSlot.getItem();
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (newStack.getItem() == ActuallyItems.CANOLA.get()) { if (newStack.getItem() == ActuallyItems.CANOLA.get()) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { if (!this.moveItemStackTo(newStack, 0, 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.moveItemStackTo(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { } else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.set(StackUtil.getEmpty());
} else { } else {
theSlot.onSlotChanged(); theSlot.setChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { if (newStack.getCount() == currentStack.getCount()) {
@ -98,7 +98,7 @@ public class ContainerCanolaPress extends Container {
} }
@Override @Override
public boolean canInteractWith(PlayerEntity player) { public boolean stillValid(PlayerEntity player) {
return this.press.canPlayerUse(player); return this.press.canPlayerUse(player);
} }
} }

View file

@ -28,7 +28,7 @@ public class ContainerCoalGenerator extends Container {
public final TileEntityCoalGenerator generator; public final TileEntityCoalGenerator generator;
public static ContainerCoalGenerator fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { public static ContainerCoalGenerator fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerCoalGenerator(windowId, inv, (TileEntityCoalGenerator) Objects.requireNonNull(inv.player.world.getTileEntity(data.readBlockPos()))); return new ContainerCoalGenerator(windowId, inv, (TileEntityCoalGenerator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos())));
} }
public ContainerCoalGenerator(int windowId, PlayerInventory inventory, TileEntityCoalGenerator tile) { public ContainerCoalGenerator(int windowId, PlayerInventory inventory, TileEntityCoalGenerator tile) {
@ -48,43 +48,43 @@ public class ContainerCoalGenerator extends Container {
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack quickMoveStack(PlayerEntity player, int slot) {
int inventoryStart = 1; int inventoryStart = 1;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.slots.get(slot);
if (theSlot != null && theSlot.getHasStack()) { if (theSlot != null && theSlot.hasItem()) {
ItemStack newStack = theSlot.getStack(); ItemStack newStack = theSlot.getItem();
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (ForgeHooks.getBurnTime(newStack) > 0) { if (ForgeHooks.getBurnTime(newStack) > 0) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { if (!this.moveItemStackTo(newStack, 0, 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.moveItemStackTo(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { } else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.set(StackUtil.getEmpty());
} else { } else {
theSlot.onSlotChanged(); theSlot.setChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { if (newStack.getCount() == currentStack.getCount()) {
@ -98,7 +98,7 @@ public class ContainerCoalGenerator extends Container {
} }
@Override @Override
public boolean canInteractWith(PlayerEntity player) { public boolean stillValid(PlayerEntity player) {
return this.generator.canPlayerUse(player); return this.generator.canPlayerUse(player);
} }
} }

Some files were not shown because too many files have changed in this diff Show more