From 143a76dd8b380f85dad4fee6359b5a17022feccb Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 29 Jan 2022 13:07:43 +0000 Subject: Added Mob Mentality. Added perks to sleeping. Added Magic Feather. --- .../assets/miscutils/textures/items/magicfeather.png | Bin 0 -> 324 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/resources/assets/miscutils/textures/items/magicfeather.png (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/miscutils/textures/items/magicfeather.png b/src/main/resources/assets/miscutils/textures/items/magicfeather.png new file mode 100644 index 0000000000..634529b925 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/magicfeather.png differ -- cgit From e7fb530caf15236026808ffaecaf1b2cae140776 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 29 Jan 2022 13:33:21 +0000 Subject: Re-allow removal of debuffs when sleeping. Localized chat strings. --- .../handler/events/PlayerSleepEventHandler.java | 70 ++++++++++++++-------- .../core/util/minecraft/PlayerUtils.java | 5 ++ .../resources/assets/miscutils/lang/en_US.lang | 8 ++- 3 files changed, 56 insertions(+), 27 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java index d3700e1373..b9419a5ba6 100644 --- a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java @@ -17,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ChatComponentTranslation; import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; @@ -49,45 +50,62 @@ public class PlayerSleepEventHandler { @SubscribeEvent public void sleep(PlayerSleepInBedEvent event) { - event.setResult(Result.ALLOW); + } @SubscribeEvent public void wake(PlayerWakeUpEvent event) { EntityPlayer aPlayer = event.entityPlayer; - if (aPlayer != null && !aPlayer.worldObj.isRemote) { - // Try Heal - float aCurrentHP = aPlayer.getHealth(); - float aMaxHP = aPlayer.getMaxHealth(); - if (aCurrentHP < aMaxHP) { - float aDamage = aMaxHP - aCurrentHP; - float aToHeal = MathUtils.randFloat(1, aDamage); - if (aToHeal > 0) { - aPlayer.heal(aToHeal); - PlayerUtils.messagePlayer(aPlayer, "You slept well and now feel " + (aToHeal >= aDamage / 2 ? "much" : "a little") + " better."); + if (aPlayer != null && !aPlayer.worldObj.isRemote) { + boolean aRemovedBad = false; + try { + Collection aActive = aPlayer.getActivePotionEffects(); + for (PotionEffect aEffect : aActive) { + for (Potion aBadPotion : sNegativeEffects) { + if (aEffect.getPotionID() == aBadPotion.getId()) { + ReflectionUtils.setField(aEffect, sEffectDuration, 1); + aRemovedBad = true; + Logger.INFO("Set duration of " + aEffect.getEffectName() + " to 1 tick"); + } + } } } - // Already healed, try give a buff - else { - int aRandomBuff = MathUtils.randInt(0, sPositiveEffects.size() - 1); - Potion aPotionToApply = sPositiveEffects.get(aRandomBuff); - if (aPotionToApply != null) { - aPlayer.addPotionEffect(new GtPotionEffect(aPotionToApply.id, MathUtils.randInt(60, 180), MathUtils.randInt(0, 2))); - PlayerUtils.messagePlayer(aPlayer, "You feel really well rested."); - } + catch (Throwable t) { + t.printStackTrace(); } - boolean aRemovedBad = false; - /*for (Potion aBadPotion : sNegativeEffects) { - if (curePotionEffect(aPlayer, aBadPotion)) { - aRemovedBad = true; - } - }*/ if (aRemovedBad) { - PlayerUtils.messagePlayer(aPlayer, "The downsides of life no longer effect you."); + messagePlayer(aPlayer, "sleep.event.downsides"); } + else { + // Try Heal + float aCurrentHP = aPlayer.getHealth(); + float aMaxHP = aPlayer.getMaxHealth(); + if (aCurrentHP < aMaxHP) { + float aDamage = aMaxHP - aCurrentHP; + float aToHeal = MathUtils.randFloat(1, aDamage); + if (aToHeal > 0) { + aPlayer.heal(aToHeal); + messagePlayer(aPlayer, (aToHeal >= aDamage / 2 ? "sleep.event.good" : "sleep.event.okay")); + } + } + // Already healed, try give a buff + else { + int aRandomBuff = MathUtils.randInt(0, sPositiveEffects.size() - 1); + Potion aPotionToApply = sPositiveEffects.get(aRandomBuff); + if (aPotionToApply != null) { + aPlayer.addPotionEffect(new GtPotionEffect(aPotionToApply.id, MathUtils.randInt(60, 180), MathUtils.randInt(0, 2))); + messagePlayer(aPlayer, "sleep.event.wellrested"); + } + } + } } } + + private static void messagePlayer(EntityPlayer aPlayer, String aChatKey) { + PlayerUtils.messagePlayer(aPlayer, new ChatComponentTranslation(aChatKey, new Object[0])); + } + private static Field sEffectDuration = ReflectionUtils.getField(PotionEffect.class, "duration"); private static Field sActivePotionEffects = ReflectionUtils.getField(EntityPlayer.class, "activePotionsMap"); private static Method sOnFinishedPotionEffect = ReflectionUtils.getMethod(EntityPlayer.class, "onFinishedPotionEffect", PotionEffect.class); diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java index 24ffa295b7..f2be723726 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java @@ -14,6 +14,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; @@ -34,6 +35,10 @@ public class PlayerUtils { public static void messagePlayer(final EntityPlayer P, final String S){ gregtech.api.util.GT_Utility.sendChatToPlayer(P, S); } + + public static void messagePlayer(final EntityPlayer P, final IChatComponent S){ + P.addChatComponentMessage(S); + } public static EntityPlayer getPlayer(final String name){ try{ diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index a3639062f8..06b47f381e 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -3368,4 +3368,10 @@ item.FrothMonaziteflotation.name=Monazite Flotation Froth Cell //Added 18/12/21 item.BasicGenericChemItem.13.name=Formaldehyde Catalyst -item.hydrogenchloridemix.name=Hydrogen Chlorine Mix \ No newline at end of file +item.hydrogenchloridemix.name=Hydrogen Chlorine Mix + +//Added 29/01/22 +sleep.event.okay=You slept well and now feel a little better. +sleep.event.good=You slept well and now feel much better. +sleep.event.wellrested=You feel really well rested. +sleep.event.downsides=The downsides of life no longer effect you. \ No newline at end of file -- cgit From 228ddd39273b2ac38350764d29982519e27761c1 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 29 Jan 2022 14:54:57 +0000 Subject: Fixed Magic Feather death handling. Improved Magic Feather beacon handling. --- .../java/gtPlusPlus/core/common/CommonProxy.java | 2 + .../handler/events/PlayerSleepEventHandler.java | 3 - .../java/gtPlusPlus/core/item/base/CoreItem.java | 4 +- .../core/item/general/ItemMagicFeather.java | 421 ++++++++++++--------- .../gtPlusPlus/core/recipe/RECIPES_General.java | 15 + .../resources/assets/miscutils/lang/en_US.lang | 3 +- 6 files changed, 268 insertions(+), 180 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java index fb3f291dd0..2909ef3541 100644 --- a/src/main/java/gtPlusPlus/core/common/CommonProxy.java +++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java @@ -126,6 +126,8 @@ public class CommonProxy { Utils.registerEvent(new HandlerTooltip_GC()); // Handles Sleep Benefits PlayerSleepEventHandler.init(); + // Handles Magic Feather + Utils.registerEvent(ModItems.itemMagicFeather); if (CORE.DEVENV) { Utils.registerEvent(new StopAnnoyingFuckingAchievements()); diff --git a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java index b9419a5ba6..c36344d805 100644 --- a/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/events/PlayerSleepEventHandler.java @@ -1,7 +1,5 @@ package gtPlusPlus.core.handler.events; -import cpw.mods.fml.common.eventhandler.Event.Result; - import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.*; @@ -14,7 +12,6 @@ import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ChatComponentTranslation; diff --git a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java index 7ce96b2a88..fbd04eb30b 100644 --- a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java +++ b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java @@ -140,7 +140,7 @@ public class CoreItem extends Item this.setMaxDamage(maxDmg); this.rarity = regRarity; this.itemDescription = description; - this.descColour = colour; + this.descColour = colour != null ? colour : EnumChatFormatting.RESET; this.hasEffect = Effect; this.turnsInto = OverrideItem; GameRegistry.registerItem(this, unlocalizedName); @@ -160,7 +160,7 @@ public class CoreItem extends Item this.setMaxDamage(maxDmg); this.rarity = regRarity; this.itemDescription = description; - this.descColour = colour; + this.descColour = colour != null ? colour : EnumChatFormatting.RESET; this.hasEffect = Effect; this.turnsInto = OverrideItem; GameRegistry.registerItem(this, unlocalizedName); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java b/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java index 41b88b7aa8..4d34bf84e7 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemMagicFeather.java @@ -1,17 +1,19 @@ package gtPlusPlus.core.item.general; -import java.util.List; -import java.util.WeakHashMap; +import java.util.*; +import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.item.base.CoreItem; import gtPlusPlus.core.lib.CORE; import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.*; import net.minecraft.tileentity.TileEntity; @@ -19,178 +21,249 @@ import net.minecraft.tileentity.TileEntityBeacon; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingDeathEvent; public class ItemMagicFeather extends CoreItem { - public static final String NAME = "magicfeather"; - private static final WeakHashMap playerData = new WeakHashMap<>(); - - public ItemMagicFeather() { - super("magicfeather", AddToCreativeTab.tabMisc, 1, 100, new String[] {"Lets you fly around Beacons"}, EnumRarity.rare, EnumChatFormatting.BOLD, false, null); - setMaxStackSize(1); - setUnlocalizedName(CORE.MODID + ":" + NAME); - MinecraftForge.EVENT_BUS.register(this); - } - - @Override - public int getEntityLifespan(ItemStack itemStack, World world) { - return Integer.MAX_VALUE; - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - super.addInformation(stack, aPlayer, list, bool); - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - if (player != null) { - if (!isInBeaconRange(player)) { - list.add(""+EnumChatFormatting.RED+"Needs to be within beacon range"); - } - } - } - - public boolean hasCustomEntity(ItemStack stack) { - return true; - } - - private static boolean isInBeaconRange(EntityPlayer player) { - World world = player.getEntityWorld(); - - List tileEntities = world.loadedTileEntityList; - for (TileEntity t : tileEntities) { - if (!(t instanceof TileEntityBeacon)) { - continue; - } - - TileEntityBeacon beacon = (TileEntityBeacon) t; - - int level = beacon.getLevels(); - int radius = (level * 10 + 10); - - int x = beacon.xCoord; - int z = beacon.zCoord;; - - if (player.posX < (x - radius) || player.posX > (x + radius)) { - continue; - } - - if (player.posZ < (z - radius) || player.posZ > (z + radius)) { - continue; - } - - return true; - } - - return false; - } - - private static void setMayFly(EntityPlayer player, boolean mayFly) { - if (player.capabilities.allowFlying == mayFly) { - return; - } - - if (!mayFly) { - // force the player on the ground then remove ability to fly - // this prevent crashing the the ground and dying - // when you accidentally get out of the beacon range - player.capabilities.isFlying = false; - - if (player.onGround && player.fallDistance < 1F) { - player.capabilities.allowFlying = false; - } - } else { - player.capabilities.allowFlying = true; - } - - player.sendPlayerAbilities(); - } - - @SubscribeEvent - public void onPlayerTick(TickEvent.PlayerTickEvent event) { - if (event.side != Side.SERVER) { - return; - } - - EntityPlayer player = event.player; - - MagicFeatherData data = ItemMagicFeather.playerData.get(player); - if (data == null) { - data = new MagicFeatherData(player); - ItemMagicFeather.playerData.put(player, data); - } - - data.onTick(); - } - - private static boolean hasItem(EntityPlayer player, Item item) { - for (int i = 0; i < player.inventory.getSizeInventory(); i++) { - ItemStack stack = player.inventory.getStackInSlot(i); - if (item == stack.getItem()) { - return true; - } - } - - return false; - } - - private static class MagicFeatherData { - private final EntityPlayer player; - private boolean hasItem = false; - - private int checkTick = 0; - private boolean beaconInRangeCache; - - public MagicFeatherData(EntityPlayer player) { - this.player = player; - this.beaconInRangeCache = player.capabilities.allowFlying; - } - - public void onTick() { - - boolean hasItem = hasItem(player, ModItems.itemMagicFeather); - if (hasItem != this.hasItem) { - if (hasItem) { - this.onAdd(); - } - - if (!hasItem) { - this.onRemove(); - } - - this.hasItem = hasItem; - return; - } - - boolean mayFly = player.capabilities.isCreativeMode || (hasItem && checkBeaconInRange(player)); - setMayFly(player, mayFly); - } - - private void onAdd() { - if (!ItemMagicFeather.isInBeaconRange(player)) { - return; - } - - setMayFly(player, true); - } - - private void onRemove() { - if (player.capabilities.isCreativeMode) { - return; - } - - setMayFly(player, false); - } - - private boolean checkBeaconInRange(EntityPlayer player) { - - if (checkTick++ % 40 != 0) { - return beaconInRangeCache; - } - - beaconInRangeCache = ItemMagicFeather.isInBeaconRange(player); - - return beaconInRangeCache; - } - } - -} \ No newline at end of file + public static final String NAME = "magicfeather"; + private static final WeakHashMap sPlayerData = new WeakHashMap(); + private static final WeakHashMap> sBeaconData = new WeakHashMap>(); + + public ItemMagicFeather() { + super("magicfeather", AddToCreativeTab.tabMisc, 1, 100, new String[]{"Lets you fly around Beacons"}, EnumRarity.uncommon, null, false, null); + setMaxStackSize(1); + setUnlocalizedName(CORE.MODID + ":" + NAME); + MinecraftForge.EVENT_BUS.register(this); + } + + @Override + public int getEntityLifespan(ItemStack itemStack, World world) { + return Integer.MAX_VALUE; + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add("Does not need to be the item held in your hand to work"); + super.addInformation(stack, aPlayer, list, bool); + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + list.add(""); + if (player != null) { + if (!isInBeaconRange(player)) { + list.add("" + EnumChatFormatting.RED + "Needs to be within beacon range"); + } + else { + list.add("" + EnumChatFormatting.GOLD + "Fly like an eagle"); + } + HashSet aBeaconData = sBeaconData.get(player.getUniqueID()); + if (aBeaconData != null && !aBeaconData.isEmpty()) { + list.add("Nearby Beacons:"); + for (TileEntityBeacon aBeacon : aBeaconData) { + int level = aBeacon.getLevels(); + if (level > 0) { + int radius = (level * 10 + 10); + int x = aBeacon.xCoord; + int z = aBeacon.zCoord; + int y = aBeacon.yCoord; + list.add("Level: "+level+", Radius: "+radius); + list.add("Location: "+x+", "+y+", "+z); + } + } + } + } + } + + public boolean hasCustomEntity(ItemStack stack) { + return true; + } + + private static boolean isInBeaconRange(EntityPlayer player) { + World world = player.getEntityWorld(); + if (world.isRemote) { + HashSet aBeaconData = sBeaconData.get(player.getUniqueID()); + if (aBeaconData != null) { + return !aBeaconData.isEmpty(); + } + return false; + } + List tileEntities = world.loadedTileEntityList; + HashSet aBeaconData = sBeaconData.get(player.getUniqueID()); + if (aBeaconData == null) { + aBeaconData = new HashSet(); + sBeaconData.put(player.getUniqueID(), aBeaconData); + } + for (TileEntity t : tileEntities) { + if (!(t instanceof TileEntityBeacon)) { + continue; + } + TileEntityBeacon beacon = (TileEntityBeacon) t; + int level = beacon.getLevels(); + if (level == 0) { + continue; + } + int radius = (level * 10 + 10); + int x = beacon.xCoord; + int z = beacon.zCoord; + if (player.posX < (x - radius) || player.posX > (x + radius)) { + continue; + } + if (player.posZ < (z - radius) || player.posZ > (z + radius)) { + continue; + } + if (!aBeaconData.contains(beacon)) { + aBeaconData.add(beacon); + } + } + if (aBeaconData.size() > 0) { + return true; + } + + return false; + } + + private static void setMayFly(EntityPlayer player, boolean mayFly) { + if (player.capabilities.allowFlying == mayFly) { + return; + } + if (!mayFly) { + // force the player on the ground then remove ability to fly + // this prevent crashing the the ground and dying + // when you accidentally get out of the beacon range + player.capabilities.isFlying = false; + if (player.onGround && player.fallDistance < 1F) { + player.capabilities.allowFlying = false; + } + } + else { + player.capabilities.allowFlying = true; + } + player.sendPlayerAbilities(); + } + + @SubscribeEvent(priority=EventPriority.HIGHEST) + public void onPlayerTick(TickEvent.PlayerTickEvent event) { + if (event.side != Side.SERVER) { + return; + } + EntityPlayer player = event.player; + HashSet aBeaconData = sBeaconData.get(player.getUniqueID()); + if (aBeaconData != null && !aBeaconData.isEmpty()) { + HashSet aRemovals = new HashSet(); + for (TileEntityBeacon aBeacon : aBeaconData) { + int level = aBeacon.getLevels(); + if (level == 0) { + aRemovals.add(aBeacon); + continue; + } + int radius = (level * 10 + 10); + int x = aBeacon.xCoord; + int z = aBeacon.zCoord; + if (player.posX < (x - radius) || player.posX > (x + radius)) { + aRemovals.add(aBeacon); + continue; + } + if (player.posZ < (z - radius) || player.posZ > (z + radius)) { + aRemovals.add(aBeacon); + continue; + } + } + aBeaconData.removeAll(aRemovals); + } + boolean hasItem = hasItem(player, ModItems.itemMagicFeather); + if (!hasItem) { + ItemMagicFeather.sPlayerData.remove(player.getUniqueID()); + } + MagicFeatherData data = ItemMagicFeather.sPlayerData.get(player.getUniqueID()); + if (data == null) { + data = new MagicFeatherData(player); + ItemMagicFeather.sPlayerData.put(player.getUniqueID(), data); + } + data.onTick(); + } + + @SubscribeEvent(priority=EventPriority.LOWEST) + public void onPlayerDeath(LivingDeathEvent event) { + if (event.entityLiving != null) { + EntityLivingBase aEntity = event.entityLiving; + if (aEntity instanceof EntityPlayer && aEntity.worldObj != null) { + if (aEntity.worldObj.isRemote) { + return; + } + else { + EntityPlayer aPlayer = (EntityPlayer) aEntity; + ItemMagicFeather.sPlayerData.remove(aPlayer.getUniqueID()); + ItemMagicFeather.sBeaconData.remove(aPlayer.getUniqueID()); + } + } + } + } + + private static boolean hasItem(EntityPlayer player, Item item) { + for (int i = 0; i < player.inventory.getSizeInventory(); i++) { + ItemStack stack = player.inventory.getStackInSlot(i); + if (stack != null && stack.getItem() != null && stack.getItem() instanceof ItemMagicFeather) { + return true; + } + } + return false; + } + + private static class MagicFeatherData { + + private final EntityPlayer player; + private boolean hasItem = false; + private int checkTick = 0; + private boolean beaconInRangeCache; + + public MagicFeatherData(EntityPlayer player) { + this.player = player; + this.beaconInRangeCache = player.capabilities.allowFlying; + } + + public void onTick() { + try { + boolean hasItem = hasItem(player, ModItems.itemMagicFeather); + if (hasItem != this.hasItem) { + if (hasItem) { + this.onAdd(); + } + if (!hasItem) { + this.onRemove(); + } + this.hasItem = hasItem; + Logger.INFO("Ticking feather "+hasItem); + return; + } + } + catch (Throwable t) { + t.printStackTrace(); + } + + boolean mayFly = player.capabilities.isCreativeMode || (hasItem && checkBeaconInRange(player)); + setMayFly(player, mayFly); + } + + private void onAdd() { + if (!ItemMagicFeather.isInBeaconRange(player)) { + return; + } + setMayFly(player, true); + } + + private void onRemove() { + if (player.capabilities.isCreativeMode) { + return; + } + setMayFly(player, false); + } + + private boolean checkBeaconInRange(EntityPlayer player) { + if (checkTick++ % 40 != 0) { + return beaconInRangeCache; + } + beaconInRangeCache = ItemMagicFeather.isInBeaconRange(player); + return beaconInRangeCache; + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java index d47b65391c..0482921c9a 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -329,6 +329,21 @@ public class RECIPES_General { ItemUtils.getItemStackFromFQRN("miscutils:SlowBuildingRing", 1), // Output 20 * 30, // Dur 16); // Eu + + // Magic Feather + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(Items.feather, 64), + ItemUtils.getSimpleStack(Blocks.emerald_block, 32), + ItemUtils.getSimpleStack(Blocks.diamond_block, 32), + Materials.Ruby.getBlocks(32), + Materials.Sapphire.getBlocks(32), + ItemUtils.getSimpleStack(Blocks.gold_block, 32), + }, + Materials.Silver.getMolten(32 * 144), // Fluid + ItemUtils.getSimpleStack(ModItems.itemMagicFeather, 1), // Output + 20 * 120, // Dur + MaterialUtils.getVoltageForTier(4)); // Eu // Pest Killer CORE.RA.addSixSlotAssemblingRecipe( diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index 06b47f381e..c7d3e9a938 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -3374,4 +3374,5 @@ item.hydrogenchloridemix.name=Hydrogen Chlorine Mix sleep.event.okay=You slept well and now feel a little better. sleep.event.good=You slept well and now feel much better. sleep.event.wellrested=You feel really well rested. -sleep.event.downsides=The downsides of life no longer effect you. \ No newline at end of file +sleep.event.downsides=The downsides of life no longer effect you. +item.miscutils:magicfeather.name=Magical Feather \ No newline at end of file -- cgit From e77484a62ce2a5c20a6c731147aed7f38098f35d Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 29 Jan 2022 16:59:59 +0000 Subject: Added new crop. Added Wireless Charger locking. Fixed Cyclotron leaving bad input stacks. Improve Block localization. --- .../core/block/base/BlockBaseModular.java | 55 ++++++++---------- .../core/item/base/itemblock/ItemBlockGtBlock.java | 62 ++++++++++++++++----- .../xmod/bartcrops/LoaderOfTheCrops.java | 2 + .../xmod/bartcrops/abstracts/BaseCrop.java | 2 +- .../xmod/bartcrops/crops/Crop_Force.java | 53 ++++++++++++++++++ .../basic/GregtechMetaWirelessCharger.java | 42 ++++++++++---- .../GregtechMetaTileEntity_Cyclotron.java | 1 + .../textures/blocks/crop/blockCrop.Force.1.png | Bin 0 -> 209 bytes .../textures/blocks/crop/blockCrop.Force.2.png | Bin 0 -> 547 bytes .../textures/blocks/crop/blockCrop.Force.3.png | Bin 0 -> 782 bytes .../textures/blocks/crop/blockCrop.Force.4.png | Bin 0 -> 701 bytes .../textures/blocks/crop/blockCrop.Force.5.png | Bin 0 -> 925 bytes 12 files changed, 162 insertions(+), 55 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.5.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java index c0113e869b..035b13dfbf 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -6,28 +6,27 @@ import java.util.Map; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; +import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock; -import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; public class BlockBaseModular extends BasicBlock { protected Material blockMaterial; protected int blockColour; - protected BlockTypes thisBlock; + public BlockTypes thisBlock; protected String thisBlockMaterial; protected final String thisBlockType; @@ -42,7 +41,7 @@ public class BlockBaseModular extends BasicBlock { registerComponent(); } - protected BlockBaseModular(final String unlocalizedName, final String blockMaterial, + protected BlockBaseModular(final String unlocalizedName, final String blockMaterialString, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { super(blockType, unlocalizedName, vanillaMaterial, miningLevel); @@ -50,33 +49,20 @@ public class BlockBaseModular extends BasicBlock { this.setBlockTextureName(CORE.MODID + ":" + blockType.getTexture()); this.blockColour = colour; this.thisBlock = blockType; - this.thisBlockMaterial = blockMaterial; + this.thisBlockMaterial = blockMaterialString; this.thisBlockType = blockType.name().toUpperCase(); this.setBlockName(this.GetProperName()); int fx = getBlockTypeMeta(); + //ItemBlockGtBlock.sNameCache.put("block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase(), GetProperName()); + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); if (fx == 0) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") - .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), - ItemUtils.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("block" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this)); } else if (fx == 1) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "") - .replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), - ItemUtils.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("frameGt" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this)); } else if (fx == 2) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") - .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), - ItemUtils.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("frameGt" + thisBlockMaterial.replace(" ", ""), ItemUtils.getSimpleStack(this)); } } @@ -135,7 +121,7 @@ public class BlockBaseModular extends BasicBlock { } public String GetProperName() { - String tempIngot; + String tempIngot = null; if (this.thisBlock == BlockTypes.STANDARD) { tempIngot = "Block of " + this.thisBlockMaterial; } @@ -145,13 +131,20 @@ public class BlockBaseModular extends BasicBlock { else if (this.thisBlock == BlockTypes.ORE) { tempIngot = this.thisBlockMaterial + " Ore [Old]"; } - else { - - tempIngot = this.getUnlocalizedName().replace("tile.blockGt", "ingot"); - } return tempIngot; } + @Override + public String getLocalizedName() { + String aFormattedLangName = GetProperName(); + return GT_LanguageManager.addStringLocalization("block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase()+".name", aFormattedLangName); + } + + @Override + public String getUnlocalizedName() { + return "block."+blockMaterial.getUnlocalizedName()+"."+this.thisBlock.name().toLowerCase(); + } + @Override public boolean isOpaqueCube() { return false; diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java index 396689ef63..af6f036942 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java @@ -1,30 +1,35 @@ package gtPlusPlus.core.item.base.itemblock; +import java.util.HashMap; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.base.BlockBaseModular; import gtPlusPlus.core.block.base.BlockBaseOre; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.EntityUtils; import gtPlusPlus.core.util.sys.KeyboardUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; public class ItemBlockGtBlock extends ItemBlock { + public static HashMap sNameCache = new HashMap(); + protected final int blockColour; private int sRadiation; private Material mMaterial; + protected BlockTypes thisBlockType; private final Block thisBlock; private boolean isOre = false; @@ -50,15 +55,46 @@ public class ItemBlockGtBlock extends ItemBlock { if (block instanceof BlockBaseModular){ BlockBaseModular g = (BlockBaseModular) block; this.mMaterial = g.getMaterialEx(); + this.thisBlockType = g.thisBlock; } else { this.mMaterial = null; + this.thisBlockType = BlockTypes.STANDARD; } - // GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block", - // "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", - // "").replace("-", "").replace("_", "").replace(" ", ""), - // ItemUtils.getSimpleStack(this)); + } + + public int getBlockTypeMeta() { + if (this.thisBlockType.equals(BlockTypes.STANDARD)) { + return 0; + } + else if (this.thisBlockType.equals(BlockTypes.FRAME)) { + return 1; + } + else if (this.thisBlockType.equals(BlockTypes.ORE)) { + return 2; + } + return 0; + } + + public String getUnlocalizedBlockName() { + return "block."+mMaterial.getUnlocalizedName()+"."+this.thisBlockType.name().toLowerCase(); + } + + public String GetProperName() { + String tempIngot = sNameCache.get(getUnlocalizedBlockName()); + if (tempIngot == null) { + tempIngot = "BAD.UNLOCAL.NAME"; + } + return tempIngot; + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return this.thisBlock.getLocalizedName(); + //Logger.INFO("Unlocal Name: "+this.getUnlocalizedName()); + //String aFormattedLangName = GetProperName(); + //return GT_LanguageManager.addStringLocalization("block."+mMaterial.getUnlocalizedName()+"."+this.thisBlockType.name().toLowerCase()+".name", aFormattedLangName); } public int getRenderColor(final int aMeta) { diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java index 48813310d2..033aaac663 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java @@ -5,6 +5,7 @@ import java.util.List; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.bartcrops.crops.Crop_Force; import gtPlusPlus.xmod.bartcrops.crops.Crop_Hemp; import ic2.api.crops.CropCard; import ic2.api.crops.Crops; @@ -48,6 +49,7 @@ public class LoaderOfTheCrops { List p = new ArrayList(); p.add(new LoaderOfTheCrops(new Crop_Hemp(), new ItemStack(Item.getItemById(111), 3))); + p.add(new LoaderOfTheCrops(new Crop_Force(), new ItemStack(Item.getItemById(111), 3))); return p; } diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java index ca2a044564..0f590dcf2b 100644 --- a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java @@ -14,10 +14,10 @@ import net.minecraft.util.IIcon; import speiger.src.crops.api.ICropCardInfo; public abstract class BaseCrop extends CropCard implements ICropCardInfo { + @SideOnly(Side.CLIENT) public void registerSprites(IIconRegister iconRegister) { this.textures = new IIcon[this.maxSize()]; - for (int i = 1; i <= this.textures.length; ++i) { this.textures[i - 1] = iconRegister.registerIcon(CORE.MODID+":crop/blockCrop." + this.name() + "." + i); } diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java new file mode 100644 index 0000000000..06238a4589 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Force.java @@ -0,0 +1,53 @@ +package gtPlusPlus.xmod.bartcrops.crops; + +import gtPlusPlus.core.material.ELEMENT.STANDALONE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop; +import ic2.api.crops.ICropTile; +import net.minecraft.item.ItemStack; + +public class Crop_Force extends BaseAestheticCrop { + + public int tier() { + return 4; + } + + public String name() { + return "Force"; + } + + public String discoveredBy() { + return "Alkalus"; + } + + public int growthDuration(ICropTile crop) { + int ret = 800; + + /*if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) { + ret = 225; + }*/ + + if (CORE_Preloader.DEBUG_MODE) { + ret = 1; + } + + return ret; + } + + public String[] attributes() { + return new String[]{"Power", "Soil", "Yellow", "Gold"}; + } + + public ItemStack getGain(ICropTile crop) { + ItemStack ret = this.getDisplayItem(); + if (MathUtils.randInt(0, 10) > 8) { + ret = STANDALONE.FORCE.getNugget(MathUtils.randInt(4, 8)); + } + return ret; + } + + public ItemStack getDisplayItem() { + return STANDALONE.FORCE.getNugget(0); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java index ffaa77a0be..c5e33c088d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java @@ -1,20 +1,13 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import java.util.*; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.minecraft.BlockPos; @@ -24,12 +17,18 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { private boolean mHasBeenMapped = false; private int mCurrentDimension = 0; public int mMode = 0; + public boolean mLocked = true; public GregtechMetaWirelessCharger(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); @@ -42,6 +41,9 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { @Override public String[] getDescription() { return new String[] {this.mDescription, + "Can be locked to the owner by sneaking with a screwdriver", + "Can also be locked with a lock upgrade", + "", "3 Modes, Long-Range, Local and Mixed.", "Long-Range: Can supply 2A of power to a single player up to "+(GT_Values.V[this.mTier]*4)+"m away.", "Local: Can supply several Amps to each player within "+this.mTier*20+"m.", @@ -150,6 +152,11 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { mWirelessChargingMap.clear(); mLocalChargingMap.clear(); + if (aPlayer.isSneaking()) { + mLocked = !mLocked; + PlayerUtils.messagePlayer(aPlayer, mLocked ? "Locked to owner." : "Unlocked."); + } + if (!this.getBaseMetaTileEntity().getWorld().playerEntities.isEmpty()){ for (Object mTempPlayer : this.getBaseMetaTileEntity().getWorld().playerEntities){ if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ @@ -348,12 +355,14 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { @Override public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setBoolean("mLocked", this.mLocked); aNBT.setInteger("mMode", this.mMode); aNBT.setInteger("mCurrentDimension", this.mCurrentDimension); } @Override public void loadNBTData(final NBTTagCompound aNBT) { + this.mLocked = aNBT.getBoolean("mLocked"); this.mMode = aNBT.getInteger("mMode"); this.mCurrentDimension = aNBT.getInteger("mCurrentDimension"); } @@ -366,6 +375,19 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { private Map mWirelessChargingMap = new HashMap(); private Map mLocalChargingMap = new HashMap(); + + private boolean isValidPlayer(EntityPlayer aPlayer) { + BaseMetaTileEntity aTile = (BaseMetaTileEntity) this.getBaseMetaTileEntity(); + if (mLocked || ( aTile != null && aTile.privateAccess())) { + if (aPlayer.getUniqueID().equals(getBaseMetaTileEntity().getOwnerUuid())){ + return true; + } + else { + return false; + } + } + return true; + } @Override public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { @@ -389,7 +411,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { if (this.mMode == 1 || this.mMode == 2){ int tempRange = (this.mMode == 1 ? this.mTier*20 : this.mTier*10); if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){ - if (!mLocalChargingMap.containsKey(mTemp.getPersistentID())){ + if (isValidPlayer(mTemp) && !mLocalChargingMap.containsKey(mTemp.getPersistentID())){ mLocalChargingMap.put(mTemp.getPersistentID(), mTemp); ChargingHelper.addValidPlayer(mTemp, this); //PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m - Local]."); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index ecd4882516..7514a3dea6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -362,6 +362,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas this.mOutputItems = outputs; this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; + this.updateSlots(); return true; } } diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.1.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.1.png new file mode 100644 index 0000000000..87b1b2b7d3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.2.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.2.png new file mode 100644 index 0000000000..631045a936 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.3.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.3.png new file mode 100644 index 0000000000..e987c60374 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.4.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.4.png new file mode 100644 index 0000000000..67965b0c01 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.5.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.5.png new file mode 100644 index 0000000000..c587e84b78 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Force.5.png differ -- cgit