Everything posted by PAstBand
-
How to do something while an specific item is being use
The idea is, each tick the item is being use it should do something (Im printing number to test before i can do something better), When the player is no longer using the item it should do other thing just once. Basically *Right click holded with item in hand* *Each tick the chat should print 1* *The player stop holding right click* *the chat should print 2 just once* if the player hold click for 5 ticks the chat should like this: 1 1 1 1 1 2 This is the item class public class BasicWandItem extends Item { public BasicWandItem(Properties pProperties) { super(pProperties); } @Override public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, InteractionHand pUsedHand) { pPlayer.startUsingItem(pUsedHand); return super.use(pLevel, pPlayer, pUsedHand); } @Override public void onUsingTick(ItemStack BasicWandItem, LivingEntity player, int count) { player.sendMessage(new TranslatableComponent("1"),player.getUUID()); super.onUsingTick(BasicWandItem, player, count); } @Override public void releaseUsing(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity, int pTimeCharged) { pLivingEntity.stopUsingItem(); pLivingEntity.sendMessage(new TranslatableComponent("2"),pLivingEntity.getUUID()); super.releaseUsing(pStack, pLevel, pLivingEntity, pTimeCharged); } } } thx ❤️
-
How to do something while an specific item is being use
Im sorry to waste your time, but im able to make it works how i want. What i want is, while the player holds right click do something (for example writin 1 in the chat), and when he relese the button do something else once (for example writing 2 in the chat). I tried with this code: @Override public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, InteractionHand pUsedHand) { pPlayer.startUsingItem(pUsedHand); return super.use(pLevel, pPlayer, pUsedHand); } @Override public void onUsingTick(ItemStack BasicWandItem, LivingEntity player, int count) { player.sendMessage(new TranslatableComponent("1"),player.getUUID()); super.onUsingTick(BasicWandItem, player, count); } @Override public void releaseUsing(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity, int pTimeCharged) { pLivingEntity.stopUsingItem(); pLivingEntity.sendMessage(new TranslatableComponent("2"),pLivingEntity.getUUID()); super.releaseUsing(pStack, pLevel, pLivingEntity, pTimeCharged); }
-
How to do something while an specific item is being use
I want to perform an action each tick the player is holding right click with a custom item in their hand. I tried to use the even "onUsingTick" like this: @Override public void onUsingTick(ItemStack BasicWandItem, LivingEntity player, int count) { player.teleportTo((player.position().x+1),(player.position().y+1),(player.position().z+1)); super.onUsingTick(BasicWandItem, player, count); } but it doesn´t work, any suggestions? thx
-
Forge server crashing
how can i do that?
-
Forge server crashing
hi, i create a modded server but it crashers every time what can i do? CRASH REPORT: ---- Minecraft Crash Report ---- WARNING: coremods are present: AppleCore (AppleCore-mc1.12.2-3.1.0.jar) LoadingPlugin (HardcoreDarkness-MC1.12.2-2.0.jar) CTMCorePlugin (CTM-MC1.12-0.2.3.9.jar) Contact their authors BEFORE contacting forge // Ouch. That hurt Time: 04/06/19 21:00 Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from IndustrialCraft 2 (ic2) Caused by: java.lang.OutOfMemoryError: Java heap space A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_211, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 74055816 bytes (70 MB) / 259522560 bytes (247 MB) up to 259522560 bytes (247 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2768 28 mods loaded, 28 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:----- |:---------------- |:--------------- |:------------------------------------------ |:---------------------------------------- | | UCH | minecraft | 1.12.2 | minecraft.jar | None | | UCH | mcp | 9.42 | minecraft.jar | None | | UCH | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2768-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | UCH | forge | 14.23.5.2768 | forge-1.12.2-14.23.5.2768-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | UCH | jei | 4.8.5.132 | jei_1.12.2-4.8.5.132.jar | None | | UCH | abyssalcraft | 1.9.4.3 | AbyssalCraft-1.12.2-1.9.4.3.jar | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 | | UCH | applecore | 3.1.0 | AppleCore-mc1.12.2-3.1.0.jar | None | | UCH | appleskin | 1.0.9 | AppleSkin-mc1.12-1.0.9.jar | None | | UCH | baubles | 1.5.1 | Baubles-1.12-1.5.1.jar | None | | UCH | botania | r1.10-352 | Botania r1.10-352.jar | None | | UCH | chisel | MC1.12-0.1.0.23 | Chisel-MC1.12-0.1.0.23.jar | None | | UCH | chococraft | 0.9.1.52 | chococraft_1.12.1-0.9.1.52.jar | None | | UCH | mantle | 1.12-1.3.1.21 | Mantle-1.12-1.3.1.21.jar | None | | UCH | tconstruct | 1.12-2.8.0.45 | TConstruct-1.12-2.8.0.45.jar | None | | UCH | extrautils2 | 1.0 | extrautils2-1.12-1.7.1.jar | None | | UCEE | ic2 | 2.8.16-ex112 | industrialcraft-2-2.8.16-ex112.jar | de041f9f6187debbc77034a344134053277aa3b0 | | UC | forestry | 5.7.0.215 | forestry_1.12.2-5.7.0.215.jar | None | | UC | gravestone | 1.10.0 | gravestone-1.10.0.jar | None | | UC | hardcoredarkness | 2.0 | HardcoreDarkness-MC1.12.2-2.0.jar | d72e0dd57935b3e9476212aea0c0df352dd76291 | | UC | ironbackpacks | 1.12.2-3.0.2-3 | IronBackpacks-1.12.2-3.0.2-3.jar | None | | UC | radixcore | 1.12.x-2.2.1 | RadixCore-1.12.x-2.2.1-universal.jar | None | | UC | mca | 1.12.2-5.3.1 | MCA-1.12.x-5.3.1-universal.jar | None | | UC | nex | 2.1.14.15 | NetherEx-1.12-2.1.14.15.jar | None | | UC | harvestcraft | 1.12.2a | Pam's HarvestCraft 1.12.2a.jar | None | | UC | reborncore | 3.4.10.147 | RebornCore-1.12.2-3.4.10.147-universal.jar | 8727a3141c8ec7f173b87aa78b9b9807867c4e6b | | UC | roughmobs | 1.0 | roughMobs1.0.14-1.12.2.jar | None | | UC | spiceoflife | 1.3.11 | SpiceOfLife-mc1.12-1.3.11.jar | None | | UC | stevescarts | ${version} | StevesCarts-1.12.2-2.4.12.62.jar | None | Loaded coremods (and transformers): AppleCore (AppleCore-mc1.12.2-3.1.0.jar) squeek.applecore.asm.TransformerModuleHandler LoadingPlugin (HardcoreDarkness-MC1.12.2-2.0.jar) lumien.hardcoredarkness.asm.ClassTransformer CTMCorePlugin (CTM-MC1.12-0.2.3.9.jar) team.chisel.ctm.client.asm.CTMTransformer Pulsar/tconstruct loaded Pulses: - TinkerCommons (Enabled/Forced) - TinkerWorld (Enabled/Not Forced) - TinkerTools (Enabled/Not Forced) - TinkerHarvestTools (Enabled/Forced) - TinkerMeleeWeapons (Enabled/Forced) - TinkerRangedWeapons (Enabled/Forced) - TinkerModifiers (Enabled/Forced) - TinkerSmeltery (Enabled/Not Forced) - TinkerGadgets (Enabled/Not Forced) - TinkerOredict (Enabled/Forced) - TinkerIntegration (Enabled/Forced) - TinkerFluids (Enabled/Forced) - TinkerMaterials (Enabled/Forced) - TinkerModelRegister (Enabled/Forced) - chiselIntegration (Enabled/Not Forced) Profiler Position: N/A (disabled) Is Modded: Definitely; Server brand changed to 'fml,forge' Type: Dedicated Server (map_server.txt)
IPS spam blocked by CleanTalk.