mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-24 08:08:34 +01:00
feat: official mappings & updated to FG 5.1+
This commit is contained in:
parent
79e8791223
commit
518ee0b4c1
287 changed files with 2679 additions and 2562 deletions
17
build.gradle
17
build.gradle
|
@ -1,11 +1,10 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = 'https://maven.minecraftforge.net' }
|
||||
mavenCentral()
|
||||
}
|
||||
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')
|
||||
}
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
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.
|
||||
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
@ -57,7 +56,8 @@ minecraft {
|
|||
workingDirectory project.file('run')
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
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 {
|
||||
actuallyadditions {
|
||||
source sourceSets.main
|
||||
|
@ -67,9 +67,10 @@ minecraft {
|
|||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
// JEI
|
||||
name = "Progwml6 maven"
|
||||
url = "https://dvs1.progwml6.com/files/maven/"
|
||||
}
|
||||
|
@ -102,7 +103,7 @@ processResources {
|
|||
jar {
|
||||
group = 'artifact'
|
||||
manifest {
|
||||
attributes(["Specification-Title" : "BuildingGadgets",
|
||||
attributes(["Specification-Title" : "Actually Additions",
|
||||
"Specification-Version" : "1",
|
||||
"Implementation-Title" : project.archivesBaseName,
|
||||
"Implementation-Version" : project.version,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
mod_version=1.1.52
|
||||
# Forge
|
||||
game_version=1.16.5
|
||||
forge_version=36.0.43
|
||||
mcp_mappings=20201028-1.16.3
|
||||
forge_version=36.2.2
|
||||
|
||||
# Other mods
|
||||
jei_version=1.16.4:7.6.1.71
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
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
|
||||
: outputTwo, outputTwoChance));
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ public final class ActuallyTags {
|
|||
public static final ITag.INamedTag<Item> TINY_COALS = tag("tiny_coals");
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CoffeeIngredient {
|
|||
|
||||
@Deprecated
|
||||
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) {
|
||||
|
|
|
@ -24,8 +24,8 @@ public class ColorLensChangerByDyeMeta implements IColorLensChanger {
|
|||
@Override
|
||||
public ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
||||
ItemStack newStack = stack.copy();
|
||||
int meta = newStack.getDamage();
|
||||
newStack.setDamage((meta + 1) % 16);
|
||||
int meta = newStack.getDamageValue();
|
||||
newStack.setDamageValue((meta + 1) % 16);
|
||||
return newStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class CrusherRecipe {
|
|||
|
||||
@Deprecated
|
||||
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) {
|
||||
|
|
|
@ -32,7 +32,7 @@ public class EmpowererRecipe {
|
|||
|
||||
@Deprecated
|
||||
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) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public class LensConversionRecipe {
|
|||
|
||||
@Deprecated
|
||||
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) {
|
||||
|
|
|
@ -21,68 +21,68 @@ public class BlockRecipeGenerator extends RecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes(Consumer<IFinishedRecipe> consumer) {
|
||||
protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
|
||||
//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
|
||||
Recipe.shaped(ActuallyBlocks.FARMER.get())
|
||||
.pattern("ISI", "SCS", "ISI")
|
||||
.key('I', ActuallyBlocks.CRYSTAL_ENORI.get())
|
||||
.key('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.key('S', Tags.Items.SEEDS)
|
||||
.build(consumer);
|
||||
.define('I', ActuallyBlocks.CRYSTAL_ENORI.get())
|
||||
.define('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.define('S', Tags.Items.SEEDS)
|
||||
.save(consumer);
|
||||
|
||||
//Empowerer
|
||||
Recipe.shaped(ActuallyBlocks.EMPOWERER.get())
|
||||
.pattern(" R ", " B ", "CDC")
|
||||
.key('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
||||
.key('B', ActuallyItems.BATTERY_DOUBLE.get())
|
||||
.key('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.key('D', ActuallyBlocks.DISPLAY_STAND.get())
|
||||
.build(consumer);
|
||||
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
||||
.define('B', ActuallyItems.BATTERY_DOUBLE.get())
|
||||
.define('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.define('D', ActuallyBlocks.DISPLAY_STAND.get())
|
||||
.save(consumer);
|
||||
|
||||
//Tiny Torch
|
||||
Recipe.shaped(ActuallyBlocks.TINY_TORCH.get(), 2)
|
||||
.pattern("C", "S")
|
||||
.key('C', ActuallyTags.Items.TINY_COALS)
|
||||
.key('S', Tags.Items.RODS_WOODEN)
|
||||
.build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
|
||||
.define('C', ActuallyTags.Items.TINY_COALS)
|
||||
.define('S', Tags.Items.RODS_WOODEN)
|
||||
.save(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_torch"));
|
||||
|
||||
//Fireworks Box
|
||||
Recipe.shaped(ActuallyBlocks.FIREWORK_BOX.get())
|
||||
.pattern("GFG", "SAS", "CCC")
|
||||
.key('G', Tags.Items.GUNPOWDER)
|
||||
.key('S', Tags.Items.RODS_WOODEN)
|
||||
.key('A', ActuallyBlocks.IRON_CASING.get())
|
||||
.key('F', Items.FIREWORK_ROCKET)
|
||||
.key('C', ActuallyItems.ENORI_CRYSTAL.get())
|
||||
.build(consumer);
|
||||
.define('G', Tags.Items.GUNPOWDER)
|
||||
.define('S', Tags.Items.RODS_WOODEN)
|
||||
.define('A', ActuallyBlocks.IRON_CASING.get())
|
||||
.define('F', Items.FIREWORK_ROCKET)
|
||||
.define('C', ActuallyItems.ENORI_CRYSTAL.get())
|
||||
.save(consumer);
|
||||
|
||||
//Shock Suppressor
|
||||
Recipe.shaped(ActuallyBlocks.SHOCK_SUPPRESSOR.get())
|
||||
.pattern("OAO", "ACA", "OAO")
|
||||
.key('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
|
||||
.key('O', Tags.Items.OBSIDIAN)
|
||||
.key('C', ActuallyItems.COIL_ADVANCED.get())
|
||||
.build(consumer);
|
||||
.define('A', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
|
||||
.define('O', Tags.Items.OBSIDIAN)
|
||||
.define('C', ActuallyItems.COIL_ADVANCED.get())
|
||||
.save(consumer);
|
||||
|
||||
//Display Stand
|
||||
Recipe.shaped(ActuallyBlocks.DISPLAY_STAND.get())
|
||||
.pattern(" R ", "EEE", "GGG")
|
||||
.key('R', ActuallyItems.COIL_ADVANCED.get())
|
||||
.key('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
|
||||
.key('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
|
||||
.build(consumer);
|
||||
.define('R', ActuallyItems.COIL_ADVANCED.get())
|
||||
.define('E', ActuallyBlocks.ETHETIC_GREEN_BLOCK.get())
|
||||
.define('G', ActuallyBlocks.ETHETIC_WHITE_BLOCK.get())
|
||||
.save(consumer);
|
||||
|
||||
//Vertical Digger
|
||||
Recipe.shaped(ActuallyBlocks.MINER.get())
|
||||
.pattern("IRI", "RCR", "IDI")
|
||||
.key('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
|
||||
.key('I', ActuallyBlocks.IRON_CASING.get())
|
||||
.key('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
|
||||
.key('D', ActuallyItems.DRILL.get())
|
||||
.build(consumer);
|
||||
.define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
|
||||
.define('I', ActuallyBlocks.IRON_CASING.get())
|
||||
.define('C', ActuallyItems.VOID_EMPOWERED_CRYSTAL.get())
|
||||
.define('D', ActuallyItems.DRILL.get())
|
||||
.save(consumer);
|
||||
|
||||
//Black Quartz Wall
|
||||
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
|
||||
Recipe.shaped(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())
|
||||
.pattern("IRI", "RCR", "IRI")
|
||||
.key('R', Tags.Items.DUSTS_REDSTONE)
|
||||
.key('I', Tags.Items.INGOTS_IRON)
|
||||
.key('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.build(consumer);
|
||||
.define('R', Tags.Items.DUSTS_REDSTONE)
|
||||
.define('I', Tags.Items.INGOTS_IRON)
|
||||
.define('C', ActuallyBlocks.IRON_CASING.get())
|
||||
.save(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
|
||||
protected void saveAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
|
||||
//Nope...
|
||||
}
|
||||
|
||||
|
@ -161,15 +161,15 @@ public class BlockRecipeGenerator extends RecipeProvider {
|
|||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").build(consumer);
|
||||
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").save(consumer);
|
||||
}
|
||||
|
||||
private static class Shapeless extends ShapelessRecipeBuilder {
|
||||
|
@ -182,20 +182,20 @@ public class BlockRecipeGenerator extends RecipeProvider {
|
|||
}
|
||||
|
||||
public Shapeless ingredients(IItemProvider... ingredients) {
|
||||
Arrays.asList(ingredients).forEach(this::addIngredient);
|
||||
Arrays.asList(ingredients).forEach(this::requires);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Consumer<IFinishedRecipe> consumer) {
|
||||
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.build(consumer);
|
||||
public void save(Consumer<IFinishedRecipe> consumer) {
|
||||
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.save(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Consumer<IFinishedRecipe> consumer, ResourceLocation location) {
|
||||
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.build(consumer, location);
|
||||
public void save(Consumer<IFinishedRecipe> consumer, ResourceLocation location) {
|
||||
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.save(consumer, location);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,37 +209,37 @@ public class BlockRecipeGenerator extends RecipeProvider {
|
|||
}
|
||||
|
||||
public Shaped pattern(String line1, String line2, String line3) {
|
||||
this.patternLine(line1);
|
||||
this.patternLine(line2);
|
||||
this.patternLine(line3);
|
||||
this.pattern(line1);
|
||||
this.pattern(line2);
|
||||
this.pattern(line3);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Shaped pattern(String line1, String line2) {
|
||||
this.patternLine(line1);
|
||||
this.patternLine(line2);
|
||||
this.pattern(line1);
|
||||
this.pattern(line2);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Shaped patternSingleKey(char key, IItemProvider resource, String... lines) {
|
||||
this.key(key, resource);
|
||||
this.define(key, resource);
|
||||
for (String line : lines) {
|
||||
this.patternLine(line);
|
||||
this.pattern(line);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Consumer<IFinishedRecipe> consumerIn) {
|
||||
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.build(consumerIn);
|
||||
public void save(Consumer<IFinishedRecipe> consumerIn) {
|
||||
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.save(consumerIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Consumer<IFinishedRecipe> consumerIn, ResourceLocation id) {
|
||||
this.addCriterion("has_book", hasItem(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.build(consumerIn, id);
|
||||
public void save(Consumer<IFinishedRecipe> consumerIn, ResourceLocation id) {
|
||||
this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get()));
|
||||
super.save(consumerIn, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BlockTagsGenerator extends BlockTagsProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerTags() {
|
||||
public void addTags() {
|
||||
// getOrCreateBuilder(BlockTags.WALLS).add(
|
||||
// ActuallyBlocks.WHITE_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.
|
||||
*/
|
||||
@Override
|
||||
protected Path makePath(ResourceLocation id) {
|
||||
protected Path getPath(ResourceLocation id) {
|
||||
return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json");
|
||||
}
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@ public class ItemRecipeGenerator extends RecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes(Consumer<IFinishedRecipe> consumer) {
|
||||
super.registerRecipes(consumer);
|
||||
protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
|
||||
super.buildShapelessRecipes(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveRecipeAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
|
||||
protected void saveAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) {
|
||||
//Nope...
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ public class ItemTagsGenerator extends ItemTagsProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void registerTags() {
|
||||
this.getOrCreateBuilder(ActuallyTags.Items.COFFEE_BEANS)
|
||||
protected void addTags() {
|
||||
this.tag(ActuallyTags.Items.COFFEE_BEANS)
|
||||
.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_CHARCOAL.get());
|
||||
// getOrCreateBuilder(ActuallyTags.Items.DRILLS).add(
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ActuallyAdditions {
|
|||
|
||||
public static final ItemGroup GROUP = new ItemGroup(MODID) {
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
public ItemStack makeIcon() {
|
||||
return new ItemStack(ActuallyItems.ITEM_BOOKLET.get());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -30,32 +30,32 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
|||
public class ActuallyAdditionsClient {
|
||||
|
||||
public static void setup() {
|
||||
ScreenManager.registerFactory(ActuallyContainers.BAG_CONTAINER.get(), GuiBag::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.GRINDER_CONTAINER.get(), GuiGrinder::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.INPUTTER_CONTAINER.get(), GuiInputter::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new);
|
||||
ScreenManager.registerFactory(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new);
|
||||
ScreenManager.register(ActuallyContainers.BAG_CONTAINER.get(), GuiBag::new);
|
||||
ScreenManager.register(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new);
|
||||
ScreenManager.register(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new);
|
||||
ScreenManager.register(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new);
|
||||
ScreenManager.register(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new);
|
||||
ScreenManager.register(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new);
|
||||
ScreenManager.register(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new);
|
||||
ScreenManager.register(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new);
|
||||
ScreenManager.register(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new);
|
||||
ScreenManager.register(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new);
|
||||
ScreenManager.register(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new);
|
||||
ScreenManager.register(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new);
|
||||
ScreenManager.register(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new);
|
||||
ScreenManager.register(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new);
|
||||
ScreenManager.register(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new);
|
||||
ScreenManager.register(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new);
|
||||
ScreenManager.register(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new);
|
||||
ScreenManager.register(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new);
|
||||
ScreenManager.register(ActuallyContainers.GRINDER_CONTAINER.get(), GuiGrinder::new);
|
||||
ScreenManager.register(ActuallyContainers.INPUTTER_CONTAINER.get(), GuiInputter::new);
|
||||
ScreenManager.register(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new);
|
||||
ScreenManager.register(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new);
|
||||
ScreenManager.register(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new);
|
||||
ScreenManager.register(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new);
|
||||
ScreenManager.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new);
|
||||
ScreenManager.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new);
|
||||
// From old proxy
|
||||
InitEntities.initClient();
|
||||
MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
||||
|
@ -85,7 +85,7 @@ public class ActuallyAdditionsClient {
|
|||
public void sendBreakPacket(BlockPos pos) {
|
||||
ClientPlayNetHandler connection = Minecraft.getInstance().getConnection();
|
||||
assert connection != null;
|
||||
assert Minecraft.getInstance().objectMouseOver != null;
|
||||
connection.sendPacket(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().objectMouseOver).getFace()));
|
||||
assert Minecraft.getInstance().hitResult != null;
|
||||
connection.send(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().hitResult).getDirection()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.registries.ForgeRegistries;
|
|||
public final class ActuallyBlocks {
|
||||
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
|
||||
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));
|
||||
|
@ -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> 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_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_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_GREEN_SLAB = BLOCKS.register("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.from(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_GREEN_WALL = BLOCKS.register("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.from(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_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().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.copy(ETHETIC_GREEN_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.copy(ETHETIC_GREEN_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_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_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> BLACK_QUARTZ_WALL = BLOCKS.register("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.from(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_STAIR = BLOCKS.register("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().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().getDefaultState(), AbstractBlock.Properties.from(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> CHISELED_BLACK_QUARTZ_SLAB = BLOCKS.register("chiseled_black_quartz_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.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.copy(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().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().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().defaultBlockState(), AbstractBlock.Properties.copy(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.copy(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) {
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,13 +55,13 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getItemInHand(hand);
|
||||
if (this.tryToggleRedstone(world, pos, player)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getTileEntity(pos);
|
||||
if (!world.isClientSide) {
|
||||
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getBlockEntity(pos);
|
||||
if (reconstructor != null) {
|
||||
if (StackUtil.isValid(heldItem)) {
|
||||
Item item = heldItem.getItem();
|
||||
|
@ -69,17 +69,17 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
|
|||
ItemStack toPut = heldItem.copy();
|
||||
toPut.setCount(1);
|
||||
reconstructor.inv.setStackInSlot(0, toPut);
|
||||
player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
player.inventory.removeItem(player.inventory.selected, 1);
|
||||
}
|
||||
//Shush, don't tell anyone!
|
||||
else if (ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.MUSIC_DISC_11) {
|
||||
reconstructor.counter++;
|
||||
reconstructor.markDirty();
|
||||
reconstructor.setChanged();
|
||||
}
|
||||
} else {
|
||||
ItemStack slot = reconstructor.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(slot)) {
|
||||
player.setHeldItem(hand, slot.copy());
|
||||
player.setItemInHand(hand, slot.copy());
|
||||
reconstructor.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityAtomicReconstructor();
|
||||
}
|
||||
|
||||
|
@ -101,22 +101,22 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
|
|||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
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;
|
||||
}
|
||||
|
||||
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
|
||||
TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
|
||||
if (tile instanceof TileEntityAtomicReconstructor) {
|
||||
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
|
||||
ITextComponent strg;
|
||||
if (!StackUtil.isValid(slot)) {
|
||||
strg = Lang.trans("info", "nolens");
|
||||
} 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
|
||||
public boolean hasComparatorInputOverride(BlockState state) {
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(BlockState blockState, World world, BlockPos pos) {
|
||||
TileEntity t = world.getTileEntity(pos);
|
||||
public int getAnalogOutputSignal(BlockState blockState, World world, BlockPos pos) {
|
||||
TileEntity t = world.getBlockEntity(pos);
|
||||
int i = 0;
|
||||
if (t instanceof TileEntityAtomicReconstructor) {
|
||||
i = ((TileEntityAtomicReconstructor) t).getEnergy();
|
||||
|
|
|
@ -40,27 +40,27 @@ public class BlockBatteryBox extends BlockContainerBase {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityBatteryBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBatteryBox) {
|
||||
TileEntityBatteryBox box = (TileEntityBatteryBox) tile;
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) {
|
||||
box.inv.setStackInSlot(0, stack.copy());
|
||||
player.setHeldItem(hand, StackUtil.getEmpty());
|
||||
player.setItemInHand(hand, StackUtil.getEmpty());
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
} else {
|
||||
ItemStack inSlot = box.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(inSlot)) {
|
||||
player.setHeldItem(hand, inSlot.copy());
|
||||
player.setItemInHand(hand, inSlot.copy());
|
||||
box.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
|
|
@ -29,12 +29,12 @@ public class BlockBioReactor extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityBioReactor();
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,14 +36,14 @@ public class BlockBreaker extends FullyDirectionalBlock.Container {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||
public TileEntity newBlockEntity(IBlockReader world) {
|
||||
return this.isPlacer
|
||||
? new TileEntityPlacer()
|
||||
: new TileEntityBreaker();
|
||||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
|
|
@ -41,14 +41,14 @@ public class BlockCanolaPress extends BlockContainerBase {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||
public TileEntity newBlockEntity(IBlockReader world) {
|
||||
return new TileEntityCanolaPress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityCanolaPress tile = (TileEntityCanolaPress) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isClientSide) {
|
||||
TileEntityCanolaPress tile = (TileEntityCanolaPress) world.getBlockEntity(pos);
|
||||
if (tile != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
|
||||
|
@ -56,7 +56,7 @@ public class BlockCanolaPress extends BlockContainerBase {
|
|||
}
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
return super.use(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,17 +30,17 @@ import java.util.Random;
|
|||
|
||||
public class BlockCoalGenerator extends DirectionalBlock.Container {
|
||||
public BlockCoalGenerator() {
|
||||
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||
super(ActuallyBlocks.defaultPickProps(0).randomTicks());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityCoalGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
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 (((TileEntityCoalGenerator) tile).currentBurnTime > 0) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
@ -51,13 +51,13 @@ public class BlockCoalGenerator extends DirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.CoalGeneratorShapes.EAST;
|
||||
case SOUTH:
|
||||
|
|
|
@ -34,9 +34,9 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isClientSide) {
|
||||
TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos);
|
||||
if (tile != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
|
||||
|
@ -44,18 +44,18 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
|
|||
}
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
return super.use(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityCoffeeMachine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.CoffeeMachineShapes.EAST;
|
||||
case SOUTH:
|
||||
|
|
|
@ -34,6 +34,8 @@ import net.minecraftforge.common.util.Constants;
|
|||
import java.util.HashMap;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockColoredLamp extends BlockBase {
|
||||
private static final HashMap<DyeColor, Supplier<Block>> COLOR_TO_LAMP = new HashMap<DyeColor, Supplier<Block>>() {{
|
||||
this.put(DyeColor.WHITE, ActuallyBlocks.LAMP_WHITE);
|
||||
|
@ -57,22 +59,22 @@ public class BlockColoredLamp extends BlockBase {
|
|||
private static final BooleanProperty LIT = BlockStateProperties.LIT;
|
||||
|
||||
public BlockColoredLamp() {
|
||||
super(Properties.create(Material.REDSTONE_LIGHT).hardnessAndResistance(0.5F, 3.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0));
|
||||
this.setDefaultState(this.stateContainer.getBaseState().with(LIT, false));
|
||||
super(Properties.of(Material.BUILDABLE_GLASS).strength(0.5F, 3.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(LIT);
|
||||
}
|
||||
|
||||
// TODO: [port][test] validate this rework works
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
//Turning On
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -83,19 +85,19 @@ public class BlockColoredLamp extends BlockBase {
|
|||
}
|
||||
|
||||
Block newColor = COLOR_TO_LAMP.get(color).get();
|
||||
if (!world.isRemote) {
|
||||
world.setBlockState(pos, newColor.getDefaultState().with(LIT, state.get(LIT)), 2);
|
||||
if (!world.isClientSide) {
|
||||
world.setBlock(pos, newColor.defaultBlockState().setValue(LIT, state.getValue(LIT)), 2);
|
||||
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
|
||||
public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) {
|
||||
return state.get(LIT)
|
||||
return state.getValue(LIT)
|
||||
? 15
|
||||
: 0;
|
||||
}
|
||||
|
|
|
@ -20,12 +20,14 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
|||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockCrystalCluster extends FullyDirectionalBlock {
|
||||
|
||||
private final 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.setLightOpacity(1);
|
||||
|
|
|
@ -31,12 +31,12 @@ public class BlockDirectionalBreaker extends FullyDirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityDirectionalBreaker();
|
||||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class BlockDirectionalBreaker extends FullyDirectionalBlock.Container {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case UP:
|
||||
return Shapes.DirectionalBlockBreakerShapes.SHAPE_U;
|
||||
case DOWN:
|
||||
|
|
|
@ -37,15 +37,15 @@ public class BlockDisplayStand extends BlockContainerBase {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityDisplayStand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if (!world.isRemote) {
|
||||
TileEntityDisplayStand stand = (TileEntityDisplayStand) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getItemInHand(hand);
|
||||
if (!world.isClientSide) {
|
||||
TileEntityDisplayStand stand = (TileEntityDisplayStand) world.getBlockEntity(pos);
|
||||
if (stand != null) {
|
||||
ItemStack display = stand.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(heldItem)) {
|
||||
|
@ -69,7 +69,7 @@ public class BlockDisplayStand extends BlockContainerBase {
|
|||
}
|
||||
} else {
|
||||
if (StackUtil.isValid(display)) {
|
||||
player.setHeldItem(hand, display.copy());
|
||||
player.setItemInHand(hand, display.copy());
|
||||
stand.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
|
|
@ -29,12 +29,12 @@ public class BlockDropper extends FullyDirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityDropper();
|
||||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
|
|
@ -36,15 +36,15 @@ public class BlockEmpowerer extends BlockContainerBase {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityEmpowerer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if (!world.isRemote) {
|
||||
TileEntityEmpowerer empowerer = (TileEntityEmpowerer) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack heldItem = player.getItemInHand(hand);
|
||||
if (!world.isClientSide) {
|
||||
TileEntityEmpowerer empowerer = (TileEntityEmpowerer) world.getBlockEntity(pos);
|
||||
if (empowerer != null) {
|
||||
ItemStack stackThere = empowerer.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(heldItem)) {
|
||||
|
@ -59,7 +59,7 @@ public class BlockEmpowerer extends BlockContainerBase {
|
|||
} else if (ItemUtil.canBeStacked(heldItem, stackThere)) {
|
||||
int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount());
|
||||
if (maxTransfer > 0) {
|
||||
player.setHeldItem(hand, StackUtil.grow(heldItem, maxTransfer));
|
||||
player.setItemInHand(hand, StackUtil.grow(heldItem, maxTransfer));
|
||||
ItemStack newStackThere = stackThere.copy();
|
||||
newStackThere = StackUtil.shrink(newStackThere, maxTransfer);
|
||||
empowerer.inv.setStackInSlot(0, newStackThere);
|
||||
|
@ -68,7 +68,7 @@ public class BlockEmpowerer extends BlockContainerBase {
|
|||
}
|
||||
} else {
|
||||
if (StackUtil.isValid(stackThere)) {
|
||||
player.setHeldItem(hand, stackThere.copy());
|
||||
player.setItemInHand(hand, stackThere.copy());
|
||||
empowerer.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
|
|
@ -34,14 +34,14 @@ public class BlockEnergizer extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return this.isEnergizer
|
||||
? new TileEntityEnergizer()
|
||||
: new TileEntityEnervator();
|
||||
}
|
||||
|
||||
@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) {
|
||||
return this.openGui(world, player, pos, TileEntityEnergizer.class);
|
||||
} else {
|
||||
|
|
|
@ -31,18 +31,18 @@ public class BlockFarmer extends DirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityFarmer();
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.FarmerShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -31,12 +31,12 @@ public class BlockFeeder extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityFeeder();
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,21 +29,23 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ToolType;
|
||||
import net.minecraftforge.fml.network.NetworkHooks;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockFermentingBarrel extends BlockContainerBase {
|
||||
|
||||
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
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityFermentingBarrel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityFermentingBarrel press = (TileEntityFermentingBarrel) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isClientSide) {
|
||||
TileEntityFermentingBarrel press = (TileEntityFermentingBarrel) world.getBlockEntity(pos);
|
||||
if (press != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, press.canolaTank) && !this.tryUseItemOnTank(player, hand, press.oilTank)) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, press, pos);
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BlockFireworkBox extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class BlockFireworkBox extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityFireworkBox();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,14 +34,14 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return this.isPlacer
|
||||
? new TileEntityFluidPlacer()
|
||||
: new TileEntityFluidCollector();
|
||||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case UP:
|
||||
return Shapes.FluidCollectorShapes.SHAPE_U;
|
||||
case DOWN:
|
||||
|
|
|
@ -38,21 +38,21 @@ import java.util.Random;
|
|||
public class BlockFurnaceDouble extends BlockContainerBase {
|
||||
public BlockFurnaceDouble() {
|
||||
// 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
|
||||
: 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
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityFurnaceDouble();
|
||||
}
|
||||
|
||||
@Override
|
||||
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++) {
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(LIT).add(HORIZONTAL_FACING);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class BlockFurnaceDouble extends BlockContainerBase {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(HORIZONTAL_FACING)) {
|
||||
switch (state.getValue(HORIZONTAL_FACING)) {
|
||||
case EAST:
|
||||
return Shapes.FurnaceDoubleShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.Random;
|
|||
|
||||
public class BlockGreenhouseGlass extends BlockBase {
|
||||
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
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
public BlockRenderType getRenderShape(BlockState state) {
|
||||
return BlockRenderType.INVISIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
|
||||
if (world.isRemote) {
|
||||
if (world.isClientSide) {
|
||||
return;
|
||||
}
|
||||
if (world.canBlockSeeSky(pos) && world.isDaytime()) {
|
||||
if (world.canSeeSkyFromBelowWater(pos) && world.isDay()) {
|
||||
Triple<BlockPos, BlockState, IGrowable> trip = this.firstBlock(world, pos);
|
||||
boolean once = false;
|
||||
if (trip != null) {
|
||||
|
@ -61,31 +61,31 @@ public class BlockGreenhouseGlass extends BlockBase {
|
|||
BlockState growState = i == 0
|
||||
? trip.getMiddle()
|
||||
: world.getBlockState(trip.getLeft());
|
||||
if (growState.getBlock() == trip.getRight() && trip.getRight().canGrow(world, trip.getLeft(), growState, false)) {
|
||||
trip.getRight().grow(world, rand, trip.getLeft(), growState);
|
||||
if (growState.getBlock() == trip.getRight() && trip.getRight().isValidBonemealTarget(world, trip.getLeft(), growState, false)) {
|
||||
trip.getRight().performBonemeal(world, rand, trip.getLeft(), growState);
|
||||
once = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (once) {
|
||||
world.playEvent(2005, trip.getMiddle().isOpaqueCube(world, trip.getLeft())
|
||||
? trip.getLeft().up()
|
||||
world.levelEvent(2005, trip.getMiddle().isSolidRender(world, trip.getLeft())
|
||||
? trip.getLeft().above()
|
||||
: trip.getLeft(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
|
||||
mut.set(mut.getX(), mut.getY() - 1, mut.getZ());
|
||||
if (mut.getY() < 0) {
|
||||
return null;
|
||||
}
|
||||
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) {
|
||||
return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
|
||||
return Triple.of(mut.immutable(), state, (IGrowable) state.getBlock());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -41,13 +41,13 @@ public class BlockGrinder extends BlockContainerBase {
|
|||
private final boolean isDouble;
|
||||
|
||||
public BlockGrinder(boolean isDouble) {
|
||||
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||
super(ActuallyBlocks.defaultPickProps(0).randomTicks());
|
||||
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
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return this.isDouble
|
||||
? new TileEntityGrinderDouble()
|
||||
: new TileEntityGrinder();
|
||||
|
@ -55,7 +55,7 @@ public class BlockGrinder extends BlockContainerBase {
|
|||
|
||||
@Override
|
||||
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++) {
|
||||
double xRand = rand.nextDouble() / 0.75D - 0.5D;
|
||||
double zRand = rand.nextDouble() / 0.75D - 0.5D;
|
||||
|
@ -66,7 +66,7 @@ public class BlockGrinder extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@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) {
|
||||
return this.openGui(world, player, pos, TileEntityGrinderDouble.class);
|
||||
}
|
||||
|
@ -76,24 +76,24 @@ public class BlockGrinder extends BlockContainerBase {
|
|||
|
||||
@Override
|
||||
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
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(LIT).add(HORIZONTAL_FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) {
|
||||
return state.get(LIT)
|
||||
return state.getValue(LIT)
|
||||
? 12
|
||||
: 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(HORIZONTAL_FACING)) {
|
||||
switch (state.getValue(HORIZONTAL_FACING)) {
|
||||
case EAST:
|
||||
return Shapes.GrinderShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -25,7 +25,7 @@ public class BlockHeatCollector extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityHeatCollector();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,19 +30,19 @@ public class BlockInputter extends BlockContainerBase {
|
|||
public final boolean isAdvanced;
|
||||
|
||||
public BlockInputter(boolean isAdvanced) {
|
||||
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||
super(ActuallyBlocks.defaultPickProps(0).randomTicks());
|
||||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return this.isAdvanced
|
||||
? new TileEntityInputterAdvanced()
|
||||
: new TileEntityInputter();
|
||||
}
|
||||
|
||||
@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) {
|
||||
return this.openGui(world, player, pos, TileEntityInputterAdvanced.class);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class BlockItemViewer extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityItemViewer();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class BlockItemViewerHopping extends BlockItemViewer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityItemViewerHopping();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,15 +37,15 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
|
|||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
private void updateLamp(World world, BlockPos pos) {
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
BlockState state = world.getBlockState(pos);
|
||||
BlockPos coords = pos.offset(WorldUtil.getDirectionByPistonRotation(state));
|
||||
this.updateLampsAtPos(world, coords, world.getRedstonePowerFromNeighbors(pos) > 0, new ArrayList<>());
|
||||
BlockPos coords = pos.relative(WorldUtil.getDirectionByPistonRotation(state));
|
||||
this.updateLampsAtPos(world, coords, world.getBestNeighborSignal(pos) > 0, new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,12 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
|
|||
BlockState state = world.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
if (block instanceof BlockColoredLamp) {
|
||||
if (state.get(BlockStateProperties.LIT) && !powered) {
|
||||
world.setBlockState(pos, state.with(BlockStateProperties.LIT, false));
|
||||
if (state.getValue(BlockStateProperties.LIT) && !powered) {
|
||||
world.setBlockAndUpdate(pos, state.setValue(BlockStateProperties.LIT, false));
|
||||
}
|
||||
|
||||
if (!state.get(BlockStateProperties.LIT) && powered) {
|
||||
world.setBlockState(pos, state.with(BlockStateProperties.LIT, true));
|
||||
if (!state.getValue(BlockStateProperties.LIT) && powered) {
|
||||
world.setBlockAndUpdate(pos, state.setValue(BlockStateProperties.LIT, true));
|
||||
}
|
||||
|
||||
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) {
|
||||
for (Direction side : Direction.values()) {
|
||||
BlockPos offset = pos.offset(side);
|
||||
BlockPos offset = pos.relative(side);
|
||||
if (!updatedAlready.contains(offset)) {
|
||||
updatedAlready.add(pos);
|
||||
this.updateLampsAtPos(world, offset, powered, updatedAlready);
|
||||
|
@ -77,7 +77,7 @@ public class BlockLampPowerer extends FullyDirectionalBlock {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.LampPowererShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -83,9 +83,9 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
// }
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityLaserRelay) {
|
||||
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
if (stack.getItem() instanceof ItemLaserWrench) {
|
||||
return ActionResultType.FAIL;
|
||||
} else if (stack.getItem() == ConfigValues.itemCompassConfigurator) {
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
relay.onCompassAction(player);
|
||||
|
||||
Network network = relay.getNetwork();
|
||||
|
@ -101,7 +101,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
network.changeAmount++;
|
||||
}
|
||||
|
||||
relay.markDirty();
|
||||
relay.setChanged();
|
||||
relay.sendUpdate();
|
||||
}
|
||||
|
||||
|
@ -109,9 +109,9 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
} else if (stack.getItem() instanceof ItemLaserRelayUpgrade) {
|
||||
ItemStack inRelay = relay.inv.getStackInSlot(0);
|
||||
if (!StackUtil.isValid(inRelay)) {
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
if (!player.isCreative()) {
|
||||
player.setHeldItem(hand, StackUtil.shrink(stack, 1));
|
||||
player.setItemInHand(hand, StackUtil.shrink(stack, 1));
|
||||
}
|
||||
|
||||
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();
|
||||
if (StackUtil.isValid(inRelay)) {
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
relay.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
|
||||
if (!player.inventory.addItemStackToInventory(inRelay)) {
|
||||
player.entityDropItem(inRelay, 0);
|
||||
if (!player.inventory.add(inRelay)) {
|
||||
player.spawnAtLocation(inRelay, 0);
|
||||
}
|
||||
}
|
||||
return ActionResultType.PASS;
|
||||
|
@ -146,7 +146,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||
public TileEntity newBlockEntity(IBlockReader world) {
|
||||
switch (this.type) {
|
||||
case ITEM:
|
||||
return new TileEntityLaserRelayItem();
|
||||
|
@ -170,27 +170,27 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
return;
|
||||
}
|
||||
|
||||
BlockPos pos = ((BlockRayTraceResult) rayCast).getPos();
|
||||
if (minecraft.world != null) {
|
||||
BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos();
|
||||
if (minecraft.level != null) {
|
||||
boolean wearing = ItemEngineerGoggles.isWearing(player);
|
||||
if (wearing || StackUtil.isValid(stack)) {
|
||||
boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator;
|
||||
if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) {
|
||||
TileEntity tile = minecraft.world.getTileEntity(pos);
|
||||
TileEntity tile = minecraft.level.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityLaserRelay) {
|
||||
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;
|
||||
|
||||
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;
|
||||
if (compass) {
|
||||
expl = relay.getCompassDisplayString();
|
||||
} 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
|
||||
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
super.onReplaced(state, world, pos, newState, isMoving);
|
||||
public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
super.onRemove(state, world, pos, newState, isMoving);
|
||||
|
||||
if (state != newState) {
|
||||
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world);
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityLavaFactoryController();
|
||||
}
|
||||
|
||||
|
@ -49,20 +49,20 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple
|
|||
return;
|
||||
}
|
||||
|
||||
TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
|
||||
TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
|
||||
if (factory != null) {
|
||||
int state = factory.isMultiblock();
|
||||
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) {
|
||||
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
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.LavaFactoryShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -22,20 +22,22 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
|||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockLeafGenerator extends DirectionalBlock.Container {
|
||||
|
||||
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
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityLeafGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.LeafGeneratorShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -33,18 +33,18 @@ import java.util.Random;
|
|||
public class BlockOilGenerator extends DirectionalBlock.Container {
|
||||
|
||||
public BlockOilGenerator() {
|
||||
super(ActuallyBlocks.defaultPickProps(0).tickRandomly());
|
||||
super(ActuallyBlocks.defaultPickProps(0).randomTicks());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityOilGenerator();
|
||||
}
|
||||
|
||||
// TODO: Move all of these over to the client version
|
||||
@Override
|
||||
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 (((TileEntityOilGenerator) tile).currentBurnTime > 0) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
@ -55,9 +55,9 @@ public class BlockOilGenerator extends DirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getTileEntity(pos);
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isClientSide) {
|
||||
TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getBlockEntity(pos);
|
||||
if (generator != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, generator.tank)) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, generator, pos);
|
||||
|
@ -70,7 +70,7 @@ public class BlockOilGenerator extends DirectionalBlock.Container {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case EAST:
|
||||
return Shapes.OilGeneratorShapes.SHAPE_E;
|
||||
case SOUTH:
|
||||
|
|
|
@ -52,14 +52,14 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower(BlockState state) {
|
||||
public boolean isSignalSource(BlockState state) {
|
||||
return this.type == Type.REDSTONEFACE;
|
||||
}
|
||||
|
||||
@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) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityPhantomRedstoneface) {
|
||||
return ((TileEntityPhantomRedstoneface) tile).providesWeak[side.ordinal()];
|
||||
}
|
||||
|
@ -68,9 +68,9 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
|||
}
|
||||
|
||||
@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) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityPhantomRedstoneface) {
|
||||
return ((TileEntityPhantomRedstoneface) tile).providesStrong[side.ordinal()];
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
switch (this.type) {
|
||||
case PLACER:
|
||||
return new TileEntityPhantomPlacer();
|
||||
|
@ -103,13 +103,13 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
|||
|
||||
// TODO: [port] validate this works
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (!world.isClientSide) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof IPhantomTile && ((IPhantomTile) tile).getGuiID() != -1) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos);
|
||||
}
|
||||
|
@ -125,27 +125,27 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
|||
if (!(rayCast instanceof BlockRayTraceResult)) {
|
||||
return;
|
||||
}
|
||||
BlockPos pos = ((BlockRayTraceResult) rayCast).getPos();
|
||||
TileEntity tile = minecraft.world.getTileEntity(pos);
|
||||
BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos();
|
||||
TileEntity tile = minecraft.level.getBlockEntity(pos);
|
||||
if (tile != null) {
|
||||
if (tile instanceof IPhantomTile) {
|
||||
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()) {
|
||||
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();
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
String name = item.getDisplayName(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);
|
||||
Item item = Item.byBlock(block);
|
||||
String name = item.getName(new ItemStack(block)).getString();
|
||||
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()) {
|
||||
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 {
|
||||
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 {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class BlockPhantomBooster extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||
public TileEntity newBlockEntity(IBlockReader world) {
|
||||
return new TileEntityPhantomBooster();
|
||||
}
|
||||
|
||||
|
|
|
@ -39,24 +39,24 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityPlayerInterface();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
public void setPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityPlayerInterface) {
|
||||
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
||||
if (face.connectedPlayer == null) {
|
||||
face.connectedPlayer = player.getUniqueID();
|
||||
face.connectedPlayer = player.getUUID();
|
||||
face.playerName = player.getName().getString();
|
||||
face.markDirty();
|
||||
face.setChanged();
|
||||
face.sendUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
super.setPlacedBy(world, pos, state, player, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,15 +66,15 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
|
|||
return;
|
||||
}
|
||||
|
||||
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
|
||||
TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
|
||||
if (tile != null) {
|
||||
if (tile instanceof TileEntityPlayerInterface) {
|
||||
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;
|
||||
String name = face.playerName == null
|
||||
? "Unknown"
|
||||
: face.playerName;
|
||||
minecraft.fontRenderer.drawStringWithShadow(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 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, "Bound to: " + TextFormatting.RED + name, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,12 +31,12 @@ public class BlockRangedCollector extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityRangedCollector();
|
||||
}
|
||||
|
||||
@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)) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockShockSuppressor extends BlockContainerBase {
|
|||
@SubscribeEvent
|
||||
public void onExplosion(ExplosionEvent.Detonate event) {
|
||||
World world = event.getWorld();
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
List<BlockPos> affectedBlocks = event.getAffectedBlocks();
|
||||
List<Entity> affectedEntities = event.getAffectedEntities();
|
||||
|
||||
|
@ -47,18 +47,18 @@ public class BlockShockSuppressor extends BlockContainerBase {
|
|||
|
||||
for (TileEntityShockSuppressor suppressor : TileEntityShockSuppressor.SUPPRESSORS) {
|
||||
if (!suppressor.isRedstonePowered) {
|
||||
BlockPos supPos = suppressor.getPos();
|
||||
BlockPos supPos = suppressor.getBlockPos();
|
||||
|
||||
List<Entity> entitiesToRemove = new ArrayList<>();
|
||||
List<BlockPos> posesToRemove = new ArrayList<>();
|
||||
|
||||
for (BlockPos pos : affectedBlocks) {
|
||||
if (pos.distanceSq(supPos) <= rangeSq) {
|
||||
if (pos.distSqr(supPos) <= rangeSq) {
|
||||
posesToRemove.add(pos);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class BlockShockSuppressor extends BlockContainerBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityShockSuppressor();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
|
||||
//Copied from BlockTorch.
|
||||
//I have no idea what all of this means.
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockTinyTorch extends BlockBase {
|
||||
|
||||
//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);
|
||||
|
||||
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
|
||||
// this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP));
|
||||
// this.setTickRandomly(true);
|
||||
|
|
|
@ -40,12 +40,12 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I
|
|||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader world) {
|
||||
public TileEntity newBlockEntity(IBlockReader world) {
|
||||
return new TileEntityMiner();
|
||||
}
|
||||
|
||||
|
@ -55,21 +55,21 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I
|
|||
if (!(rayCast instanceof BlockRayTraceResult)) {
|
||||
return;
|
||||
}
|
||||
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
|
||||
TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos());
|
||||
if (tile instanceof TileEntityMiner) {
|
||||
TileEntityMiner miner = (TileEntityMiner) tile;
|
||||
String info = miner.checkY == 0
|
||||
? "Done Mining!"
|
||||
: miner.checkY == -1
|
||||
? "Calculating positions..."
|
||||
: "Mining at " + (miner.getPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getPos().getZ() + miner.checkZ) + ".";
|
||||
minecraft.fontRenderer.drawStringWithShadow(matrices, info, resolution.getScaledWidth() / 2f + 5, resolution.getScaledHeight() / 2f - 20, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
: "Mining at " + (miner.getBlockPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getBlockPos().getZ() + miner.checkZ) + ".";
|
||||
minecraft.font.drawShadow(matrices, info, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f - 20, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
switch (state.getValue(FACING)) {
|
||||
case NORTH:
|
||||
return Shapes.MinerShapes.SHAPE_N;
|
||||
case EAST:
|
||||
|
|
|
@ -14,13 +14,15 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockWildPlant extends BlockBushBase {
|
||||
|
||||
// public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
||||
// public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,12 +30,12 @@ public class BlockXPSolidifier extends DirectionalBlock.Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
return new TileEntityXPSolidifier();
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,109 +9,109 @@ import java.util.Optional;
|
|||
import java.util.stream.Stream;
|
||||
|
||||
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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 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 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 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 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 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.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.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.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 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 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 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 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 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.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.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.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 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_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_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_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_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_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_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.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.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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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_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_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.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.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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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 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_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_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_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_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.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.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.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()
|
||||
|
@ -138,7 +138,7 @@ public class Shapes {
|
|||
Stream.Builder<VoxelShape> shapes = Stream.builder();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class Shapes {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -14,13 +14,15 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockBase extends Block {
|
||||
public BlockBase(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -13,8 +13,10 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.SoundType;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockBushBase extends BushBlock {
|
||||
public BlockBushBase(Properties properties) {
|
||||
super(properties.sound(SoundType.PLANT));
|
||||
super(properties.sound(SoundType.GRASS));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,14 +42,16 @@ import net.minecraftforge.fml.network.NetworkHooks;
|
|||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public abstract class BlockContainerBase extends ContainerBlock {
|
||||
public BlockContainerBase(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
public ActionResultType openGui(World world, PlayerEntity player, BlockPos pos, Class<? extends INamedContainerProvider> expectedInstance) {
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (!world.isClientSide) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile != null && tile.getClass().isInstance(expectedInstance)) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos);
|
||||
}
|
||||
|
@ -60,8 +62,8 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
}
|
||||
|
||||
private void dropInventory(World world, BlockPos position) {
|
||||
if (!world.isRemote) {
|
||||
TileEntity aTile = world.getTileEntity(position);
|
||||
if (!world.isClientSide) {
|
||||
TileEntity aTile = world.getBlockEntity(position);
|
||||
if (aTile instanceof TileEntityInventoryBase) {
|
||||
TileEntityInventoryBase tile = (TileEntityInventoryBase) aTile;
|
||||
if (tile.inv.getSlots() > 0) {
|
||||
|
@ -79,24 +81,24 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
return;
|
||||
}
|
||||
|
||||
float dX = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dY = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dZ = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dX = world.random.nextFloat() * 0.8F + 0.1F;
|
||||
float dY = world.random.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());
|
||||
float factor = 0.05F;
|
||||
entityItem.addVelocity(world.rand.nextGaussian() * factor, world.rand.nextGaussian() * factor + 0.2F, world.rand.nextGaussian() * factor);
|
||||
world.addEntity(entityItem);
|
||||
entityItem.push(world.random.nextGaussian() * factor, world.random.nextGaussian() * factor + 0.2F, world.random.nextGaussian() * factor);
|
||||
world.addFreshEntity(entityItem);
|
||||
}
|
||||
|
||||
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) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
TileEntityBase base = (TileEntityBase) tile;
|
||||
if (!world.isRemote && base.isRedstoneToggle()) {
|
||||
if (!world.isClientSide && base.isRedstoneToggle()) {
|
||||
base.isPulseMode = !base.isPulseMode;
|
||||
base.markDirty();
|
||||
base.setChanged();
|
||||
base.sendUpdate();
|
||||
}
|
||||
return true;
|
||||
|
@ -107,8 +109,8 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
|
||||
@Override
|
||||
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (!world.isClientSide) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
TileEntityBase base = (TileEntityBase) tile;
|
||||
if (base.respondsToPulses()) {
|
||||
|
@ -121,7 +123,7 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
public void neighborsChangedCustom(World world, BlockPos pos) {
|
||||
this.updateRedstoneState(world, pos);
|
||||
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
TileEntityBase base = (TileEntityBase) tile;
|
||||
if (base.shouldSaveDataOnChangeOrWorldStart()) {
|
||||
|
@ -144,11 +146,11 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
}
|
||||
|
||||
public void updateRedstoneState(World world, BlockPos pos) {
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (!world.isClientSide) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
TileEntityBase base = (TileEntityBase) tile;
|
||||
boolean powered = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
boolean powered = world.getBestNeighborSignal(pos) > 0;
|
||||
boolean wasPowered = base.isRedstonePowered;
|
||||
if (powered && !wasPowered) {
|
||||
if (base.respondsToPulses()) {
|
||||
|
@ -164,20 +166,20 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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()) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
TileEntityBase base = (TileEntityBase) tile;
|
||||
CompoundNBT compound = stack.getOrCreateTag().getCompound("Data");
|
||||
|
@ -187,23 +189,23 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
}
|
||||
|
||||
@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()) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
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
|
||||
public boolean hasComparatorInputOverride(BlockState state) {
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
public int getAnalogOutputSignal(BlockState state, World world, BlockPos pos) {
|
||||
TileEntity tile = world.getBlockEntity(pos);
|
||||
if (tile instanceof TileEntityBase) {
|
||||
return ((TileEntityBase) tile).getComparatorStrength();
|
||||
}
|
||||
|
@ -265,13 +267,13 @@ public abstract class BlockContainerBase extends ContainerBlock {
|
|||
|
||||
|
||||
@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 (this.shouldDropInventory(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) {
|
||||
|
|
|
@ -33,13 +33,15 @@ import net.minecraftforge.items.ItemHandlerHelper;
|
|||
import java.util.List;
|
||||
|
||||
// CROP BLOCK DEFAULTS TO 7 YEARS OF AGE.
|
||||
import net.minecraft.block.AbstractBlock.Properties;
|
||||
|
||||
public class BlockPlant extends CropsBlock {
|
||||
public Item seedItem;
|
||||
|
||||
// Stolen from potato for now
|
||||
// PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP)));
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -65,12 +67,12 @@ public class BlockPlant extends CropsBlock {
|
|||
|
||||
|
||||
@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) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
if (!world.isClientSide) {
|
||||
List<ItemStack> drops = Block.getDrops(state, (ServerWorld) world, pos, null);
|
||||
boolean deductedSeedSize = false;
|
||||
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
|
||||
protected IItemProvider getSeedsItem() {
|
||||
protected IItemProvider getBaseSeedId() {
|
||||
return this.seedItem;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import net.minecraft.state.StateContainer;
|
|||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
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.
|
||||
*/
|
||||
|
@ -34,16 +36,16 @@ public abstract class DirectionalBlock extends BlockBase {
|
|||
public Container(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import net.minecraft.state.StateContainer;
|
|||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
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.
|
||||
*/
|
||||
|
@ -16,17 +18,17 @@ public abstract class FullyDirectionalBlock extends BlockBase {
|
|||
|
||||
public FullyDirectionalBlock(Properties properties) {
|
||||
super(properties);
|
||||
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
|
@ -36,16 +38,16 @@ public abstract class FullyDirectionalBlock extends BlockBase {
|
|||
public Container(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
return this.getDefaultState().with(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public enum TheColoredLampColors implements IStringSerializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getString() {
|
||||
public String getSerializedName() {
|
||||
return this.regName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public enum TheMiscBlocks implements IStringSerializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getString() {
|
||||
public String getSerializedName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public enum TheWildPlants implements IStringSerializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getString() {
|
||||
public String getSerializedName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,26 +43,26 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
|
|||
return;
|
||||
}
|
||||
|
||||
matrices.push();
|
||||
matrices.pushPose();
|
||||
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.translate(0F, 0F, -60F);
|
||||
|
||||
stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> {
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
FontRenderer font = Minecraft.getInstance().font;
|
||||
|
||||
String energyTotal = Lang.cleanEnergyValues(cap, false);
|
||||
String energyName = Lang.transI18n("misc", "power_name_long");
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
font.drawString(matrices, energyTotal, -font.getStringWidth(energyTotal) / 2F, 10F, 0xFFFFFF);
|
||||
font.drawString(matrices, energyName, -font.getStringWidth(energyName) / 2F, 20F, 0xFFFFFF);
|
||||
font.draw(matrices, energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF);
|
||||
font.draw(matrices, energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF);
|
||||
|
||||
matrices.translate(-60F, 0F, 60F);
|
||||
matrices.rotate(Vector3f.YP.rotationDegrees(90));
|
||||
matrices.mulPose(Vector3f.YP.rotationDegrees(90));
|
||||
}
|
||||
// TODO: Remove if the above works
|
||||
// NumberFormat format = NumberFormat.getInstance();
|
||||
|
@ -82,27 +82,27 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
|
|||
// }
|
||||
});
|
||||
|
||||
matrices.pop(); // text rotation
|
||||
matrices.pop(); // rotation + centering
|
||||
matrices.popPose(); // text rotation
|
||||
matrices.popPose(); // rotation + centering
|
||||
|
||||
double boop = Util.milliTime() / 800D;
|
||||
double boop = Util.getMillis() / 800D;
|
||||
float scale = stack.getItem() instanceof BlockItem
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
|
||||
matrices.push();
|
||||
matrices.pushPose();
|
||||
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);
|
||||
|
||||
try {
|
||||
Minecraft.getInstance().getItemRenderer().renderItem(
|
||||
Minecraft.getInstance().getItemRenderer().renderStatic(
|
||||
stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer
|
||||
);
|
||||
} 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);
|
||||
}
|
||||
|
||||
matrices.pop();
|
||||
matrices.popPose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,12 +35,12 @@ public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStan
|
|||
return;
|
||||
}
|
||||
|
||||
matrices.push();
|
||||
matrices.pushPose();
|
||||
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.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
|
||||
? 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);
|
||||
}
|
||||
|
||||
matrices.pop();
|
||||
matrices.popPose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,12 +37,12 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
|||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(stack)) {
|
||||
// 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);
|
||||
|
||||
double boop = Util.milliTime() / 800D;
|
||||
double boop = Util.getMillis() / 800D;
|
||||
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
|
||||
? 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);
|
||||
}
|
||||
|
||||
matrices.pop();
|
||||
matrices.popPose();
|
||||
}
|
||||
|
||||
int index = tile.recipeForRenderIndex;
|
||||
|
@ -62,10 +62,10 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
|||
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
|
||||
if (recipe != null) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Direction facing = Direction.byHorizontalIndex(i); // TODO: [port][test] validate this works
|
||||
BlockPos offset = tile.getPos().offset(facing, 3);
|
||||
Direction facing = Direction.from2DDataValue(i); // TODO: [port][test] validate this works
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,31 +58,31 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
|
|||
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())) {
|
||||
matrices.push();
|
||||
matrices.pushPose();
|
||||
|
||||
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.scale(0.2F, 0.2F, 0.2F);
|
||||
|
||||
double boop = Util.milliTime() / 800D;
|
||||
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port][test] this might not work
|
||||
double boop = Util.getMillis() / 800D;
|
||||
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);
|
||||
|
||||
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()) {
|
||||
for (IConnectionPair pair : connections) {
|
||||
if (!pair.doesSuppressRender() && tile.getPos().equals(pair.getPositions()[0])) {
|
||||
BlockPos first = tile.getPos();
|
||||
if (!pair.doesSuppressRender() && tile.getBlockPos().equals(pair.getPositions()[0])) {
|
||||
BlockPos first = tile.getBlockPos();
|
||||
BlockPos second = pair.getPositions()[1];
|
||||
|
||||
TileEntity secondTile = tile.getWorld().getTileEntity(second);
|
||||
TileEntity secondTile = tile.getLevel().getBlockEntity(second);
|
||||
if (secondTile instanceof TileEntityLaserRelay) {
|
||||
ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0);
|
||||
boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == ActuallyItems.LASER_UPGRADE_INVISIBILITY.get();
|
||||
|
@ -107,7 +107,7 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isGlobalRenderer(TileEntityLaserRelay tile) {
|
||||
public boolean shouldRenderOffScreen(TileEntityLaserRelay tile) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,19 +36,19 @@ public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomic
|
|||
return;
|
||||
}
|
||||
|
||||
matrices.push();
|
||||
matrices.pushPose();
|
||||
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
|
||||
if (meta == 0) {
|
||||
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) {
|
||||
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) {
|
||||
matrices.translate(0F, -1F, 0F);
|
||||
|
@ -61,17 +61,17 @@ public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomic
|
|||
if (meta == 4) {
|
||||
matrices.translate(0F, -1F, 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) {
|
||||
matrices.translate(0F, -1F, 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);
|
||||
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
|
||||
|
||||
matrices.pop();
|
||||
matrices.popPose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BookmarkButton extends Button {
|
|||
button.assignedPage = null;
|
||||
} else if (!(button.booklet instanceof GuiPage) || ((GuiPage) button.booklet).pages[0] != button.assignedPage) {
|
||||
GuiPage gui = BookletUtils.createPageGui(button.booklet.previousScreen, button.booklet, button.assignedPage);
|
||||
Minecraft.getInstance().displayGuiScreen(gui);
|
||||
Minecraft.getInstance().setScreen(gui);
|
||||
}
|
||||
} else {
|
||||
if (button.booklet instanceof GuiPage) {
|
||||
|
@ -63,16 +63,16 @@ public class BookmarkButton extends Button {
|
|||
@Override
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
|
||||
if (this.visible) {
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getInstance().getTextureManager().bind(GuiBooklet.RES_LOC_GADGETS);
|
||||
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;
|
||||
int offset = this.isHovered
|
||||
? 1
|
||||
: 0;
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(770, 771, 1, 0);
|
||||
GlStateManager.blendFunc(770, 771);
|
||||
GlStateManager._enableBlend();
|
||||
GlStateManager._blendFuncSeparate(770, 771, 1, 0);
|
||||
GlStateManager._blendFunc(770, 771);
|
||||
int renderHeight = 25;
|
||||
this.blit(matrices, this.x, this.y, 224 + (this.assignedPage == null
|
||||
? 0
|
||||
|
@ -84,9 +84,9 @@ public class BookmarkButton extends Button {
|
|||
if (this.assignedPage != null) {
|
||||
ItemStack display = this.assignedPage.getChapter().getDisplayItemStack();
|
||||
if (StackUtil.isValid(display)) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager._pushMatrix();
|
||||
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();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,30 +38,30 @@ public class EntryButton extends Button {
|
|||
@Override
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY, float f) {
|
||||
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;
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager._enableBlend();
|
||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
GlStateManager.blendFunc(770, 771);
|
||||
GlStateManager._blendFunc(770, 771);
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
|
||||
int textOffsetX = 0;
|
||||
if (StackUtil.isValid(this.stackToRender)) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager._pushMatrix();
|
||||
AssetUtil.renderStackToGui(this.stackToRender, this.x - 4, this.y, 0.725F);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager._popMatrix();
|
||||
textOffsetX = 10;
|
||||
}
|
||||
|
||||
float scale = this.gui.getMediumFontSize();
|
||||
|
||||
if (this.hovered) {
|
||||
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);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager._pushMatrix();
|
||||
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();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import net.minecraft.client.gui.widget.button.Button.IPressable;
|
||||
|
||||
public class TrialsButton extends TexturedButton {
|
||||
|
||||
private final boolean isTrials;
|
||||
|
@ -32,7 +34,7 @@ public class TrialsButton extends TexturedButton {
|
|||
|
||||
if (this.visible) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class BookletEntry implements IBookletEntry {
|
|||
if (!items.isEmpty()) {
|
||||
for (ItemStack stack : items) {
|
||||
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.NORMAL);
|
||||
for (String strg : tooltip) {
|
||||
|
|
|
@ -116,8 +116,8 @@ public abstract class GuiBooklet extends GuiBookletBase {
|
|||
|
||||
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.setMaxStringLength(50);
|
||||
this.searchField.setEnableBackgroundDrawing(false);
|
||||
this.searchField.setMaxLength(50);
|
||||
this.searchField.setBordered(false);
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
public void removed() {
|
||||
super.removed();
|
||||
|
||||
//Don't cache the parent GUI, otherwise it opens again when you close the cached book!
|
||||
this.previousScreen = null;
|
||||
|
@ -173,19 +173,19 @@ public abstract class GuiBooklet extends GuiBookletBase {
|
|||
}
|
||||
|
||||
public void drawScreenPre(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
|
||||
GlStateManager.color4f(1F, 1F, 1F, 1F);
|
||||
this.getMinecraft().getTextureManager().bindTexture(RES_LOC_GUI);
|
||||
GlStateManager._color4f(1F, 1F, 1F, 1F);
|
||||
this.getMinecraft().getTextureManager().bind(RES_LOC_GUI);
|
||||
blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize, 512, 512);
|
||||
|
||||
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);
|
||||
|
||||
// boolean unicodeBefore = this.font.getUnicodeFlag();
|
||||
// this.font.setUnicodeFlag(true);
|
||||
|
||||
if (!this.searchField.isFocused() && (this.searchField.getText() == null || this.searchField.getText().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);
|
||||
if (!this.searchField.isFocused() && (this.searchField.getValue() == null || this.searchField.getValue().isEmpty())) {
|
||||
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);
|
||||
|
@ -279,7 +279,7 @@ public abstract class GuiBooklet extends GuiBookletBase {
|
|||
}
|
||||
|
||||
public void onBackButtonPressed() {
|
||||
this.getMinecraft().displayGuiScreen(new GuiMainPage(this.previousScreen));
|
||||
this.getMinecraft().setScreen(new GuiMainPage(this.previousScreen));
|
||||
}
|
||||
|
||||
public boolean hasSearchBar() {
|
||||
|
@ -310,7 +310,7 @@ public abstract class GuiBooklet extends GuiBookletBase {
|
|||
GuiBookletBase parent = !(this instanceof GuiEntry)
|
||||
? this
|
||||
: 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
|
||||
|
|
|
@ -80,7 +80,7 @@ public class GuiEntry extends GuiBooklet {
|
|||
super.init();
|
||||
|
||||
if (this.hasSearchBar() && this.searchText != null) {
|
||||
this.searchField.setText(this.searchText);
|
||||
this.searchField.setValue(this.searchText);
|
||||
if (this.focusSearch) {
|
||||
this.searchField.setFocused(true);
|
||||
}
|
||||
|
|
|
@ -73,12 +73,12 @@ public class GuiMainPage extends GuiBooklet {
|
|||
super.init();
|
||||
|
||||
int flavor = 1;
|
||||
if (this.getMinecraft().world.rand.nextFloat() <= 0.1) {
|
||||
flavor = MathHelper.nextInt(this.getMinecraft().world.rand, 2, 7);
|
||||
if (this.getMinecraft().level.random.nextFloat() <= 0.1) {
|
||||
flavor = MathHelper.nextInt(this.getMinecraft().level.random, 2, 7);
|
||||
}
|
||||
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("@");
|
||||
if (quoteSplit.length == 2) {
|
||||
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")) {
|
||||
String[] colors = new String[15];
|
||||
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);
|
||||
} else if (playerName.equalsIgnoreCase("oitsjustjose")) {
|
||||
|
@ -174,7 +174,7 @@ public class GuiMainPage extends GuiBooklet {
|
|||
if (displayed.size() > button.id) {
|
||||
IBookletEntry entry = displayed.get(button.id);
|
||||
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) {
|
||||
GuiScreen config = new GuiConfiguration(this);
|
||||
this.getMinecraft().displayGuiScreen(config);
|
||||
this.getMinecraft().setScreen(config);
|
||||
} else if (this.showTutorial && button == this.tutorialButton) {
|
||||
if (this.hasBookmarkButtons()) {
|
||||
if (!isShiftKeyDown()) {
|
||||
|
@ -212,12 +212,12 @@ public class GuiMainPage extends GuiBooklet {
|
|||
super.drawScreenPre(mouseX, mouseY, partialTicks);
|
||||
|
||||
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");
|
||||
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;
|
||||
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) {
|
||||
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.";
|
||||
|
|
|
@ -176,7 +176,7 @@ public class GuiPage extends GuiBooklet {
|
|||
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());
|
||||
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.color1arg(1F, 1F, 1F);
|
||||
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++) {
|
||||
IBookletPage page = this.pages[i];
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,10 +57,10 @@ public class ItemDisplay {
|
|||
public void drawPost(int mouseX, int mouseY) {
|
||||
if (this.isHovered(mouseX, mouseY)) {
|
||||
Minecraft mc = this.gui.mc;
|
||||
boolean flagBefore = mc.fontRenderer.getUnicodeFlag();
|
||||
mc.fontRenderer.setUnicodeFlag(false);
|
||||
boolean flagBefore = mc.font.getUnicodeFlag();
|
||||
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.NORMAL);
|
||||
|
||||
|
@ -76,9 +76,9 @@ public class ItemDisplay {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PageCoffeeMachine extends BookletPage {
|
|||
public PageCoffeeMachine(int localizationKey, CoffeeIngredient ingredient) {
|
||||
super(localizationKey);
|
||||
this.ingredient = ingredient;
|
||||
this.stacks = ingredient.getInput().getMatchingStacks();
|
||||
this.stacks = ingredient.getInput().getItems();
|
||||
|
||||
this.outcome = new ItemStack(ActuallyItems.COFFEE.get());
|
||||
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) {
|
||||
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);
|
||||
|
||||
gui.renderScaledAsciiString("(Coffee Maker Recipe)", startX + 6, startY + 78, 0, false, gui.getMediumFontSize());
|
||||
|
|
|
@ -109,7 +109,7 @@ public class PageCrafting extends BookletPage {
|
|||
if (!this.recipes.isEmpty()) {
|
||||
for (IRecipe recipe : this.recipes) {
|
||||
if (recipe != null) {
|
||||
ItemStack output = recipe.getRecipeOutput();
|
||||
ItemStack output = recipe.getResultItem();
|
||||
if (StackUtil.isValid(output)) {
|
||||
ItemStack copy = output.copy();
|
||||
if (this.isWildcard) {
|
||||
|
@ -129,7 +129,7 @@ public class PageCrafting extends BookletPage {
|
|||
|
||||
if (recipe instanceof BlankRecipe) {
|
||||
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;
|
||||
} else if (recipe instanceof ShapedRecipes) {
|
||||
ShapedRecipes shaped = (ShapedRecipes) recipe;
|
||||
|
@ -167,7 +167,7 @@ public class PageCrafting extends BookletPage {
|
|||
for (int y = 0; y < height; y++) {
|
||||
Ingredient ing = ings[y * width + x];
|
||||
if (ing != null) {
|
||||
ItemStack[] stacks = ing.getMatchingStacks();
|
||||
ItemStack[] stacks = ing.getItems();
|
||||
if (stacks != null && stacks.length > 0) {
|
||||
ItemStack stack = stacks[0];
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PageCrusherRecipe extends BookletPage {
|
|||
public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe) {
|
||||
super(localizationKey);
|
||||
this.recipe = recipe;
|
||||
this.stacks = recipe.getInput().getMatchingStacks();
|
||||
this.stacks = recipe.getInput().getItems();
|
||||
}
|
||||
|
||||
@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) {
|
||||
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);
|
||||
|
||||
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".crusherRecipe") + ")", startX + 36, startY + 85, 0, false, gui.getMediumFontSize());
|
||||
|
|
|
@ -37,11 +37,11 @@ public class PageEmpowerer extends BookletPage {
|
|||
super(localizationKey);
|
||||
this.recipe = recipe;
|
||||
if (recipe != null) {
|
||||
this.inputs = recipe.getInput().getMatchingStacks();
|
||||
this.stand1 = recipe.getStandOne().getMatchingStacks();
|
||||
this.stand2 = recipe.getStandTwo().getMatchingStacks();
|
||||
this.stand3 = recipe.getStandThree().getMatchingStacks();
|
||||
this.stand4 = recipe.getStandFour().getMatchingStacks();
|
||||
this.inputs = recipe.getInput().getItems();
|
||||
this.stand1 = recipe.getStandOne().getItems();
|
||||
this.stand2 = recipe.getStandTwo().getItems();
|
||||
this.stand3 = recipe.getStandThree().getItems();
|
||||
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) {
|
||||
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);
|
||||
|
||||
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".empowererRecipe") + ")", startX + 6, startY + 85, 0, false, gui.getMediumFontSize());
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PageFurnace extends BookletPage {
|
|||
for (Map.Entry<ItemStack, ItemStack> entry : FurnaceRecipes.instance().getSmeltingList().entrySet()) {
|
||||
ItemStack stack = entry.getValue();
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (stack.isItemEqual(output)) {
|
||||
if (stack.sameItem(output)) {
|
||||
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) {
|
||||
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);
|
||||
|
||||
gui.renderScaledAsciiString("(" + StringUtil.localize("booklet." + ActuallyAdditions.MODID + ".furnaceRecipe") + ")", startX + 32, startY + 42, 0, false, gui.getMediumFontSize());
|
||||
|
|
|
@ -44,7 +44,7 @@ public class PagePicture extends BookletPage {
|
|||
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
|
||||
super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks);
|
||||
|
||||
gui.getMinecraft().getTextureManager().bindTexture(this.resLoc);
|
||||
gui.getMinecraft().getTextureManager().bind(this.resLoc);
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.enableBlend();
|
||||
|
|
|
@ -35,7 +35,7 @@ public class PageReconstructor extends BookletPage {
|
|||
super(localizationKey);
|
||||
this.recipe = recipe;
|
||||
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) {
|
||||
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);
|
||||
|
||||
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) {
|
||||
ItemStack copy = this.recipe.getOutput().copy();
|
||||
if (this.isWildcard) {
|
||||
copy.setDamage(Util.WILDCARD);
|
||||
copy.setDamageValue(Util.WILDCARD);
|
||||
}
|
||||
list.add(copy);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public final class ConfigValues {
|
|||
if (itemRedstoneTorchConfigurator == null || itemCompassConfigurator == null) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
public final class PlayerData {
|
||||
|
||||
public static PlayerSave getDataFromPlayer(PlayerEntity player) {
|
||||
WorldData worldData = WorldData.get(player.getEntityWorld());
|
||||
WorldData worldData = WorldData.get(player.getCommandSenderWorld());
|
||||
ConcurrentHashMap<UUID, PlayerSave> data = worldData.playerSaveData;
|
||||
UUID id = player.getUniqueID();
|
||||
UUID id = player.getUUID();
|
||||
|
||||
if (data.containsKey(id)) {
|
||||
PlayerSave save = data.get(id);
|
||||
|
@ -42,7 +42,7 @@ public final class PlayerData {
|
|||
//Add Data if none is existant
|
||||
PlayerSave save = new PlayerSave(id);
|
||||
data.put(id, save);
|
||||
worldData.markDirty();
|
||||
worldData.setDirty();
|
||||
return save;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ public class WorldData extends WorldSavedData {
|
|||
}
|
||||
|
||||
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) {
|
||||
storage = new WorldData();
|
||||
storage.markDirty();
|
||||
((ServerWorld) world).getSavedData().set(storage);
|
||||
storage.setDirty();
|
||||
((ServerWorld) world).getDataStorage().set(storage);
|
||||
}
|
||||
|
||||
return storage;
|
||||
|
@ -57,7 +57,7 @@ public class WorldData extends WorldSavedData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void read(CompoundNBT compound) {
|
||||
public void load(CompoundNBT compound) {
|
||||
this.laserRelayNetworks.clear();
|
||||
ListNBT networkList = compound.getList("Networks", 10);
|
||||
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++) {
|
||||
CompoundNBT player = playerList.getCompound(i);
|
||||
|
||||
UUID id = player.getUniqueId("UUID");
|
||||
UUID id = player.getUUID("UUID");
|
||||
CompoundNBT data = player.getCompound("Data");
|
||||
|
||||
PlayerSave save = new PlayerSave(id);
|
||||
|
@ -80,7 +80,7 @@ public class WorldData extends WorldSavedData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(CompoundNBT compound) {
|
||||
public CompoundNBT save(CompoundNBT compound) {
|
||||
//Laser World Data
|
||||
ListNBT networkList = new ListNBT();
|
||||
for (Network network : this.laserRelayNetworks) {
|
||||
|
@ -92,7 +92,7 @@ public class WorldData extends WorldSavedData {
|
|||
ListNBT playerList = new ListNBT();
|
||||
for (PlayerSave save : this.playerSaveData.values()) {
|
||||
CompoundNBT player = new CompoundNBT();
|
||||
player.putUniqueId("UUID", save.id);
|
||||
player.putUUID("UUID", save.id);
|
||||
|
||||
CompoundNBT data = new CompoundNBT();
|
||||
save.writeToNBT(data, true);
|
||||
|
|
|
@ -35,10 +35,10 @@ public class EntityWorm extends Entity {
|
|||
Block block = state.getBlock();
|
||||
boolean rightBlock = block instanceof BlockFarmland || block instanceof BlockDirt || block instanceof BlockGrass;
|
||||
if (rightBlock) {
|
||||
BlockPos posUp = pos.up();
|
||||
BlockPos posUp = pos.above();
|
||||
BlockState stateUp = world.getBlockState(posUp);
|
||||
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 {
|
||||
return false;
|
||||
}
|
||||
|
@ -66,53 +66,53 @@ public class EntityWorm extends Entity {
|
|||
|
||||
@Override
|
||||
public void onEntityUpdate() {
|
||||
if (!this.world.isRemote) {
|
||||
if (!this.level.isClientSide) {
|
||||
this.timer++;
|
||||
|
||||
if (this.timer % 50 == 0) {
|
||||
for (int x = -1; x <= 1; x++) {
|
||||
for (int z = -1; z <= 1; 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();
|
||||
boolean isMiddlePose = x == 0 && z == 0;
|
||||
|
||||
if (canWormify(this.world, pos, state)) {
|
||||
if (canWormify(this.level, pos, state)) {
|
||||
boolean isFarmland = block instanceof BlockFarmland;
|
||||
|
||||
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) {
|
||||
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;
|
||||
|
||||
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) {
|
||||
BlockPos plant = pos.up();
|
||||
if (!this.world.isAirBlock(plant)) {
|
||||
BlockState plantState = this.world.getBlockState(plant);
|
||||
if (isFarmland && this.level.random.nextFloat() >= 0.95F) {
|
||||
BlockPos plant = pos.above();
|
||||
if (!this.level.isEmptyBlock(plant)) {
|
||||
BlockState plantState = this.level.getBlockState(plant);
|
||||
Block plantBlock = plantState.getBlock();
|
||||
|
||||
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) {
|
||||
this.world.playEvent(2005, plant, 0);
|
||||
this.level.levelEvent(2005, plant, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (isMiddlePose) {
|
||||
this.setDead();
|
||||
this.removeAfterChangingDimensions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class EntityWorm extends Entity {
|
|||
|
||||
int dieTime = ConfigIntValues.WORMS_DIE_TIME.getValue();
|
||||
if (dieTime > 0 && this.timer >= dieTime) {
|
||||
this.setDead();
|
||||
this.removeAfterChangingDimensions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|||
@OnlyIn(Dist.CLIENT)
|
||||
public class ClientEvents {
|
||||
|
||||
private static final ITextComponent ADVANCED_INFO_TEXT_PRE = new StringTextComponent(" -").mergeStyle(TextFormatting.DARK_GRAY);
|
||||
private static final ITextComponent ADVANCED_INFO_HEADER_PRE = new StringTextComponent(" -").mergeStyle(TextFormatting.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(" -").withStyle(TextFormatting.GRAY);
|
||||
|
||||
private static EnergyDisplay energyDisplay;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ClientEvents {
|
|||
if (event.phase == TickEvent.Phase.END) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
if (mc.world == null) {
|
||||
if (mc.level == null) {
|
||||
WorldData.clear();
|
||||
}
|
||||
}
|
||||
|
@ -162,15 +162,15 @@ public class ClientEvents {
|
|||
@SubscribeEvent
|
||||
public void onGameOverlay(RenderGameOverlayEvent.Post event) {
|
||||
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;
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
RayTraceResult posHit = minecraft.objectMouseOver;
|
||||
FontRenderer font = minecraft.fontRenderer;
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
RayTraceResult posHit = minecraft.hitResult;
|
||||
FontRenderer font = minecraft.font;
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (stack.getItem() instanceof IHudDisplay) {
|
||||
|
@ -180,8 +180,8 @@ public class ClientEvents {
|
|||
|
||||
if (posHit != null && posHit.getType() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult rayCast = (BlockRayTraceResult) posHit;
|
||||
Block blockHit = minecraft.world.getBlockState(rayCast.getPos()).getBlock();
|
||||
TileEntity tileHit = minecraft.world.getTileEntity(rayCast.getPos());
|
||||
Block blockHit = minecraft.level.getBlockState(rayCast.getBlockPos()).getBlock();
|
||||
TileEntity tileHit = minecraft.level.getBlockEntity(rayCast.getBlockPos());
|
||||
|
||||
if (blockHit instanceof IHudDisplay) {
|
||||
((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
|
||||
? "pulse"
|
||||
: "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;
|
||||
if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) {
|
||||
expl = TextFormatting.GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem");
|
||||
} 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) {
|
||||
IEnergyDisplay display = (IEnergyDisplay) tileHit;
|
||||
if (!display.needsHoldShift() || player.isSneaking()) {
|
||||
if (!display.needsHoldShift() || player.isShiftKeyDown()) {
|
||||
if (energyDisplay == 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.color4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager._pushMatrix();
|
||||
GlStateManager._color4f(1F, 1F, 1F, 1F);
|
||||
energyDisplay.draw();
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager._popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,10 +61,10 @@ public class CommonEvents {
|
|||
if (item != null && item.isAlive()) {
|
||||
ItemStack stack = item.getItem();
|
||||
if (StackUtil.isValid(stack)) {
|
||||
for (int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
if (i != player.inventory.currentItem) {
|
||||
for (int i = 0; i < player.inventory.getContainerSize(); i++) {
|
||||
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 (invStack.getOrCreateTag().getBoolean("AutoInsert")) {
|
||||
boolean changed = false;
|
||||
|
@ -139,11 +139,11 @@ public class CommonEvents {
|
|||
|
||||
@SubscribeEvent
|
||||
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
|
||||
if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof SpiderEntity) {
|
||||
if (event.getEntityLiving().world.rand.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)));
|
||||
if (event.getEntityLiving().level.random.nextInt(20) <= event.getLootingLevel() * 2) {
|
||||
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
|
||||
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();
|
||||
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);
|
||||
|
||||
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();
|
||||
if (name != null && name.toLowerCase(Locale.ROOT).contains(ActuallyAdditions.MODID)) {
|
||||
PlayerData.PlayerSave save = PlayerData.getDataFromPlayer(event.getPlayer());
|
||||
if (save != null && !save.bookGottenAlready) {
|
||||
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()));
|
||||
entityItem.setPickupDelay(0);
|
||||
event.getPlayer().world.addEntity(entityItem);
|
||||
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);
|
||||
event.getPlayer().level.addFreshEntity(entityItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
private final ItemStack sack;
|
||||
|
||||
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) {
|
||||
|
@ -70,7 +70,7 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
if (this.isVoid) {
|
||||
this.addSlot(new SlotDeletion(this.bagInventory, 0, 64, 65) {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
public boolean mayPlace(ItemStack 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++) {
|
||||
this.addSlot(new SlotItemHandlerUnconditioned(this.bagInventory, j + i * 7, 10 + j * 18, 10 + i * 18) {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
public boolean mayPlace(ItemStack 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++) {
|
||||
if (i == inventory.currentItem) {
|
||||
if (i == inventory.selected) {
|
||||
this.addSlot(new SlotImmovable(inventory, i, 8 + i * 18, 152));
|
||||
} else {
|
||||
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) {
|
||||
ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getCurrentItem());
|
||||
ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getSelected());
|
||||
if (stack.hasTag()) {
|
||||
CompoundNBT compound = stack.getOrCreateTag();
|
||||
this.filter.readFromNBT(compound, "Filter");
|
||||
|
@ -118,25 +118,25 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
public void broadcastChanges() {
|
||||
super.broadcastChanges();
|
||||
|
||||
if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) {
|
||||
for (IContainerListener listener : this.listeners) {
|
||||
listener.sendWindowProperty(this, 0, this.filter.isWhitelist
|
||||
for (IContainerListener listener : this.containerListeners) {
|
||||
listener.setContainerData(this, 0, this.filter.isWhitelist
|
||||
? 1
|
||||
: 0);
|
||||
listener.sendWindowProperty(this, 1, this.filter.respectMeta
|
||||
listener.setContainerData(this, 1, this.filter.respectMeta
|
||||
? 1
|
||||
: 0);
|
||||
listener.sendWindowProperty(this, 2, this.filter.respectNBT
|
||||
listener.setContainerData(this, 2, this.filter.respectNBT
|
||||
? 1
|
||||
: 0);
|
||||
listener.sendWindowProperty(this, 3, this.filter.respectOredict);
|
||||
listener.sendWindowProperty(this, 4, this.autoInsert
|
||||
listener.setContainerData(this, 3, this.filter.respectOredict);
|
||||
listener.setContainerData(this, 4, this.autoInsert
|
||||
? 1
|
||||
: 0);
|
||||
listener.sendWindowProperty(this, 5, this.filter.respectMod
|
||||
listener.setContainerData(this, 5, this.filter.respectMod
|
||||
? 1
|
||||
: 0);
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void updateProgressBar(int id, int data) {
|
||||
public void setData(int id, int data) {
|
||||
if (id == 0) {
|
||||
this.filter.isWhitelist = data == 1;
|
||||
} else if (id == 1) {
|
||||
|
@ -164,40 +164,40 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
|
||||
int inventoryStart = this.bagInventory.getSlots() + 4;
|
||||
int inventoryEnd = inventoryStart + 26;
|
||||
int hotbarStart = inventoryEnd + 1;
|
||||
int hotbarEnd = hotbarStart + 8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
Slot theSlot = this.slots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()) {
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
if (theSlot != null && theSlot.hasItem()) {
|
||||
ItemStack newStack = theSlot.getItem();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if (slot >= inventoryStart) {
|
||||
//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 (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
} else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
theSlot.set(StackUtil.getEmpty());
|
||||
} else {
|
||||
theSlot.onSlotChanged();
|
||||
theSlot.setChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
|
@ -211,31 +211,31 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
}
|
||||
|
||||
@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)) {
|
||||
return StackUtil.getEmpty();
|
||||
} else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.currentItem) {
|
||||
} else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.selected) {
|
||||
return ItemStack.EMPTY;
|
||||
} else {
|
||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||
return super.clicked(slotId, dragType, clickTypeIn, player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(PlayerEntity player) {
|
||||
ItemStack stack = this.inventory.getCurrentItem();
|
||||
public void removed(PlayerEntity player) {
|
||||
ItemStack stack = this.inventory.getSelected();
|
||||
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();
|
||||
this.filter.writeToNBT(compound, "Filter");
|
||||
compound.putBoolean("AutoInsert", this.autoInsert);
|
||||
}
|
||||
super.onContainerClosed(player);
|
||||
super.removed(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(PlayerEntity player) {
|
||||
return !this.sack.isEmpty() && player.getHeldItemMainhand() == this.sack;
|
||||
public boolean stillValid(PlayerEntity player) {
|
||||
return !this.sack.isEmpty() && player.getMainHandItem() == this.sack;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ContainerBioReactor extends Container {
|
|||
public final TileEntityBioReactor tile;
|
||||
|
||||
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) {
|
||||
|
@ -51,43 +51,43 @@ public class ContainerBioReactor extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
|
||||
int inventoryStart = 8;
|
||||
int inventoryEnd = inventoryStart + 26;
|
||||
int hotbarStart = inventoryEnd + 1;
|
||||
int hotbarEnd = hotbarStart + 8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
Slot theSlot = this.slots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()) {
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
if (theSlot != null && theSlot.hasItem()) {
|
||||
ItemStack newStack = theSlot.getItem();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if (slot >= inventoryStart) {
|
||||
//Shift from Inventory
|
||||
if (TileEntityBioReactor.isValidItem(newStack)) {
|
||||
if (!this.mergeItemStack(newStack, 0, 8, false)) {
|
||||
if (!this.moveItemStackTo(newStack, 0, 8, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
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();
|
||||
}
|
||||
} 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();
|
||||
}
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
} else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
theSlot.set(StackUtil.getEmpty());
|
||||
} else {
|
||||
theSlot.onSlotChanged();
|
||||
theSlot.setChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
|
@ -101,7 +101,7 @@ public class ContainerBioReactor extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(PlayerEntity player) {
|
||||
public boolean stillValid(PlayerEntity player) {
|
||||
return this.tile.canPlayerUse(player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ContainerBreaker extends Container {
|
|||
public final TileEntityBreaker breaker;
|
||||
|
||||
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) {
|
||||
|
@ -52,39 +52,39 @@ public class ContainerBreaker extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart + 26;
|
||||
int hotbarStart = inventoryEnd + 1;
|
||||
int hotbarEnd = hotbarStart + 8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
Slot theSlot = this.slots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()) {
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
if (theSlot != null && theSlot.hasItem()) {
|
||||
ItemStack newStack = theSlot.getItem();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if (slot >= inventoryStart) {
|
||||
//Shift from Inventory
|
||||
if (!this.mergeItemStack(newStack, 0, 9, false)) {
|
||||
if (!this.moveItemStackTo(newStack, 0, 9, false)) {
|
||||
//
|
||||
if (slot >= inventoryStart && slot <= inventoryEnd) {
|
||||
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
if (!this.moveItemStackTo(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
} else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
theSlot.set(StackUtil.getEmpty());
|
||||
} else {
|
||||
theSlot.onSlotChanged();
|
||||
theSlot.setChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
|
@ -98,7 +98,7 @@ public class ContainerBreaker extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(PlayerEntity player) {
|
||||
public boolean stillValid(PlayerEntity player) {
|
||||
return this.breaker.canPlayerUse(player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ContainerCanolaPress extends Container {
|
|||
public final TileEntityCanolaPress press;
|
||||
|
||||
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) {
|
||||
|
@ -48,43 +48,43 @@ public class ContainerCanolaPress extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart + 26;
|
||||
int hotbarStart = inventoryEnd + 1;
|
||||
int hotbarEnd = hotbarStart + 8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
Slot theSlot = this.slots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()) {
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
if (theSlot != null && theSlot.hasItem()) {
|
||||
ItemStack newStack = theSlot.getItem();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if (slot >= inventoryStart) {
|
||||
//Shift from Inventory
|
||||
if (newStack.getItem() == ActuallyItems.CANOLA.get()) {
|
||||
if (!this.mergeItemStack(newStack, 0, 1, false)) {
|
||||
if (!this.moveItemStackTo(newStack, 0, 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
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();
|
||||
}
|
||||
} 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();
|
||||
}
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
} else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
theSlot.set(StackUtil.getEmpty());
|
||||
} else {
|
||||
theSlot.onSlotChanged();
|
||||
theSlot.setChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
|
@ -98,7 +98,7 @@ public class ContainerCanolaPress extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(PlayerEntity player) {
|
||||
public boolean stillValid(PlayerEntity player) {
|
||||
return this.press.canPlayerUse(player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ContainerCoalGenerator extends Container {
|
|||
public final TileEntityCoalGenerator generator;
|
||||
|
||||
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) {
|
||||
|
@ -48,43 +48,43 @@ public class ContainerCoalGenerator extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
public ItemStack quickMoveStack(PlayerEntity player, int slot) {
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart + 26;
|
||||
int hotbarStart = inventoryEnd + 1;
|
||||
int hotbarEnd = hotbarStart + 8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
Slot theSlot = this.slots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()) {
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
if (theSlot != null && theSlot.hasItem()) {
|
||||
ItemStack newStack = theSlot.getItem();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if (slot >= inventoryStart) {
|
||||
//Shift from Inventory
|
||||
if (ForgeHooks.getBurnTime(newStack) > 0) {
|
||||
if (!this.mergeItemStack(newStack, 0, 1, false)) {
|
||||
if (!this.moveItemStackTo(newStack, 0, 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
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();
|
||||
}
|
||||
} 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();
|
||||
}
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
} else if (!this.moveItemStackTo(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
theSlot.set(StackUtil.getEmpty());
|
||||
} else {
|
||||
theSlot.onSlotChanged();
|
||||
theSlot.setChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
|
@ -98,7 +98,7 @@ public class ContainerCoalGenerator extends Container {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(PlayerEntity player) {
|
||||
public boolean stillValid(PlayerEntity player) {
|
||||
return this.generator.canPlayerUse(player);
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue