mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-27 17:28:34 +01:00
Compare commits
4 commits
85a8ade648
...
8b5b073850
Author | SHA1 | Date | |
---|---|---|---|
|
8b5b073850 | ||
|
2ad699c61a | ||
|
9ec20f4895 | ||
|
fc7032fa4d |
17 changed files with 11 additions and 41 deletions
|
@ -15,7 +15,6 @@ import net.minecraft.core.HolderLookup;
|
|||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.neoforge.common.data.AdvancementProvider;
|
||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||
|
||||
|
|
|
@ -13,21 +13,17 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.CropBlock;
|
||||
import net.minecraft.world.level.storage.loot.LootPool;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
import net.minecraft.world.level.storage.loot.ValidationContext;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||
import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount;
|
||||
import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction;
|
||||
import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition;
|
||||
import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
||||
import net.neoforged.neoforge.registries.DeferredHolder;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
|
|
@ -52,10 +52,8 @@ import net.neoforged.fml.ModLoadingContext;
|
|||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.config.ModConfig;
|
||||
import net.neoforged.fml.event.config.ModConfigEvent;
|
||||
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.neoforged.fml.loading.FMLEnvironment;
|
||||
import net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
import net.neoforged.neoforge.common.conditions.ICondition;
|
||||
import net.neoforged.neoforge.common.world.BiomeModifier;
|
||||
|
@ -132,9 +130,9 @@ public class ActuallyAdditions {
|
|||
eventBus.addListener(this::setup);
|
||||
|
||||
if (FMLEnvironment.dist.isClient()) {
|
||||
eventBus.addListener(this::clientSetup);
|
||||
eventBus.addListener(ActuallyAdditionsClient::setup);
|
||||
eventBus.addListener(ActuallyAdditionsClient::setupSpecialRenders);
|
||||
eventBus.addListener(this::particleFactoryRegister);
|
||||
eventBus.addListener(ActuallyAdditionsClient::registerParticleFactories);
|
||||
eventBus.register(new ClientRegistryHandler());
|
||||
}
|
||||
IFarmerBehavior.initBehaviors();
|
||||
|
@ -168,14 +166,6 @@ public class ActuallyAdditions {
|
|||
CommonConfig.Other.relayConfigureItem = item2 != null?item2: Items.AIR;
|
||||
}
|
||||
|
||||
private void clientSetup(FMLClientSetupEvent event) {
|
||||
ActuallyAdditionsClient.setup(event);
|
||||
}
|
||||
|
||||
private void particleFactoryRegister(RegisterParticleProvidersEvent event) {
|
||||
ActuallyAdditionsClient.registerParticleFactories();
|
||||
}
|
||||
|
||||
public void serverStarted(ServerStartedEvent event) {
|
||||
// TODO: [port] check if this is needed
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
|
||||
import net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
|
||||
public class ActuallyAdditionsClient {
|
||||
|
@ -135,9 +136,9 @@ public class ActuallyAdditionsClient {
|
|||
event.registerEntityRenderer(ActuallyAdditions.ENTITY_WORM.get(), RenderWorm::new);
|
||||
}
|
||||
|
||||
public static void registerParticleFactories() {
|
||||
Minecraft.getInstance().particleEngine.register(ActuallyParticles.LASER_ITEM.get(), ParticleLaserItem.Factory::new);
|
||||
Minecraft.getInstance().particleEngine.register(ActuallyParticles.BEAM.get(), ParticleBeam.Factory::new);
|
||||
public static void registerParticleFactories(RegisterParticleProvidersEvent event) {
|
||||
event.registerSpriteSet(ActuallyParticles.LASER_ITEM.get(), ParticleLaserItem.Factory::new);
|
||||
event.registerSpriteSet(ActuallyParticles.BEAM.get(), ParticleBeam.Factory::new);
|
||||
}
|
||||
|
||||
// TODO: [port] validate that this works
|
||||
|
|
|
@ -10,12 +10,8 @@ import net.minecraft.world.item.CreativeModeTab;
|
|||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.capabilities.Capabilities;
|
||||
import net.neoforged.neoforge.energy.EnergyStorage;
|
||||
import net.neoforged.neoforge.energy.IEnergyStorage;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
|
@ -6,7 +6,6 @@ import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
|
|||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.attachment.AttachmentType;
|
||||
import net.neoforged.neoforge.energy.EnergyStorage;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier;
|
|||
import de.ellpeck.actuallyadditions.registration.AABlockReg;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.BaseEntityBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SlabBlock;
|
||||
|
@ -79,10 +78,8 @@ import net.minecraft.world.level.material.PushReaction;
|
|||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.capabilities.Capabilities;
|
||||
import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent;
|
||||
import net.neoforged.neoforge.registries.DeferredHolder;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.data.WorldData;
|
|||
import de.ellpeck.actuallyadditions.mod.inventory.gui.EnergyDisplay;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.IEnergyDisplay;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -38,7 +37,6 @@ import net.neoforged.api.distmarker.Dist;
|
|||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.neoforge.client.event.RenderGuiOverlayEvent;
|
||||
import net.neoforged.neoforge.client.event.RenderLevelStageEvent;
|
||||
import net.neoforged.neoforge.client.gui.overlay.GuiOverlayManager;
|
||||
import net.neoforged.neoforge.event.TickEvent;
|
||||
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
|
||||
|
|
|
@ -25,11 +25,8 @@ import net.minecraft.world.entity.player.Inventory;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.inventory.ClickType;
|
||||
import net.minecraft.world.inventory.ContainerListener;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -52,7 +52,8 @@ public class CrusherScreen extends AAScreen<CrusherContainer> {
|
|||
: 42), this.topPos + 5, this.tileGrinder.storage);
|
||||
|
||||
if (this.isDouble) {
|
||||
this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, Component.literal("S"), (button) -> actionPerformed(0));
|
||||
this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> actionPerformed(0))
|
||||
.bounds(this.leftPos - 10, this.topPos, 16, 16).build();
|
||||
this.addRenderableWidget(this.buttonAutoSplit);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.AbstractButton;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.components.Renderable;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
|
|
|
@ -60,7 +60,8 @@ public class GuiFurnaceDouble extends AAScreen<ContainerFurnaceDouble> {
|
|||
public void init() {
|
||||
super.init();
|
||||
this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage);
|
||||
this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0));
|
||||
this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0))
|
||||
.bounds(this.leftPos + 27, this.topPos + 5, 16, 16).build();
|
||||
buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor());
|
||||
this.addRenderableWidget(this.buttonAutoSplit);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import net.minecraft.ChatFormatting;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.components.Tooltip;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.items.metalists;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.items.misc;
|
||||
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ActuallyItem;
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.update;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.language.I18n;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
|
|
|
@ -443,7 +443,7 @@
|
|||
"tooltip.actuallyadditions.previouslyDoubleFurnace": "Previously \"Double Furnace\"",
|
||||
"tooltip.actuallyadditions.previouslyBag": "Previously \"Bag\"",
|
||||
"tooltip.actuallyadditions.previouslyVoidBag": "Previously \"Void Bag\"",
|
||||
"tooltip.actuallyadditions.item_filling_wand.selected_block": "Selected Block:",
|
||||
"tooltip.actuallyadditions.item_filling_wand.selected_block": "Selected Block: %s",
|
||||
"tooltip.actuallyadditions.item_filling_wand.selected_block.none": "None",
|
||||
"tooltip.actuallyadditions.coffeeCup.noEffect": "No Effects",
|
||||
"_comment": "Gui Information",
|
||||
|
|
Loading…
Reference in a new issue