mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
chore: ported over most tile entities
This commit is contained in:
parent
ecb7832738
commit
71ddbd9abb
174 changed files with 1576 additions and 1361 deletions
|
@ -10,11 +10,6 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
|
@ -23,22 +18,17 @@ import de.ellpeck.actuallyadditions.api.internal.IMethodHandler;
|
|||
import de.ellpeck.actuallyadditions.api.laser.ILaserRelayConnectionHandler;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.api.lens.LensConversion;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.OilGenRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ActuallyAdditionsAPI {
|
||||
|
||||
public static final String MOD_ID = "actuallyadditions";
|
||||
|
@ -140,7 +130,9 @@ 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() ? ItemStack.EMPTY : outputTwo, outputTwoChance));
|
||||
CRUSHER_RECIPES.add(new CrusherRecipe(Ingredient.fromStacks(input), outputOne, outputTwo.isEmpty()
|
||||
? ItemStack.EMPTY
|
||||
: outputTwo, outputTwoChance));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,7 +144,9 @@ 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(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance) {
|
||||
CRUSHER_RECIPES.add(new CrusherRecipe(input, outputOne, outputTwo.isEmpty() ? ItemStack.EMPTY : outputTwo, outputTwoChance));
|
||||
CRUSHER_RECIPES.add(new CrusherRecipe(input, outputOne, outputTwo.isEmpty()
|
||||
? ItemStack.EMPTY
|
||||
: outputTwo, outputTwoChance));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package de.ellpeck.actuallyadditions.api;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tags.ITag;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
|
||||
public final class ActuallyTags {
|
||||
public static class Items {
|
||||
public static final ITag.INamedTag<Item> DRILLS = tag("drills");
|
||||
public static final ITag.INamedTag<Item> COFFEE_BEANS = tag("coffee_beans");
|
||||
|
||||
private static ITag.INamedTag<Item> tag(String name) {
|
||||
return ItemTags.makeWrapperTag(String.format("%s:%s", ActuallyAdditions.MODID, name));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,19 +10,18 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This is the internal method handler.
|
||||
* Use ActuallyAdditionsAPI.methodHandler for calling
|
||||
|
@ -46,7 +45,8 @@ public interface IMethodHandler {
|
|||
|
||||
boolean addCrusherRecipes(List<ItemStack> inputs, List<ItemStack> outputOnes, int outputOneAmounts, List<ItemStack> outputTwos, int outputTwoAmounts, int outputTwoChance);
|
||||
|
||||
@Deprecated //Use Ingredient input on AA API class
|
||||
@Deprecated
|
||||
//Use Ingredient input on AA API class
|
||||
boolean addCrusherRecipes(List<ItemStack> inputs, ItemStack outputOne, int outputOneAmount, ItemStack outputTwo, int outputTwoAmount, int outputTwoChance);
|
||||
|
||||
IBookletPage generateTextPage(int id);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.api.lens;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -25,6 +24,7 @@ public abstract class Lens {
|
|||
*
|
||||
* @param hitBlock The block that was hit
|
||||
* @param tile The tile the lens was invoked from
|
||||
*
|
||||
* @return If the Reconstructor should stop continuing (return false if you want it to go through blocks)
|
||||
*/
|
||||
public abstract boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.api.lens;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
|
@ -31,7 +30,7 @@ public class LensConversion extends Lens {
|
|||
|
||||
@Override
|
||||
public float[] getColor() {
|
||||
return new float[] { 27F / 255F, 109F / 255F, 1F };
|
||||
return new float[]{27F / 255F, 109F / 255F, 1F};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -33,6 +32,7 @@ public interface IColorLensChanger {
|
|||
* @param hitBlockState The state of the block that was hit
|
||||
* @param hitBlock the block that was hit (usually air, or the block that is also in the stack)
|
||||
* @param tile the Reconstructor doing the color conversion
|
||||
*
|
||||
* @return the modified stack. Please make sure to return a modified COPY of the input stack.
|
||||
*/
|
||||
ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.api.recipe;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package de.ellpeck.actuallyadditions.data;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.GatherDataEvent;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class ActuallyAdditionsData {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void runGenerator(GatherDataEvent event) {
|
||||
DataGenerator generator = event.getGenerator();
|
||||
ExistingFileHelper helper = event.getExistingFileHelper();
|
||||
|
||||
if (event.includeClient()) {
|
||||
// generator.addProvider(new GeneratorBlockStates(generator, helper));
|
||||
// generator.addProvider(new GeneratorItemModels(generator, helper));
|
||||
// generator.addProvider(new GeneratorLanguage(generator));
|
||||
}
|
||||
|
||||
if (event.includeServer()) {
|
||||
BlockTagsGenerator generatorBlockTags = new BlockTagsGenerator(generator, helper);
|
||||
|
||||
// generator.addProvider(new GeneratorLoot(generator));
|
||||
// generator.addProvider(new GeneratorRecipes(generator));
|
||||
generator.addProvider(generatorBlockTags);
|
||||
generator.addProvider(new ItemTagsGenerator(generator, generatorBlockTags, helper));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package de.ellpeck.actuallyadditions.data;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.data.BlockTagsProvider;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class BlockTagsGenerator extends BlockTagsProvider {
|
||||
public BlockTagsGenerator(DataGenerator generatorIn, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(generatorIn, ActuallyAdditions.MODID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerTags() {
|
||||
// getOrCreateBuilder(BlockTags.WALLS).add(
|
||||
// ActuallyBlocks.WHITE_WALL.get(),
|
||||
// ActuallyBlocks.GREEN_WALL.get(),
|
||||
// ActuallyBlocks.BLACK_QUARTZ_WALL.get(),
|
||||
// ActuallyBlocks.BLACK_SMOOTH_QUARTZ_WALL.get(),
|
||||
// ActuallyBlocks.BLACK_PILLAR_QUARTZ_WALL.get(),
|
||||
// ActuallyBlocks.BLACK_CHISELED_QUARTZ_WALL.get(),
|
||||
// ActuallyBlocks.BLACK_BRICK_QUARTZ_WALL.get()
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a Path for the location to save the given tag.
|
||||
*/
|
||||
@Override
|
||||
protected Path makePath(ResourceLocation id) {
|
||||
return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a name for this provider, to use in logging.
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Block Tags";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package de.ellpeck.actuallyadditions.data;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyTags;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import net.minecraft.data.BlockTagsProvider;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.ItemTagsProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemTagsGenerator extends ItemTagsProvider {
|
||||
public ItemTagsGenerator(DataGenerator dataGenerator, BlockTagsProvider blockTagProvider, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(dataGenerator, blockTagProvider, ActuallyAdditions.MODID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerTags() {
|
||||
this.getOrCreateBuilder(ActuallyTags.Items.COFFEE_BEANS).add(InitItems.itemCoffeeBean);
|
||||
// getOrCreateBuilder(ActuallyTags.Items.DRILLS).add(
|
||||
// ActuallyItems.DRILL_MAIN.get(),
|
||||
// ActuallyItems.DRILL_BLACK.get(), ActuallyItems.DRILL_BLACK.get(), ActuallyItems.DRILL_BLUE.get(), ActuallyItems.DRILL_BROWN.get(),
|
||||
// ActuallyItems.DRILL_CYAN.get(), ActuallyItems.DRILL_GRAY.get(), ActuallyItems.DRILL_GREEN.get(), ActuallyItems.DRILL_LIGHT_GRAY.get(),
|
||||
// ActuallyItems.DRILL_LIME.get(), ActuallyItems.DRILL_MAGENTA.get(), ActuallyItems.DRILL_ORANGE.get(), ActuallyItems.DRILL_PINK.get(),
|
||||
// ActuallyItems.DRILL_PURPLE.get(), ActuallyItems.DRILL_RED.get(), ActuallyItems.DRILL_WHITE.get(), ActuallyItems.DRILL_YELLOW.get()
|
||||
// );
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -19,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.renderer.color.IBlockColor;
|
||||
import net.minecraft.client.renderer.color.IItemColor;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.minecraft.block.BlockHorizontal;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -25,7 +25,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -15,7 +15,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -21,7 +21,6 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -26,7 +26,6 @@ import net.minecraft.block.BlockDirectional;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,20 +17,18 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
public class BlockSlabs extends BlockBase {
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.block.BlockTorch;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -160,7 +159,7 @@ public class BlockTinyTorch extends BlockBase {
|
|||
|
||||
if (flag) {
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
worldIn.setBlockToAir(pos);
|
||||
worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -174,7 +173,7 @@ public class BlockTinyTorch extends BlockBase {
|
|||
} else {
|
||||
if (worldIn.getBlockState(pos).getBlock() == this) {
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
worldIn.setBlockToAir(pos);
|
||||
worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -67,7 +66,7 @@ public class BlockTreasureChest extends BlockBase {
|
|||
if (!world.isRemote) {
|
||||
world.playSound(null, pos, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.2F, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
this.dropItems(world, pos);
|
||||
world.setBlockToAir(pos);
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
|
||||
//TheAchievements.OPEN_TREASURE_CHEST.get(player);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockFenceGate;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.minecraft.block.BlockCrops;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier;
|
|||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -23,6 +23,7 @@ public final class InitBlocks {
|
|||
|
||||
public static final RegistryObject<Block> blockCompost = BLOCKS.register("block_compost", BlockCompost::new);
|
||||
public static final RegistryObject<Block> blockMisc = BLOCKS.register("block_misc", BlockMisc::new);
|
||||
public static final RegistryObject<Block> blockLavaCasing = BLOCKS.register("block_misc", BlockMisc::new);
|
||||
public static final RegistryObject<Block> blockWildPlant = BLOCKS.register("block_wild", BlockWildPlant::new);
|
||||
public static final RegistryObject<Block> blockFeeder = BLOCKS.register("block_feeder", BlockFeeder::new);
|
||||
// public static final RegistryObject<Block> blockGiantChest = BLOCKS.register("", );
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.CropsBlock;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//import org.apache.commons.lang3.tuple.Pair;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.blocks.BlockCompost;
|
||||
//import net.minecraft.block.state.BlockState;
|
||||
//
|
||||
//import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
//import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
//import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
//import com.google.common.collect.ImmutableMap;
|
||||
//import com.google.common.collect.Maps;
|
||||
//
|
||||
//import net.minecraft.block.state.BlockState;
|
||||
//
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
//import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.lens.ILensItem;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class PlayerData {
|
|||
this.didBookTutorial = compound.getBoolean("DidTutorial");
|
||||
|
||||
this.hasBatWings = compound.getBoolean("HasBatWings");
|
||||
this.batWingsFlyTime = compound.getInteger("BatWingsFlyTime");
|
||||
this.batWingsFlyTime = compound.getInt("BatWingsFlyTime");
|
||||
|
||||
ListNBT bookmarks = compound.getList("Bookmarks", 8);
|
||||
this.loadBookmarks(bookmarks);
|
||||
|
@ -84,17 +84,17 @@ public final class PlayerData {
|
|||
}
|
||||
|
||||
public void writeToNBT(CompoundNBT compound, boolean savingToFile) {
|
||||
compound.setBoolean("BookGotten", this.bookGottenAlready);
|
||||
compound.setBoolean("DidTutorial", this.didBookTutorial);
|
||||
compound.putBoolean("BookGotten", this.bookGottenAlready);
|
||||
compound.putBoolean("DidTutorial", this.didBookTutorial);
|
||||
|
||||
compound.setBoolean("HasBatWings", this.hasBatWings);
|
||||
compound.setInteger("BatWingsFlyTime", this.batWingsFlyTime);
|
||||
compound.putBoolean("HasBatWings", this.hasBatWings);
|
||||
compound.putInt("BatWingsFlyTime", this.batWingsFlyTime);
|
||||
|
||||
compound.setTag("Bookmarks", this.saveBookmarks());
|
||||
compound.setTag("Trials", this.saveTrials());
|
||||
|
||||
if (!savingToFile) {
|
||||
compound.setBoolean("ShouldDisableWings", this.shouldDisableBatWings);
|
||||
compound.putBoolean("ShouldDisableWings", this.shouldDisableBatWings);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ package de.ellpeck.actuallyadditions.mod.entity;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.DefaultFarmerBehavior;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -50,12 +51,12 @@ public class EntityWorm extends Entity {
|
|||
|
||||
@Override
|
||||
protected void readEntityFromNBT(CompoundNBT compound) {
|
||||
this.timer = compound.getInteger("Timer");
|
||||
this.timer = compound.getInt("Timer");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(CompoundNBT compound) {
|
||||
compound.setInteger("Timer", this.timer);
|
||||
compound.putInt("Timer", this.timer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import de.ellpeck.actuallyadditions.mod.tile.FilterSettings;
|
|||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntitySpider;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.fluids;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockFluidFlowing;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public final class InitFluids {
|
||||
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockMisc;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockWildPlant;
|
||||
|
@ -28,7 +23,6 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.pattern.BlockMatcher;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -46,6 +40,10 @@ import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType
|
|||
import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class AAWorldGen implements IWorldGenerator {
|
||||
|
||||
|
@ -62,7 +60,7 @@ public class AAWorldGen implements IWorldGenerator {
|
|||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
|
||||
int dimension = world.provider.getDimension();
|
||||
if (dimension != -1 && dimension != 1) {
|
||||
if (world.getWorldType() != WorldType.FLAT && canGen(world.provider.getDimension())) {
|
||||
if (world.getWorldType() != WorldType.FLAT && this.canGen(world.provider.getDimension())) {
|
||||
this.generateDefault(world, random, chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,18 +10,12 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -35,9 +29,14 @@ import net.minecraft.world.gen.feature.WorldGenTrees;
|
|||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
import net.minecraft.world.storage.loot.ILootContainer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class WorldGenLushCaves {
|
||||
|
||||
public static final Block[] CRYSTAL_CLUSTERS = new Block[] { InitBlocks.blockCrystalClusterRedstone, InitBlocks.blockCrystalClusterLapis, InitBlocks.blockCrystalClusterDiamond, InitBlocks.blockCrystalClusterCoal, InitBlocks.blockCrystalClusterEmerald, InitBlocks.blockCrystalClusterIron };
|
||||
public static final Block[] CRYSTAL_CLUSTERS = new Block[]{InitBlocks.blockCrystalClusterRedstone, InitBlocks.blockCrystalClusterLapis, InitBlocks.blockCrystalClusterDiamond, InitBlocks.blockCrystalClusterCoal, InitBlocks.blockCrystalClusterEmerald, InitBlocks.blockCrystalClusterIron};
|
||||
|
||||
public boolean generate(World world, Random rand, BlockPos position, StructureBoundingBox blockRegion) {
|
||||
this.generateCave(world, position, rand, blockRegion);
|
||||
|
@ -145,7 +144,7 @@ public class WorldGenLushCaves {
|
|||
BlockPos pos = center.add(x, y, z);
|
||||
//Note: order matters, checkIndestructable will generate chunks if order is reversed
|
||||
if (boundingBox.isVecInside(pos) && !this.checkIndestructable(world, pos)) {
|
||||
world.setBlockToAir(pos);
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,14 +174,20 @@ public class WorldGenLushCaves {
|
|||
private boolean checkIndestructable(World world, BlockPos pos) {
|
||||
//If this isn't checked, the game crashes because it tries to destroy a chest that doesn't have any loot yet :v
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof ILootContainer) { return true; }
|
||||
if (tile instanceof ILootContainer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
BlockState state = world.getBlockState(pos);
|
||||
if (state != null) {
|
||||
Block block = state.getBlock();
|
||||
//check if it's tree or grass that is generated here
|
||||
if (block == Blocks.LOG || block == Blocks.LEAVES || block == Blocks.TALLGRASS) { return true; }
|
||||
if (block != null && (block.isAir(state, world, pos) || block.getHarvestLevel(state) >= 0F)) { return false; }
|
||||
if (block == Blocks.LOG || block == Blocks.LEAVES || block == Blocks.TALLGRASS) {
|
||||
return true;
|
||||
}
|
||||
if (block != null && (block.isAir(state, world, pos) || block.getHarvestLevel(state) >= 0F)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,13 +10,9 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen.village.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
@ -25,6 +21,9 @@ import net.minecraft.world.gen.structure.StructureBoundingBox;
|
|||
import net.minecraft.world.gen.structure.StructureComponent;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class VillageComponentCustomCropField extends StructureVillagePieces.House1 {
|
||||
|
||||
private static final int X_SIZE = 13;
|
||||
|
@ -44,14 +43,18 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
|
||||
public static VillageComponentCustomCropField buildComponent(List<StructureComponent> pieces, int p1, int p2, int p3, Direction p4) {
|
||||
StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, X_SIZE, Y_SIZE, Z_SIZE, p4);
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentCustomCropField(boundingBox, p4) : null;
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null
|
||||
? new VillageComponentCustomCropField(boundingBox, p4)
|
||||
: null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox sbb) {
|
||||
if (this.averageGroundLevel < 0) {
|
||||
this.averageGroundLevel = this.getAverageGroundLevel(world, sbb);
|
||||
if (this.averageGroundLevel < 0) { return true; }
|
||||
if (this.averageGroundLevel < 0) {
|
||||
return true;
|
||||
}
|
||||
this.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + Y_SIZE - 1, 0);
|
||||
}
|
||||
|
||||
|
@ -100,14 +103,14 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
private BlockState getRandomCropType(Random rand) {
|
||||
int randomMeta = MathHelper.getInt(rand, 1, 7);
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
return InitBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 1:
|
||||
return InitBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 2:
|
||||
return InitBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
default:
|
||||
return InitBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 0:
|
||||
return InitBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 1:
|
||||
return InitBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 2:
|
||||
return InitBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
default:
|
||||
return InitBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,20 +10,12 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen.village.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoor;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -35,6 +27,9 @@ import net.minecraft.world.gen.structure.StructureComponent;
|
|||
import net.minecraft.world.gen.structure.StructureVillagePieces;
|
||||
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class VillageComponentJamHouse extends StructureVillagePieces.House1 {
|
||||
|
||||
private static final int X_SIZE = 11;
|
||||
|
@ -54,7 +49,9 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1 {
|
|||
|
||||
public static VillageComponentJamHouse buildComponent(List<StructureComponent> pieces, int p1, int p2, int p3, Direction p4) {
|
||||
StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, X_SIZE, Y_SIZE, Z_SIZE, p4);
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentJamHouse(boundingBox, p4) : null;
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null
|
||||
? new VillageComponentJamHouse(boundingBox, p4)
|
||||
: null;
|
||||
}
|
||||
|
||||
public static boolean generateCrate(World world, StructureBoundingBox box, int x, int y, int z, ResourceLocation loot) {
|
||||
|
@ -78,7 +75,9 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1 {
|
|||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox sbb) {
|
||||
if (this.averageGroundLevel < 0) {
|
||||
this.averageGroundLevel = this.getAverageGroundLevel(world, sbb);
|
||||
if (this.averageGroundLevel < 0) { return true; }
|
||||
if (this.averageGroundLevel < 0) {
|
||||
return true;
|
||||
}
|
||||
this.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + Y_SIZE - 1, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ public class ContainerBag extends Container implements IButtonReactor {
|
|||
ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getCurrentItem());
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
this.filter.writeToNBT(compound, "Filter");
|
||||
compound.setBoolean("AutoInsert", this.autoInsert);
|
||||
compound.putBoolean("AutoInsert", this.autoInsert);
|
||||
}
|
||||
super.onContainerClosed(player);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyTags;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
|
@ -18,8 +19,8 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -66,25 +67,39 @@ public class ContainerCoffeeMachine extends Container {
|
|||
|
||||
//Slots in Inventory to shift from
|
||||
if (slot == TileEntityCoffeeMachine.SLOT_OUTPUT) {
|
||||
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); }
|
||||
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
theSlot.onSlotChange(newStack, currentStack);
|
||||
}
|
||||
//Other Slots in Inventory excluded
|
||||
else if (slot >= inventoryStart) {
|
||||
//Shift from Inventory
|
||||
if (newStack.getItem() == InitItems.itemMisc && newStack.getItemDamage() == TheMiscItems.CUP.ordinal()) {
|
||||
if (!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_INPUT, TileEntityCoffeeMachine.SLOT_INPUT + 1, false)) { return StackUtil.getEmpty(); }
|
||||
if (!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_INPUT, TileEntityCoffeeMachine.SLOT_INPUT + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
} else if (ItemCoffee.getIngredientFromStack(newStack) != null) {
|
||||
if (!this.mergeItemStack(newStack, 3, 11, false)) { return StackUtil.getEmpty(); }
|
||||
} else if (TileEntityCoffeeMachine.COFFEE.apply(newStack)) {
|
||||
if (!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS + 1, false)) { return StackUtil.getEmpty(); }
|
||||
if (!this.mergeItemStack(newStack, 3, 11, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
} else if (ActuallyTags.Items.COFFEE_BEANS.contains(newStack.getItem())) {
|
||||
if (!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
else if (slot >= inventoryStart && slot <= inventoryEnd) {
|
||||
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
|
||||
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
|
||||
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
||||
if (!StackUtil.isValid(newStack)) {
|
||||
theSlot.putStack(StackUtil.getEmpty());
|
||||
|
@ -92,7 +107,9 @@ public class ContainerCoffeeMachine extends Container {
|
|||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
|
||||
if (newStack.getCount() == currentStack.getCount()) {
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
theSlot.onTake(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -71,7 +71,7 @@ public class GuiBag extends GuiWtfMojang {
|
|||
data.setInteger("ButtonID", button.id);
|
||||
data.setInteger("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||
data.setInteger("WorldID", Minecraft.getInstance().world.provider.getDimension());
|
||||
PacketHandler.theNetwork.sendToServer(new PacketClientToServer(data, PacketHandler.GUI_BUTTON_TO_CONTAINER_HANDLER));
|
||||
PacketHandler.THE_NETWORK.sendToServer(new PacketClientToServer(data, PacketHandler.GUI_BUTTON_TO_CONTAINER_HANDLER));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -114,13 +114,13 @@ public class GuiSmileyCloud extends GuiWtfMojang {
|
|||
|
||||
private void sendPacket(String text, int textID) {
|
||||
CompoundNBT compound = new CompoundNBT();
|
||||
compound.setInteger("X", this.x);
|
||||
compound.setInteger("Y", this.y);
|
||||
compound.setInteger("Z", this.z);
|
||||
compound.setInteger("WorldID", this.world.provider.getDimension());
|
||||
compound.setInteger("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||
compound.setInteger("TextID", textID);
|
||||
compound.putInt("X", this.x);
|
||||
compound.putInt("Y", this.y);
|
||||
compound.putInt("Z", this.z);
|
||||
compound.putInt("WorldID", this.world.provider.getDimension());
|
||||
compound.putInt("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||
compound.putInt("TextID", textID);
|
||||
compound.setString("Text", text);
|
||||
PacketHandler.theNetwork.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_STRING_TO_TILE_HANDLER));
|
||||
PacketHandler.THE_NETWORK.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_STRING_TO_TILE_HANDLER));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items;
|
|||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemArmorAA;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodSeed;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemHoeAA;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemSeed;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemSwordAA;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.*;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
|
||||
|
@ -41,6 +37,8 @@ public final class InitItems {
|
|||
public static Item itemBooklet;
|
||||
public static Item itemFertilizer;
|
||||
public static Item itemMisc;
|
||||
public static Item itemCanola;
|
||||
public static Item itemCoffeeCup;
|
||||
public static Item itemFoods;
|
||||
public static Item itemJams;
|
||||
public static Item itemKnife;
|
||||
|
|
|
@ -17,21 +17,19 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
|
|||
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.renderer.color.IItemColor;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IRarity;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
|
|
@ -10,20 +10,18 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.IRarity;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemAxeAA extends ItemToolAA {
|
||||
|
||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE);
|
||||
|
@ -41,7 +39,9 @@ public class ItemAxeAA extends ItemToolAA {
|
|||
@Override
|
||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||
Material material = state.getMaterial();
|
||||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getDestroySpeed(stack, state) : this.efficiency;
|
||||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE
|
||||
? super.getDestroySpeed(stack, state)
|
||||
: this.efficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
|
@ -28,14 +27,13 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
|
|
@ -14,14 +14,13 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -23,30 +23,24 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Enchantments;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumFacing.Axis;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ItemDrillUpgrade extends ItemBase {
|
|||
public static int getSlotToPlaceFrom(ItemStack stack) {
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
if (compound != null) {
|
||||
return compound.getInteger("SlotToPlaceFrom") - 1;
|
||||
return compound.getInt("SlotToPlaceFrom") - 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class ItemDrillUpgrade extends ItemBase {
|
|||
compound = new CompoundNBT();
|
||||
}
|
||||
|
||||
compound.setInteger("SlotToPlaceFrom", slot + 1);
|
||||
compound.putInt("SlotToPlaceFrom", slot + 1);
|
||||
|
||||
stack.setTagCompound(compound);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
|||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -25,8 +24,8 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -95,10 +94,10 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
}
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
|
||||
if (compound.getInteger("CurrX") == 0 && compound.getInteger("CurrY") == 0 && compound.getInteger("CurrZ") == 0) {
|
||||
compound.setInteger("FirstX", pos.getX());
|
||||
compound.setInteger("FirstY", pos.getY());
|
||||
compound.setInteger("FirstZ", pos.getZ());
|
||||
if (compound.getInt("CurrX") == 0 && compound.getInt("CurrY") == 0 && compound.getInt("CurrZ") == 0) {
|
||||
compound.putInt("FirstX", pos.getX());
|
||||
compound.putInt("FirstY", pos.getY());
|
||||
compound.putInt("FirstZ", pos.getZ());
|
||||
|
||||
player.setActiveHand(hand);
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
@ -121,9 +120,9 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
CompoundNBT compound = stack.getTagCompound();
|
||||
|
||||
BlockPos pos = result.getBlockPos();
|
||||
compound.setInteger("SecondX", pos.getX());
|
||||
compound.setInteger("SecondY", pos.getY());
|
||||
compound.setInteger("SecondZ", pos.getZ());
|
||||
compound.putInt("SecondX", pos.getX());
|
||||
compound.putInt("SecondY", pos.getY());
|
||||
compound.putInt("SecondZ", pos.getZ());
|
||||
|
||||
clear = false;
|
||||
}
|
||||
|
@ -151,8 +150,8 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
|
||||
BlockPos firstPos = new BlockPos(compound.getInteger("FirstX"), compound.getInteger("FirstY"), compound.getInteger("FirstZ"));
|
||||
BlockPos secondPos = new BlockPos(compound.getInteger("SecondX"), compound.getInteger("SecondY"), compound.getInteger("SecondZ"));
|
||||
BlockPos firstPos = new BlockPos(compound.getInt("FirstX"), compound.getInt("FirstY"), compound.getInt("FirstZ"));
|
||||
BlockPos secondPos = new BlockPos(compound.getInt("SecondX"), compound.getInt("SecondY"), compound.getInt("SecondZ"));
|
||||
|
||||
if (!BlockPos.ORIGIN.equals(firstPos) && !BlockPos.ORIGIN.equals(secondPos)) {
|
||||
int energyUse = 1500;
|
||||
|
@ -164,9 +163,9 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
int lowestY = Math.min(firstPos.getY(), secondPos.getY());
|
||||
int lowestZ = Math.min(firstPos.getZ(), secondPos.getZ());
|
||||
|
||||
int currX = compound.getInteger("CurrX");
|
||||
int currY = compound.getInteger("CurrY");
|
||||
int currZ = compound.getInteger("CurrZ");
|
||||
int currX = compound.getInt("CurrX");
|
||||
int currY = compound.getInt("CurrY");
|
||||
int currZ = compound.getInt("CurrZ");
|
||||
|
||||
BlockPos pos = new BlockPos(lowestX + currX, lowestY + currY, lowestZ + currZ);
|
||||
BlockState state = world.getBlockState(pos);
|
||||
|
@ -204,9 +203,9 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
}
|
||||
|
||||
if (!shouldClear) {
|
||||
compound.setInteger("CurrX", currX);
|
||||
compound.setInteger("CurrY", currY);
|
||||
compound.setInteger("CurrZ", currZ);
|
||||
compound.putInt("CurrX", currX);
|
||||
compound.putInt("CurrY", currY);
|
||||
compound.putInt("CurrZ", currZ);
|
||||
}
|
||||
} else {
|
||||
shouldClear = true;
|
||||
|
|
|
@ -10,15 +10,11 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -28,6 +24,9 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemGrowthRing extends ItemEnergy {
|
||||
|
||||
public ItemGrowthRing(String name) {
|
||||
|
@ -36,7 +35,9 @@ public class ItemGrowthRing extends ItemEnergy {
|
|||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
|
||||
if (!(entity instanceof PlayerEntity) || world.isRemote || entity.isSneaking()) { return; }
|
||||
if (!(entity instanceof PlayerEntity) || world.isRemote || entity.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerEntity player = (PlayerEntity) entity;
|
||||
ItemStack equipped = player.getHeldItemMainhand();
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem;
|
|||
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
|
@ -128,7 +127,7 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem {
|
|||
world.playEvent(2001, theCoord, Block.getStateId(theState));
|
||||
|
||||
//Deletes the Block
|
||||
world.setBlockToAir(theCoord);
|
||||
world.setBlockState(theCoord, Blocks.AIR.getDefaultState());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
|||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -27,7 +26,6 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraftforge.common.IRarity;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
public class ItemMisc extends ItemBase {
|
||||
|
@ -46,12 +44,16 @@ public class ItemMisc extends ItemBase {
|
|||
|
||||
@Override
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return stack.getItemDamage() >= ALL_MISC_ITEMS.length ? StringUtil.BUGGED_ITEM_NAME : this.getTranslationKey() + "_" + ALL_MISC_ITEMS[stack.getItemDamage()].name;
|
||||
return stack.getItemDamage() >= ALL_MISC_ITEMS.length
|
||||
? StringUtil.BUGGED_ITEM_NAME
|
||||
: this.getTranslationKey() + "_" + ALL_MISC_ITEMS[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRarity getForgeRarity(ItemStack stack) {
|
||||
return stack.getItemDamage() >= ALL_MISC_ITEMS.length ? EnumRarity.COMMON : ALL_MISC_ITEMS[stack.getItemDamage()].rarity;
|
||||
return stack.getItemDamage() >= ALL_MISC_ITEMS.length
|
||||
? EnumRarity.COMMON
|
||||
: ALL_MISC_ITEMS[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,9 +89,13 @@ public class ItemMisc extends ItemBase {
|
|||
|
||||
if (block instanceof IFluidBlock && block.getMetaFromState(state) == 0) {
|
||||
Fluid fluid = ((IFluidBlock) block).getFluid();
|
||||
if (fluid != null && fluid == (isEmpowered ? InitFluids.fluidCrystalOil : InitFluids.fluidRefinedCanolaOil)) {
|
||||
if (fluid != null && fluid == (isEmpowered
|
||||
? InitFluids.fluidCrystalOil
|
||||
: InitFluids.fluidRefinedCanolaOil)) {
|
||||
entity.setDead();
|
||||
entity.world.setBlockState(pos, (isEmpowered ? InitFluids.blockEmpoweredOil : InitFluids.blockCrystalOil).getDefaultState());
|
||||
entity.world.setBlockState(pos, (isEmpowered
|
||||
? InitFluids.blockEmpoweredOil
|
||||
: InitFluids.blockCrystalOil).getDefaultState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,9 +114,15 @@ public class ItemMisc extends ItemBase {
|
|||
public int getItemBurnTime(ItemStack stack) {
|
||||
int k = stack.getMetadata();
|
||||
|
||||
if (k == TheMiscItems.TINY_CHAR.ordinal()) return 200;
|
||||
if (k == TheMiscItems.TINY_COAL.ordinal()) return 200;
|
||||
if (k == TheMiscItems.BIOCOAL.ordinal()) return 800;
|
||||
if (k == TheMiscItems.TINY_CHAR.ordinal()) {
|
||||
return 200;
|
||||
}
|
||||
if (k == TheMiscItems.TINY_COAL.ordinal()) {
|
||||
return 200;
|
||||
}
|
||||
if (k == TheMiscItems.BIOCOAL.ordinal()) {
|
||||
return 800;
|
||||
}
|
||||
|
||||
return super.getItemBurnTime(stack);
|
||||
}
|
||||
|
|
|
@ -10,20 +10,18 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.IRarity;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemPickaxeAA extends ItemToolAA {
|
||||
|
||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.DOUBLE_STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE);
|
||||
|
@ -75,7 +73,9 @@ public class ItemPickaxeAA extends ItemToolAA {
|
|||
@Override
|
||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||
Material material = state.getMaterial();
|
||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getDestroySpeed(stack, state) : this.efficiency;
|
||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK
|
||||
? super.getDestroySpeed(stack, state)
|
||||
: this.efficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,14 +13,13 @@ package de.ellpeck.actuallyadditions.mod.items;
|
|||
import com.google.common.collect.Sets;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ItemSolidifiedExperience extends ItemBase {
|
|||
|
||||
if (ConfigBoolValues.SOLID_XP_ALWAYS_ORBS.currentValue || player instanceof FakePlayer) {
|
||||
EntityXPOrb orb = new EntityXPOrb(world, player.posX + 0.5, player.posY + 0.5, player.posZ + 0.5, amount);
|
||||
orb.getEntityData().setBoolean(ActuallyAdditions.MODID + "FromSolidified", true);
|
||||
orb.getEntityData().putBoolean(ActuallyAdditions.MODID + "FromSolidified", true);
|
||||
world.spawnEntity(orb);
|
||||
} else {
|
||||
player.addExperience(amount);
|
||||
|
|
|
@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
|
|||
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -25,8 +24,8 @@ import net.minecraft.nbt.CompoundNBT;
|
|||
import net.minecraft.tileentity.MobSpawnerBaseLogic;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -129,8 +128,8 @@ public class ItemWaterBowl extends ItemBase {
|
|||
|
||||
if (stack.hasTagCompound()) {
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
lastX = compound.getInteger("lastX");
|
||||
lastY = compound.getInteger("lastY");
|
||||
lastX = compound.getInt("lastX");
|
||||
lastY = compound.getInt("lastY");
|
||||
}
|
||||
|
||||
boolean change = false;
|
||||
|
@ -152,8 +151,8 @@ public class ItemWaterBowl extends ItemBase {
|
|||
}
|
||||
|
||||
CompoundNBT compound = stack.getTagCompound();
|
||||
compound.setInteger("lastX", (int) entity.posX);
|
||||
compound.setInteger("lastY", (int) entity.posY);
|
||||
compound.putInt("lastX", (int) entity.posX);
|
||||
compound.putInt("lastY", (int) entity.posY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,9 @@ public class ItemWaterRemovalRing extends ItemEnergy {
|
|||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
|
||||
if (!(entity instanceof PlayerEntity) || world.isRemote || entity.isSneaking()) { return; }
|
||||
if (!(entity instanceof PlayerEntity) || world.isRemote || entity.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerEntity player = (PlayerEntity) entity;
|
||||
ItemStack equipped = player.getHeldItemMainhand();
|
||||
|
@ -51,7 +53,7 @@ public class ItemWaterRemovalRing extends ItemEnergy {
|
|||
BlockPos pos = new BlockPos(theX, theY, theZ);
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
if ((block == Blocks.WATER || block == Blocks.FLOWING_WATER) && this.getEnergyStored(stack) >= energyUse) {
|
||||
world.setBlockToAir(pos);
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
this.extractEnergyInternal(stack, energyUse, false);
|
||||
|
@ -59,7 +61,7 @@ public class ItemWaterRemovalRing extends ItemEnergy {
|
|||
}
|
||||
//Remove Lava
|
||||
else if ((block == Blocks.LAVA || block == Blocks.FLOWING_LAVA) && this.getEnergyStored(stack) >= energyUse * 2) {
|
||||
world.setBlockToAir(pos);
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
this.extractEnergyInternal(stack, energyUse * 2, false);
|
||||
|
|
|
@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
|||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.passive.EntityBat;
|
||||
|
@ -49,11 +48,14 @@ public class ItemWingsOfTheBats extends ItemBase {
|
|||
* Checks if the Player has Wings in its Inventory
|
||||
*
|
||||
* @param player The Player
|
||||
*
|
||||
* @return The Wings
|
||||
*/
|
||||
public static ItemStack getWingItem(PlayerEntity player) {
|
||||
for (int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
if (StackUtil.isValid(player.inventory.getStackInSlot(i)) && player.inventory.getStackInSlot(i).getItem() instanceof ItemWingsOfTheBats) { return player.inventory.getStackInSlot(i); }
|
||||
if (StackUtil.isValid(player.inventory.getStackInSlot(i)) && player.inventory.getStackInSlot(i).getItem() instanceof ItemWingsOfTheBats) {
|
||||
return player.inventory.getStackInSlot(i);
|
||||
}
|
||||
}
|
||||
return StackUtil.getEmpty();
|
||||
}
|
||||
|
|
|
@ -15,15 +15,14 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
|||
import de.ellpeck.actuallyadditions.mod.entity.EntityWorm;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -34,7 +33,6 @@ import net.minecraftforge.event.entity.player.UseHoeEvent;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
|
@ -10,17 +10,12 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items.lens;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -32,22 +27,26 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
public class LensColor extends Lens {
|
||||
|
||||
public static final int ENERGY_USE = 200;
|
||||
//Thanks to xdjackiexd for this, as I couldn't be bothered
|
||||
public static final float[][] POSSIBLE_COLORS = { { 158F, 43F, 39F }, //Red
|
||||
{ 234F, 126F, 53F }, //Orange
|
||||
{ 194F, 181F, 28F }, //Yellow
|
||||
{ 57F, 186F, 46F }, //Lime Green
|
||||
{ 54F, 75F, 24F }, //Green
|
||||
{ 99F, 135F, 210F }, //Light Blue
|
||||
{ 38F, 113F, 145F }, //Cyan
|
||||
{ 37F, 49F, 147F }, //Blue
|
||||
{ 126F, 52F, 191F }, //Purple
|
||||
{ 190F, 73F, 201F }, //Magenta
|
||||
{ 217F, 129F, 153F }, //Pink
|
||||
{ 86F, 51F, 28F }, //Brown
|
||||
public static final float[][] POSSIBLE_COLORS = {{158F, 43F, 39F}, //Red
|
||||
{234F, 126F, 53F}, //Orange
|
||||
{194F, 181F, 28F}, //Yellow
|
||||
{57F, 186F, 46F}, //Lime Green
|
||||
{54F, 75F, 24F}, //Green
|
||||
{99F, 135F, 210F}, //Light Blue
|
||||
{38F, 113F, 145F}, //Cyan
|
||||
{37F, 49F, 147F}, //Blue
|
||||
{126F, 52F, 191F}, //Purple
|
||||
{190F, 73F, 201F}, //Magenta
|
||||
{217F, 129F, 153F}, //Pink
|
||||
{86F, 51F, 28F}, //Brown
|
||||
};
|
||||
private final Random rand = new Random();
|
||||
|
||||
|
@ -89,7 +88,9 @@ public class LensColor extends Lens {
|
|||
if (StackUtil.isValid(stack)) {
|
||||
Item item = stack.getItem();
|
||||
for (Map.Entry<Item, IColorLensChanger> changer : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_COLOR_CHANGERS.entrySet()) {
|
||||
if (item == changer.getKey()) { return changer.getValue().modifyItem(stack, hitState, hitBlock, tile); }
|
||||
if (item == changer.getKey()) {
|
||||
return changer.getValue().modifyItem(stack, hitState, hitBlock, tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
|
@ -98,7 +99,7 @@ public class LensColor extends Lens {
|
|||
@Override
|
||||
public float[] getColor() {
|
||||
float[] colors = POSSIBLE_COLORS[this.rand.nextInt(POSSIBLE_COLORS.length)];
|
||||
return new float[] { colors[0] / 255F, colors[1] / 255F, colors[2] / 255F };
|
||||
return new float[]{colors[0] / 255F, colors[1] / 255F, colors[2] / 255F};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,16 +10,15 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items.lens;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DamageSources;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LensDeath extends Lens {
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +46,7 @@ public class LensDeath extends Lens {
|
|||
|
||||
@Override
|
||||
public float[] getColor() {
|
||||
return new float[] { 188F / 255F, 222F / 255F, 1F };
|
||||
return new float[]{188F / 255F, 222F / 255F, 1F};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue