pushing progress...

This commit is contained in:
Flanks255 2021-12-30 11:30:01 -06:00
parent 5f1c68f31f
commit 0e48b0444d
48 changed files with 150 additions and 91 deletions

View file

@ -7,7 +7,7 @@ mod_version=1.1.52
# Forge
game_version=1.16.5
forge_version=36.2.2
forge_version=36.2.8
# Parchment (Mappings)
parchment_version=2021.10.17

View file

@ -251,9 +251,9 @@ ea2f5b2bf99670f4df05889ab67c73686a26a58b assets/actuallyadditions/models/item/bl
be227e074a54982e1e9f9f304e63df3095006955 assets/actuallyadditions/models/item/black_quartz_wall.json
3679056a9aee03821a997a2616b8808af7bfe4b7 assets/actuallyadditions/models/item/breaker.json
f3282e55e71d26a32cee1287881ac2d5e91c30a8 assets/actuallyadditions/models/item/canola.json
e4b8fbed9602c0cf96eff84111586799412982fc assets/actuallyadditions/models/item/canola_oil_bucket.json
08c70d561c219bb4c6d21b5f56192df81f054e0a assets/actuallyadditions/models/item/canola_press.json
0507025fadef30e363cbc825265576c782880f7b assets/actuallyadditions/models/item/canola_seeds.json
b0f7c3915b646ccd27ca6ff40517e19e2a0fb7ef assets/actuallyadditions/models/item/canolaoil.json
83b47876ba2c85d3ba83e36ee9b02a8d458f7230 assets/actuallyadditions/models/item/charcoal_block.json
36179c5cc77dc38364a1931f2fabbf846ef9c39d assets/actuallyadditions/models/item/chiseled_black_quartz_block.json
27c8ed9e39b600161a6a327db0ac53e10acc13bb assets/actuallyadditions/models/item/chiseled_black_quartz_slab.json
@ -269,7 +269,6 @@ bbf723238f6536295339f0b0b5b052cf89b92d5b assets/actuallyadditions/models/item/co
1e7e61701473dbf3dfc18bb5b9fa7be91b443dd8 assets/actuallyadditions/models/item/crusher.json
aeacd7ca465c19d6cbcef25e61023397c4472ab3 assets/actuallyadditions/models/item/crusher_double.json
3a9cfcb0a3bec43f6556b3bdab09731758a36cc2 assets/actuallyadditions/models/item/crystallized_canola_seed.json
da3b2fa50416d61d8b3683ee74f9572b36f4fea3 assets/actuallyadditions/models/item/crystaloil.json
ec0cdeb022c4e0bc43c0fd5d3e3e758361f7ebe2 assets/actuallyadditions/models/item/diamatine_aiot.json
9e7e70f1efd1fdc83d78d0526657c229acf7293d assets/actuallyadditions/models/item/diamatine_axe.json
04cc1e040d286dbf4e8b828b52a76829ed51e14a assets/actuallyadditions/models/item/diamatine_boots.json
@ -342,7 +341,6 @@ d019c764e87de9f1856dc8d12b880d874e215fac assets/actuallyadditions/models/item/em
f7c65e8d77b723f4fd5b7349c7f8ec23f2e6440b assets/actuallyadditions/models/item/empowered_restonia_crystal_block.json
9b80be9493b12d8a5c05469055204128df718901 assets/actuallyadditions/models/item/empowered_void_crystal.json
c70272562c084ce2a04933ca04e270f9b3493cf4 assets/actuallyadditions/models/item/empowered_void_crystal_block.json
485a85b7176f60fce7286293767107c51649e488 assets/actuallyadditions/models/item/empoweredoil.json
88457aa73c273fb512b5c4103a1183e93dcec412 assets/actuallyadditions/models/item/empowerer.json
8c5fb751f1795df8cec1100368b153ab02d003d4 assets/actuallyadditions/models/item/empty_cup.json
0d0fd6b7df3a378a58cd35168fb0e1c3d54c6b03 assets/actuallyadditions/models/item/ender_casing.json
@ -433,7 +431,6 @@ a1da5a212c8f8454a1e632e083986fc86cbe8de7 assets/actuallyadditions/models/item/le
3247178d5c1350c2a93e544687c12a88cf28a363 assets/actuallyadditions/models/item/lens_of_the_miner.json
55ce74cb71c0db54712382cd61f2c27214201c94 assets/actuallyadditions/models/item/long_range_breaker.json
abf136ca89e5d896fd9ae6f89d0113d5793b3b1c assets/actuallyadditions/models/item/netherite_aiot.json
cec09548b75f7f3e2079e75e1aaf5253e2f318ba assets/actuallyadditions/models/item/oil_generator.json
0dc90f8c2d8cc17f4859d196c4ab22caf52e7bd1 assets/actuallyadditions/models/item/palis_aiot.json
8a77539480881e4fa9ea005fc3aedf2d1cb96591 assets/actuallyadditions/models/item/palis_axe.json
29f970ca565c5c644753d5620e7067d4be4dbfaf assets/actuallyadditions/models/item/palis_boots.json
@ -474,7 +471,6 @@ af0512cfb813e6fb43bb920db3eb1f1c2976ace6 assets/actuallyadditions/models/item/qu
bb0fbcacce026c672b8d98db22694fd2b6eefb20 assets/actuallyadditions/models/item/quartz_sword.json
7f7a44a1afcbfbe63bc55be016a81dc265515b24 assets/actuallyadditions/models/item/quintuple_battery.json
d8cf56e92afa1ea98eead8af208cc6281c815ede assets/actuallyadditions/models/item/ranged_collector.json
12b62d8ed574812fb48d32e416b3c9f4ebf70ec8 assets/actuallyadditions/models/item/refinedcanolaoil.json
a607d6e415c04d4aa4128446c3dbb40b9aafc5d5 assets/actuallyadditions/models/item/resonant_rice.json
68d8873d46bfbe65112f29bc4b1159e586d6705f assets/actuallyadditions/models/item/restonia_aiot.json
5300d3a0ece8b26a0bc0631df9151bebaef8a1b9 assets/actuallyadditions/models/item/restonia_axe.json
@ -710,9 +706,13 @@ a63b57c27d8548ddd13d64d18b098d4f5c127a30 data/actuallyadditions/recipes/restonia
85d2537a973d520c9eaaf2f15109c265faa2df3a data/actuallyadditions/recipes/rice_slime_potion.json
d4ca5d77d16ff6fdfc60e665694fdd97bce25463 data/actuallyadditions/recipes/shock_suppressor.json
655fab699bb97ec252deb61d91fbef6f4738fe1c data/actuallyadditions/recipes/single_battery.json
cc4cd7379a8de3372d2a8310ea576bf5ca08c20e data/actuallyadditions/recipes/solid_fuel/charcoal-block.json
8cb9b0e94a5de6e0bb74d808207ddf041d444280 data/actuallyadditions/recipes/solid_fuel/charcoal.json
1207208a8393f613e537cb4542e1766a837282e4 data/actuallyadditions/recipes/solid_fuel/coal-block.json
3a4c2b0ca2e150ef24edb2defe018f6574cb4827 data/actuallyadditions/recipes/solid_fuel/coal.json
9d2105a32a4781f3fd10a70f97ba243b1c0ceb34 data/actuallyadditions/recipes/solid_fuel/stick.json
a7488a05a2fbc4e4017a4b7769f65ff8ce48613a data/actuallyadditions/recipes/solid_fuel/lava.json
5bf07f52f8a4b7734a800dc64e5759caf48257b9 data/actuallyadditions/recipes/solid_fuel/stick.json
1234e59cf88f96ae64032ce6bb0c734dc8870471 data/actuallyadditions/recipes/solid_fuel/tiny-coal.json
8ebd738f3968564e22ba6841eb821e5064c78588 data/actuallyadditions/recipes/stone_aiot.json
bc7a41d9f36cc43e146e0b727b6f439cc0d29343 data/actuallyadditions/recipes/teleport_staff.json
bdf7dbf563485903e444400d341e56d0bf308481 data/actuallyadditions/recipes/tiny_torch.json

View file

@ -1,3 +0,0 @@
{
"parent": "actuallyadditions:block/canolaoil"
}

View file

@ -1,3 +0,0 @@
{
"parent": "actuallyadditions:block/crystaloil"
}

View file

@ -1,3 +0,0 @@
{
"parent": "actuallyadditions:block/empoweredoil"
}

View file

@ -1,3 +0,0 @@
{
"parent": "actuallyadditions:block/oil_generator"
}

View file

@ -1,3 +0,0 @@
{
"parent": "actuallyadditions:block/refinedcanolaoil"
}

View file

@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.data;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import net.minecraft.block.Block;
import net.minecraft.block.SlabBlock;
import net.minecraft.block.StairsBlock;
@ -164,7 +165,6 @@ public class BlockStateGenerator extends BlockStateProvider {
slabBlock((SlabBlock) ActuallyBlocks.BLACK_QUARTZ_BRICK_SLAB.get(), modLoc("block/black_quartz_brick_block"), modLoc("block/black_quartz_brick_block"));
slabBlock((SlabBlock) ActuallyBlocks.ETHETIC_GREEN_SLAB.get(), modLoc("block/ethetic_green_block"), modLoc("block/ethetic_green_block"));
slabBlock((SlabBlock) ActuallyBlocks.ETHETIC_WHITE_SLAB.get(), modLoc("block/ethetic_white_block"), modLoc("block/ethetic_white_block"));
}

View file

@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.data;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
import net.minecraft.block.Block;
import net.minecraft.block.WallBlock;
@ -10,6 +11,7 @@ import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.generators.ItemModelProvider;
import net.minecraftforge.client.model.generators.ModelFile;
import net.minecraftforge.client.model.generators.loaders.DynamicBucketModelBuilder;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.fml.RegistryObject;
@ -36,7 +38,10 @@ public class ItemModelGenerator extends ItemModelProvider {
// Blocks
ActuallyBlocks.BLOCKS.getEntries().forEach(this::registerBlockModel);
ActuallyBlocks.BLOCKS.getEntries().stream().filter(b -> !b.get().getRegistryName().getPath().contains("oil")).forEach(this::registerBlockModel);
withExistingParent(InitFluids.CANOLA_OIL.getBucket().getRegistryName().getPath(), "forge:item/bucket")
.customLoader((builder, template) -> DynamicBucketModelBuilder.begin(builder, template).fluid(InitFluids.CANOLA_OIL.get()));
}
private void registerBlockModel(RegistryObject<Block> block) {

View file

@ -1,8 +1,12 @@
package de.ellpeck.actuallyadditions.data;
import com.google.gson.JsonObject;
import de.ellpeck.actuallyadditions.api.ActuallyTags;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe;
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
import de.ellpeck.actuallyadditions.mod.items.base.ActuallyItem;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.DirectoryCache;
import net.minecraft.data.IFinishedRecipe;
@ -13,6 +17,7 @@ import net.minecraft.item.crafting.Ingredient;
import net.minecraft.tags.ITag;
import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnull;
import java.nio.file.Path;
import java.util.function.Consumer;
@ -22,15 +27,19 @@ public class SolidFuelGenerator extends RecipeProvider {
}
@Override
protected void saveAdvancement(DirectoryCache pCache, JsonObject pAdvancementJson, Path pPath) {
protected void saveAdvancement(@Nonnull DirectoryCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) {
//Nah
}
@Override
protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
protected void buildShapelessRecipes(@Nonnull Consumer<IFinishedRecipe> consumer) {
addFuel(consumer, "coal", Items.COAL, 48000, 1600);
addFuel(consumer, "stick", Items.STICK, 1000, 200); //TEST
addFuel(consumer, "stick", Items.STICK, 3000, 100);
addFuel(consumer, "tiny-coal", ActuallyTags.Items.TINY_COALS, 6000, 200);
addFuel(consumer, "charcoal", Items.CHARCOAL, 48000, 1600);
addFuel(consumer, "coal-block", Items.COAL_BLOCK, 480000, 16000);
addFuel(consumer, "charcoal-block", ActuallyBlocks.CHARCOAL_BLOCK.getItem(), 480000, 16000);
addFuel(consumer, "lava", Items.LAVA_BUCKET, 600000, 20000);
}
private void addFuel(Consumer<IFinishedRecipe> consumer, String name, Item item, int energy, int burnTime) {
@ -39,7 +48,7 @@ public class SolidFuelGenerator extends RecipeProvider {
private void addFuel(Consumer<IFinishedRecipe> consumer, String name, Ingredient item, int energy, int burnTime) {
consumer.accept(new SolidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), item, energy, burnTime));
}
private void addFuel(Consumer<IFinishedRecipe> consumer, String name, ITag tag, int energy, int burnTime) {
private void addFuel(Consumer<IFinishedRecipe> consumer, String name, ITag<Item> tag, int energy, int burnTime) {
consumer.accept(new SolidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), Ingredient.of(tag), energy, burnTime));
}
}

View file

@ -42,6 +42,8 @@ import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.AddReloadListenerEvent;
@ -76,6 +78,7 @@ public class ActuallyAdditions {
// public static final boolean DEOBF = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
public static final ItemGroup GROUP = new ItemGroup(MODID) {
@OnlyIn(Dist.CLIENT)
@Override
public ItemStack makeIcon() {
return new ItemStack(ActuallyItems.ITEM_BOOKLET.get());

View file

@ -47,13 +47,19 @@ public class BlockCrusher extends BlockContainerBase {
this.registerDefaultState(getStateDefinition().any().setValue(HORIZONTAL_FACING, Direction.NORTH).setValue(LIT, false));
}
//@Override
public TileEntity newBlockEntity(IBlockReader worldIn) {
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return this.isDouble
? new TileEntityCrusherDouble()
: new TileEntityCrusher();
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (state.getValue(BlockStateProperties.LIT)) {

View file

@ -90,8 +90,8 @@ public class CommonConfig {
ELEVEN = BUILDER.comment("11?").defineInRange("whatIs11", 11, 0, 12);
REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", Items.REDSTONE_TORCH.getRegistryName().toString(), obj -> obj instanceof String && ResourceLocation.isValidResourceLocation((String) obj));
RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", Items.COMPASS.getRegistryName().toString(), obj -> obj instanceof String && ResourceLocation.isValidResourceLocation((String) obj));
REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", Items.REDSTONE_TORCH.getRegistryName().toString(), obj -> obj instanceof String);
RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", Items.COMPASS.getRegistryName().toString(), obj -> obj instanceof String);
BUILDER.pop();
}

View file

@ -48,10 +48,14 @@ public class CrushingRecipe implements IRecipe<IInventory> {
}
@Override
public boolean matches(IInventory pInv, @Nonnull World pLevel) {
public boolean matches(IInventory pInv, World pLevel) {
return input.test(pInv.getItem(0));
}
public boolean matches (ItemStack stack) {
return input.test(stack);
}
@Override
@Nonnull
public ItemStack assemble(@Nonnull IInventory pInv) {

View file

@ -37,10 +37,14 @@ public class SolidFuelRecipe implements IRecipe<SingleItem> {
}
@Override
public boolean matches(SingleItem pInv, @Nullable World pLevel) {
public boolean matches(SingleItem pInv, World pLevel) {
return itemIngredient.test(pInv.getItem());
}
public boolean matches(ItemStack stack) {
return this.itemIngredient.test(stack);
}
@Override
public ItemStack assemble(SingleItem pInv) {
return ItemStack.EMPTY;

View file

@ -21,10 +21,10 @@ public final class InitFluids {
public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, ActuallyAdditions.MODID);
public static final DeferredRegister<Block> FLUID_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
public static final FluidAA CANOLA_OIL = new FluidAA("canolaoil", "canolaoil");
public static final FluidAA REFINED_CANOLA_OIL = new FluidAA("refinedcanolaoil", "refinedcanolaoil");
public static final FluidAA CRYSTALIZED_OIL = new FluidAA("crystaloil", "crystaloil");
public static final FluidAA EMPOWERED_OIL = new FluidAA("empoweredoil", "empoweredoil");
public static final FluidAA CANOLA_OIL = new FluidAA("canola_oil", "canola_oil");
public static final FluidAA REFINED_CANOLA_OIL = new FluidAA("refined_canola_oil", "refined_canola_oil");
public static final FluidAA CRYSTALIZED_OIL = new FluidAA("crystal_oil", "crystal_oil");
public static final FluidAA EMPOWERED_OIL = new FluidAA("empowered_oil", "empowered_oil");
public static void init(IEventBus bus) {

View file

@ -58,6 +58,9 @@ public class CrusherScreen extends AAScreen<CrusherContainer> {
this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, new StringTextComponent("S"), (button) -> actionPerformed(0));
this.addButton(this.buttonAutoSplit);
}
titleLabelX = (int) (imageWidth / 2.0f - font.width(title) / 2.0f);
titleLabelY = -10;
}
protected void actionPerformed(int id) {
@ -88,11 +91,6 @@ public class CrusherScreen extends AAScreen<CrusherContainer> {
}
}
@Override
public void renderLabels(@Nonnull MatrixStack matrices, int x, int y) {
AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, this.tileGrinder);
}
@Override
public void renderBg(MatrixStack matrices, float f, int x, int y) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -24,6 +24,7 @@ import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTier;
import net.minecraft.item.Items;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
@ -95,7 +96,7 @@ public final class ActuallyItems {
public static final RegistryObject<Item> ENGINEERS_GOGGLES = ITEMS.register("engineers_goggles", () -> new ItemEngineerGoggles(false));
public static final RegistryObject<Item> LASER_UPGRADE_RANGE = ITEMS.register("laser_upgrade_range", ItemBase::new);
public static final RegistryObject<Item> LASER_UPGRADE_INVISIBILITY = ITEMS.register("laser_upgrade_invisibility", ItemBase::new);
public static final RegistryObject<Item> HANDHELD_FILLER = ITEMS.register("handheld_filler", ItemFillingWand::new);
public static final Supplier<Item> HANDHELD_FILLER = ITEMS.register("handheld_filler", ItemFillingWand::new);
public static final RegistryObject<Item> TRAVELERS_SACK = ITEMS.register("travelers_sack", () -> new ItemBag(false));
public static final RegistryObject<Item> VOID_SACK = ITEMS.register("void_sack", () -> new ItemBag(true));
public static final RegistryObject<Item> WORM = ITEMS.register("worm", ItemWorm::new);
@ -278,7 +279,7 @@ public final class ActuallyItems {
public static final RegistryObject<Item> ENORI_BOOTS = ITEMS.register("enori_boots", () -> new ItemArmorAA(ArmorMaterials.ENORI, EquipmentSlotType.FEET));
public static final RegistryObject<Item> ENORI_AIOT = ITEMS.register("enori_aiot", () -> new AllInOneTool(ToolMaterials.ENORI));
public static final Set<RegistryObject<Item>> SIMPLE_ITEMS = ImmutableSet.of(
public static final Set<Supplier<Item>> SIMPLE_ITEMS = ImmutableSet.of(
// Crystals
BLACK_QUARTZ, RESTONIA_CRYSTAL, PALIS_CRYSTAL, DIAMATINE_CRYSTAL,
VOID_CRYSTAL, EMERADIC_CRYSTAL, ENORI_CRYSTAL, EMPOWERED_RESTONIA_CRYSTAL,

View file

@ -23,6 +23,9 @@ import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.api.distmarker.OnlyIns;
import net.minecraftforge.energy.CapabilityEnergy;
import javax.annotation.Nullable;
@ -66,6 +69,7 @@ public class ItemBattery extends ItemEnergy {
return super.use(worldIn, player, hand);
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> list, ITooltipFlag advanced) {
super.appendHoverText(stack, playerIn, list, advanced);

View file

@ -73,6 +73,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay {
return ActionResult.success(player.getItemInHand(hand));
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> tooltip, ITooltipFlag advanced) {
tooltip.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".desc"));

View file

@ -26,6 +26,8 @@ import net.minecraft.item.crafting.Ingredient;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.ModList;
import javax.annotation.Nullable;
@ -104,6 +106,8 @@ public class ItemCoffee extends ItemFoodBase {
public CompoundNBT getShareTag(ItemStack stack) {
return super.getShareTag(stack);
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> tooltip, ITooltipFlag advanced) {
//PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack);

View file

@ -40,7 +40,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
super(ArmorMaterials.GOGGLES, EquipmentSlotType.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0));
this.displayMobs = displayMobs;
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
}
public static boolean isWearing(PlayerEntity player) {
@ -51,7 +51,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
@OnlyIn(Dist.CLIENT)
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) {
PlayerEntity player = ClientProxy.getCurrentPlayer();
/* PlayerEntity player = ClientProxy.getCurrentPlayer();
if (player != null && isWearing(player)) {
ItemStack face = player.inventory.armor.get(3);
if (((IGoggles) face.getItem()).displaySpectralMobs()) {
@ -85,7 +85,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
}
}
this.cachedGlowingEntities.clear();
}
}*/
}
@Override

View file

@ -33,6 +33,8 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.List;
@ -85,7 +87,7 @@ public class ItemFillingWand extends ItemEnergy {
ItemStack stack = context.getPlayer().getItemInHand(context.getHand());
if (!context.getLevel().isClientSide && context.getPlayer().getUseItemRemainingTicks() <= 0) {
if (context.getPlayer().isShiftKeyDown()) {
if (context.getPlayer().isCrouching()) {
BlockState state = context.getLevel().getBlockState(context.getClickedPos());
saveData(state, stack);
return ActionResultType.SUCCESS;
@ -218,6 +220,7 @@ public class ItemFillingWand extends ItemEnergy {
}
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
super.appendHoverText(stack, worldIn, tooltip, flagIn);

View file

@ -24,6 +24,8 @@ import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.network.NetworkHooks;
import javax.annotation.Nullable;
@ -44,6 +46,7 @@ public class ItemFilter extends ItemBase {
return ActionResult.pass(player.getItemInHand(hand));
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
super.appendHoverText(stack, worldIn, tooltip, flagIn);

View file

@ -36,7 +36,7 @@ public class ItemHairBall extends ItemBase {
super();
// TODO: [port] move this.
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent

View file

@ -26,6 +26,8 @@ import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import java.util.List;
@ -88,6 +90,7 @@ public class ItemLaserWrench extends ItemBase {
// return new CompoundNBT();
// }
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, World playerIn, List<ITextComponent> list, ITooltipFlag advanced) {
BlockPos coords = ItemPhantomConnector.getStoredPosition(stack);

View file

@ -29,6 +29,8 @@ import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.List;
@ -112,6 +114,7 @@ public class ItemPhantomConnector extends ItemBase {
return new CompoundNBT();
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> list, ITooltipFlag advanced) {
BlockPos coords = getStoredPosition(stack);

View file

@ -27,6 +27,8 @@ import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.List;
@ -108,6 +110,7 @@ public class ItemPlayerProbe extends ItemBase {
return ActionResultType.FAIL;
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> tooltip, ITooltipFlag advanced) {
if (stack.getOrCreateTag().contains("Name")) {

View file

@ -23,6 +23,8 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.List;
@ -218,6 +220,7 @@ public class ItemPotionRing extends ItemBase implements IDisplayStandItem {
return false;
}
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World playerIn, List<ITextComponent> tooltip, ITooltipFlag advanced) {
super.appendHoverText(stack, playerIn, tooltip, advanced);

View file

@ -36,7 +36,7 @@ public class ItemSolidifiedExperience extends ItemBase {
super();
// TODO: [port] move this to another place
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent

View file

@ -40,7 +40,7 @@ public class ItemWaterBowl extends ItemBase {
public ItemWaterBowl() {
super(ActuallyItems.defaultProps().stacksTo(1));
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent

View file

@ -41,7 +41,7 @@ public class ItemWingsOfTheBats extends ItemBase {
super(ActuallyItems.defaultProps().stacksTo(1));
// TODO: Lets move this somewhere global. Don't like event logic in a single place.
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
}
/**
@ -67,23 +67,23 @@ public class ItemWingsOfTheBats extends ItemBase {
@Override
public double getDurabilityForDisplay(ItemStack stack) {
PlayerEntity player = ClientProxy.getCurrentPlayer();
/* PlayerEntity player = ClientProxy.getCurrentPlayer();
if (player != null) {
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
double diff = MAX_FLY_TIME - 1;//data.batWingsFlyTime; // TODO: fix me
return 1 - diff / MAX_FLY_TIME;
}
}*/ //TODO
return super.getDurabilityForDisplay(stack);
}
@Override
public int getRGBDurabilityForDisplay(ItemStack stack) {
PlayerEntity player = ClientProxy.getCurrentPlayer();
/* PlayerEntity player = ClientProxy.getCurrentPlayer();
if (player != null) {
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
int curr = 1;//data.batWingsFlyTime; // TODO: fix me
return MathHelper.hsvToRgb(Math.max(0.0F, 1 - (float) curr / MAX_FLY_TIME) / 3.0F, 1.0F, 1.0F);
}
}*/
return super.getRGBDurabilityForDisplay(stack);
}

View file

@ -35,7 +35,7 @@ public class ItemWorm extends ItemBase {
public ItemWorm() {
super();
MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(this);
// TODO: [port] Not sure what this does
// this.addPropertyOverride(new ResourceLocation(ActuallyAdditions.MODID, "snail"), (IItemPropertyGetter) (stack, world, entity) -> "snail mail".equalsIgnoreCase(stack.getDisplayName().getString())

View file

@ -67,6 +67,7 @@ public abstract class ItemEnergy extends ItemBase {
// }
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
super.appendHoverText(stack, worldIn, tooltip, flagIn);
@ -77,7 +78,6 @@ public abstract class ItemEnergy extends ItemBase {
}
@Override
@OnlyIn(Dist.CLIENT)
public boolean isFoil(ItemStack stack) {
return false;
}
@ -112,11 +112,9 @@ public abstract class ItemEnergy extends ItemBase {
@Override
public int getRGBDurabilityForDisplay(ItemStack stack) {
PlayerEntity player = ClientProxy.getCurrentPlayer();
if (player != null && player.level != null) {
float[] color = AssetUtil.getWheelColor(player.level.getGameTime() % 256);
return MathHelper.color(color[0] / 255F, color[1] / 255F, color[2] / 255F);
}
//float[] color = MathHelper.hsvToRgb(1, 1, 1);
//float[] color = AssetUtil.getWheelColor(player.level.getGameTime() % 256);
//return MathHelper.color(color[0] / 255F, color[1] / 255F, color[2] / 255F);
return super.getRGBDurabilityForDisplay(stack);
}

View file

@ -81,7 +81,4 @@ public class ClientProxy {
// COLOR_PRODIVIDING_BLOCKS_FOR_REGISTERING.add(block);
// }
public static ClientPlayerEntity getCurrentPlayer() {
return Minecraft.getInstance().player;
}
}

View file

@ -10,6 +10,10 @@
package de.ellpeck.actuallyadditions.mod.recipe;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe;
import net.minecraft.item.ItemStack;
public final class CrusherRecipeRegistry {
//
// public static final ArrayList<SearchCase> SEARCH_CASES = new ArrayList<>();
@ -103,11 +107,11 @@ public final class CrusherRecipeRegistry {
// return false;
// }
//
// public static CrusherRecipe getRecipeFromInput(ItemStack input) {
// for (CrusherRecipe recipe : ActuallyAdditionsAPI.CRUSHER_RECIPES)
// if (recipe.matches(input)) return recipe;
// return null;
// }
public static CrushingRecipe getRecipeFromInput(ItemStack input) {
for (CrushingRecipe recipe : ActuallyAdditionsAPI.CRUSHER_RECIPES)
if (recipe.matches(input)) return recipe;
return null;
}
//
// public static class SearchCase {
//

View file

@ -118,7 +118,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
ItemStack stack = this.inv.getStackInSlot(0);
if (!stack.isEmpty()) {
for (SolidFuelRecipe fuelRecipe : ActuallyAdditionsAPI.SOLID_FUEL_RECIPES) {
if (fuelRecipe.matches(new SingleItem(stack), null)) {
if (fuelRecipe.matches(stack)) {
this.currentRecipe = fuelRecipe;
this.maxBurnTime = fuelRecipe.getBurnTime();
this.currentBurnTime = this.maxBurnTime;
@ -151,9 +151,8 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
@Override
public IAcceptor getAcceptor() {
return (slot, stack, automation) -> {
SingleItem singleItem = new SingleItem(stack);
for (SolidFuelRecipe recipe : ActuallyAdditionsAPI.SOLID_FUEL_RECIPES) {
if (recipe.matches(singleItem, null))return true;
if (recipe.matches(stack))return true;
}
return false;
};

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe;
import de.ellpeck.actuallyadditions.mod.inventory.CrusherContainer;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
@ -31,6 +32,7 @@ import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.energy.IEnergyStorage;
@ -216,7 +218,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto
}
public void finishCrushing(int theInput, int theFirstOutput, int theSecondOutput) {
CrushingRecipe recipe = null; //CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput));//TODO
CrushingRecipe recipe = CrusherRecipeRegistry.getRecipeFromInput(this.inv.getStackInSlot(theInput));//TODO
if (recipe == null) {
return;
}
@ -281,7 +283,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto
@Override
public ITextComponent getDisplayName() {
return StringTextComponent.EMPTY;
return new TranslationTextComponent("container.actuallyadditions.crusher");
}
@Nullable

View file

@ -6,19 +6,17 @@ import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes;
import net.minecraft.item.crafting.RecipeManager;
import net.minecraft.resources.DataPackRegistries;
import net.minecraft.resources.IResourceManager;
import net.minecraftforge.resource.IResourceType;
import net.minecraftforge.resource.ISelectiveResourceReloadListener;
import net.minecraft.resources.IResourceManagerReloadListener;
import java.util.function.Predicate;
public class ResourceReloader implements ISelectiveResourceReloadListener {
@SuppressWarnings("deprecation")
public class ResourceReloader implements IResourceManagerReloadListener {
private final DataPackRegistries data;
public ResourceReloader(DataPackRegistries dataPackRegistries) {
data = dataPackRegistries;
}
@Override
public void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
public void onResourceManagerReload(IResourceManager pResourceManager) {
RecipeManager recipeManager = data.getRecipeManager();
ActuallyAdditionsAPI.EMPOWERER_RECIPES.clear();
ActuallyAdditionsAPI.EMPOWERER_RECIPES.addAll(recipeManager.getAllRecipesFor(ActuallyRecipes.Types.EMPOWERING));

View file

@ -127,7 +127,7 @@ public final class WorldUtil {
int drain = from.extractEnergy(maxTransfer, true);
if (drain > 0) {
int filled = to.receiveEnergy(drain, false);
to.extractEnergy(filled, false);
from.extractEnergy(filled, false);
}
});
});

View file

@ -15,10 +15,9 @@ import java.util.function.Function;
import java.util.function.Supplier;
public class AABlockReg<B extends Block, I extends Item, T extends TileEntity> implements Supplier<Block> {
//public class AABlock implements Supplier<Block> {
private final String name;
private final RegistryObject<B> block;
private final RegistryObject<I> item;
private RegistryObject<B> block;
private RegistryObject<I> item;
private RegistryObject<TileEntityType<T>> tileEntityType;
public AABlockReg(String name, Supplier<B> blockSupplier, Function<B, I> itemSupplier, Supplier<T> tileSupplier) {

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "actuallyadditions:block/canola_oil"
}
}
}

View file

@ -121,8 +121,8 @@
"block.actuallyadditions.giant_chest": "Small Storage Crate",
"block.actuallyadditions.giant_chest_medium": "Medium Storage Crate",
"block.actuallyadditions.giant_chest_large": "Large Storage Crate",
"block.actuallyadditions.grinder": "Crusher",
"block.actuallyadditions.grinder_double": "Double Crusher",
"block.actuallyadditions.crusher": "Crusher",
"block.actuallyadditions.double_crusher": "Double Crusher",
"block.actuallyadditions.furnace_double": "Powered Furnace",
"block.actuallyadditions.fishing_net": "Fishing Net",
"block.actuallyadditions.furnace_solar": "Solar Panel",
@ -643,8 +643,8 @@
"_comment": "Container Names",
"container.actuallyadditions.inputter": "ESD",
"container.actuallyadditions.inputterAdvanced": "Advanced ESD",
"container.actuallyadditions.grinder": "Crusher",
"container.actuallyadditions.grinderDouble": "Double Crusher",
"container.actuallyadditions.crusher": "Crusher",
"container.actuallyadditions.double_crusher": "Double Crusher",
"container.actuallyadditions.furnaceDouble": "Powered Furnace",
"container.actuallyadditions.feeder": "Feeder",
"container.actuallyadditions.giantChest": "Small Storage Crate",

View file

@ -0,0 +1,5 @@
{
"textures": {
"particle": "actuallyadditions:fluid/canola_oil_still"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,3 @@
{
"animation": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,5 @@
{
"animation": {
"frametime": 2
}
}