hi all i don't actually have an error YET lol. my question is which of these options would be the most compatible with other mods whilst accomplishing what i want.
My goal: i am trying to modify base empty handed digging speed to make it either abysmally slow (like 0.01f?) or just not work (no tree punching at all) i would rather it just not work on trees . but i want to make mining speed slower for everything so just changing wood isnt really an option
My options:
PlayerInteractEvent(LEFT_CLICK_BLOCK) to cancel tree punching // i have no idea exactly how this might effect compatibility if i require my tools to break the block it will also exclude modded tools right?
PlayerEvent.BreakSpeed - to change the digging speed // will this effect every tool or just empty hand and can i fix it by increasing speed to compensate? also the copatibility of slowing down other mods tools may be an issue.
BlockEvent.BreakEvent - called just before block destruction -cancelled to abort without destroying the block. //seems most easy fix for wood but wont help with my speed issue
BlockEvent.HarvestDropsEvent could just have punching destroy wood but this is my least favorite option
i appreciate all help and i know my grammar sucks.
PlayerEvent.BreakSpeed is probably the event you want. It's fired regardless of what tool the player is holding.
You can check whether the player the player is holding the correct tool for the block and what type of block it is and cancel the event to prevent the block from breaking.
I used this in 1.8 here to prevent players from breaking logs without the correct tool. Cancelling BreakSpeed makes the block impossible to break, but just in case it's broken without the correct tool somehow, I cancel BreakEvent as well. Only cancelling BreakEvent would allow the block to be broken as normal but pop back in immediately after it's broken.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
java.lang.NullPointerException: Unexpected error
at com.bigdirty1985.hardcore.main.MEventHandler.breakEvent(MEventHandler.java:92)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_10_MEventHandler_breakEvent_BreakSpeed.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:89)
at net.minecraft.entity.player.EntityPlayer.getBreakSpeed(EntityPlayer.java:958)
at net.minecraftforge.common.ForgeHooks.blockStrength(ForgeHooks.java:140)
at net.minecraft.block.Block.getPlayerRelativeBlockHardness(Block.java:787)
at net.minecraft.client.multiplayer.PlayerControllerMP.clickBlock(PlayerControllerMP.java:212)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1491)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2039)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)
at net.minecraft.client.Minecraft.run(Minecraft.java:962)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at com.bigdirty1985.hardcore.main.MEventHandler.breakEvent(MEventHandler.java:92)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_10_MEventHandler_breakEvent_BreakSpeed.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:89)
at net.minecraft.entity.player.EntityPlayer.getBreakSpeed(EntityPlayer.java:958)
at net.minecraftforge.common.ForgeHooks.blockStrength(ForgeHooks.java:140)
at net.minecraft.block.Block.getPlayerRelativeBlockHardness(Block.java:787)
at net.minecraft.client.multiplayer.PlayerControllerMP.clickBlock(PlayerControllerMP.java:212)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1491)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 853175336 bytes (813 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar)
UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar)
UCHIJAAAA dirtyshardcore{0.0.1} [Dirty's Hardcore Vanilla Overhaul] (bin)
GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 8400GS/PCIe/SSE2'
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce 8400GS/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
EDIT2: ok this is wierd i reloaded and it worked this time but then when i looked away it crashed again also i was trying to change this because i thought it would be better code to reference an instance rather than specifying the item but i cant get the errors to go away
------------------------------------------------------------------------------------------------------------------------------v v this part
EDIT3: Ok I AM a retard apparently. When i read Choonster's response it was like 3 am. So i am reading through his code now because i just remembered he posted it lol.
ok 1 last question before i mark this as solved i am continueing with this method.
@SubscribeEvent // blocks that mine slower barehanded use a ?string array? maybe
public void playerDigsSlow(BreakSpeed event){
if("tile.dirt".equals(event.block.getUnlocalizedName()) || "tile.grass".equals(event.block.getUnlocalizedName())){
if(event.entityPlayer.getHeldItem() == null){
event.newSpeed = 0.1f;
return;}
if(!(event.entityPlayer.getHeldItem().getItem() instanceof ItemSpade || event.entityPlayer.getHeldItem().getItem() == MItem.diggingStick)){
event.newSpeed = 0.1f;
}
}
}
i am aware that i can manually add new blocks to this sand, gravel , stone etc. but if i wanted to slow down steves speed on the player itself is there a simpler way?
EDIT: I decided to go ahead and mark this solved i have all the info I NEED to make this work but i am still open to suggestions and thanks again everyone!
There's no good reason to use the unlocalised names to compare Blocks, just compare the Block instances directly with ==. Vanilla Block instances are stored in the Blocks class.
Look at the canToolHarvestBlock method in the code I posted to see how to correctly determine whether the player's held item can harvest the specified Block. Don't assume that all spades extend from ItemSpade (because tools from mods like Tinkers Construct don't), use the harvest tool/level methods Forge provides for you. In 1.7.10, most of the IBlockState parameters are replaced with metadata parameters.
If you need to know whether a Block requires a tool to harvest (e.g. Stone vs. Sand), use Block#getMaterial and Material#isToolNotRequired.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
hi all i don't actually have an error YET lol. my question is which of these options would be the most compatible with other mods whilst accomplishing what i want.
My goal: i am trying to modify base empty handed digging speed to make it either abysmally slow (like 0.01f?) or just not work (no tree punching at all) i would rather it just not work on trees . but i want to make mining speed slower for everything so just changing wood isnt really an option
My options:
PlayerInteractEvent(LEFT_CLICK_BLOCK) to cancel tree punching // i have no idea exactly how this might effect compatibility if i require my tools to break the block it will also exclude modded tools right?
PlayerEvent.BreakSpeed - to change the digging speed // will this effect every tool or just empty hand and can i fix it by increasing speed to compensate? also the copatibility of slowing down other mods tools may be an issue.
BlockEvent.BreakEvent - called just before block destruction -cancelled to abort without destroying the block. //seems most easy fix for wood but wont help with my speed issue
BlockEvent.HarvestDropsEvent could just have punching destroy wood but this is my least favorite option
i appreciate all help and i know my grammar sucks.
I currently have three mods.
Dirty's Cotton 1.0.1 for 1.7.10: forum post
OP-ig Make pigs not useless! Curseforge
I'll get a banner one day. I'm busy
Dirty's Hardcore Vanilla Overhaul Mod(Cancelled until further notice): forum post
PlayerEvent.BreakSpeed is probably the event you want. It's fired regardless of what tool the player is holding.
You can check whether the player the player is holding the correct tool for the block and what type of block it is and cancel the event to prevent the block from breaking.
I used this in 1.8 here to prevent players from breaking logs without the correct tool. Cancelling BreakSpeed makes the block impossible to break, but just in case it's broken without the correct tool somehow, I cancel BreakEvent as well. Only cancelling BreakEvent would allow the block to be broken as normal but pop back in immediately after it's broken.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
thats what i figured but is tools breakspeed stacked on steves base breakspeed or does tool speed override base ?
also i want him to still be able to dig dirt and sand slightly faster but the blocks hardness should cover that correct?
I currently have three mods.
Dirty's Cotton 1.0.1 for 1.7.10: forum post
OP-ig Make pigs not useless! Curseforge
I'll get a banner one day. I'm busy
Dirty's Hardcore Vanilla Overhaul Mod(Cancelled until further notice): forum post
You can learn NOTHING with asking people to deep stuff. But you can learn basic stuff with asking like what breakspeed does? You need to try.
False. A well written explanation of a complex topic or concept is far better than staring at code for hours to try and figure it out.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
ok sorry guys i really thought i could do this i've got limited experience using events and i dont know whats wrong here.
public void breakEvent(BreakSpeed event){
if("tile.log".equals(event.block.getUnlocalizedName()) && !"item.stone_axe".equals(event.entityPlayer.getHeldItem().getUnlocalizedName())){
event.block.setBlockUnbreakable();
}
am i just retarded?lol
EDIT: i just realized that i had forgot @SubscribeEvent buuuut... now it crashes when i break it.
---- Minecraft Crash Report ----
// I let you down. Sorry
Time: 8/16/15 5:45 PM
Description: Unexpected error
java.lang.NullPointerException: Unexpected error
at com.bigdirty1985.hardcore.main.MEventHandler.breakEvent(MEventHandler.java:92)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_10_MEventHandler_breakEvent_BreakSpeed.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:89)
at net.minecraft.entity.player.EntityPlayer.getBreakSpeed(EntityPlayer.java:958)
at net.minecraftforge.common.ForgeHooks.blockStrength(ForgeHooks.java:140)
at net.minecraft.block.Block.getPlayerRelativeBlockHardness(Block.java:787)
at net.minecraft.client.multiplayer.PlayerControllerMP.clickBlock(PlayerControllerMP.java:212)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1491)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2039)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)
at net.minecraft.client.Minecraft.run(Minecraft.java:962)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at com.bigdirty1985.hardcore.main.MEventHandler.breakEvent(MEventHandler.java:92)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_10_MEventHandler_breakEvent_BreakSpeed.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:89)
at net.minecraft.entity.player.EntityPlayer.getBreakSpeed(EntityPlayer.java:958)
at net.minecraftforge.common.ForgeHooks.blockStrength(ForgeHooks.java:140)
at net.minecraft.block.Block.getPlayerRelativeBlockHardness(Block.java:787)
at net.minecraft.client.multiplayer.PlayerControllerMP.clickBlock(PlayerControllerMP.java:212)
at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1491)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player508'/456, l='MpServer', x=-40.54, y=72.62, z=278.54]]
Chunk stats: MultiplayerChunkCache: 121, 121
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (-56,64,252), Chunk: (at 8,4,12 in -4,15; contains blocks -64,0,240 to -49,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 354278 game time, 318466 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 100 total; [EntityHorse['Horse'/257, l='MpServer', x=-50.50, y=71.00, z=217.06], EntityChicken['Chicken'/258, l='MpServer', x=-52.53, y=69.00, z=214.41], EntityChicken['Chicken'/259, l='MpServer', x=-49.59, y=77.00, z=330.34], EntityChicken['Chicken'/260, l='MpServer', x=-51.44, y=74.00, z=334.44], EntityHorse['Horse'/277, l='MpServer', x=-34.06, y=68.00, z=201.19], EntityHorse['Horse'/278, l='MpServer', x=-41.81, y=69.00, z=215.50], EntityChicken['Chicken'/279, l='MpServer', x=-42.53, y=70.00, z=230.47], EntityChicken['Chicken'/293, l='MpServer', x=-24.56, y=68.00, z=248.59], EntityHorse['Horse'/294, l='MpServer', x=-30.09, y=73.00, z=312.81], EntityItem['item.tile.branch'/295, l='MpServer', x=-23.28, y=74.13, z=332.59], EntityItem['item.tile.branch'/296, l='MpServer', x=-24.13, y=76.13, z=335.13], EntityItem['item.tile.branch'/297, l='MpServer', x=-23.94, y=75.13, z=333.22], EntityItem['item.tile.branch'/298, l='MpServer', x=-22.13, y=75.13, z=334.13], EntityItem['item.tile.sapling.roofed_oak'/299, l='MpServer', x=-19.13, y=81.13, z=335.88], EntityItem['item.tile.branch'/300, l='MpServer', x=-19.72, y=81.13, z=335.88], EntitySkeleton['Skeleton'/301, l='MpServer', x=-26.50, y=24.00, z=342.50], EntityItem['item.tile.branch'/302, l='MpServer', x=-23.13, y=76.13, z=336.13], EntityItem['item.tile.branch'/303, l='MpServer', x=-24.22, y=76.13, z=336.53], EntityItem['item.tile.sapling.oak'/304, l='MpServer', x=-23.13, y=77.13, z=337.75], EntityItem['item.tile.sapling.oak'/305, l='MpServer', x=-22.13, y=76.13, z=336.53], EntityItem['item.tile.branch'/306, l='MpServer', x=-21.13, y=77.13, z=338.91], EntitySheep['Sheep'/307, l='MpServer', x=-19.19, y=78.00, z=352.41], EntityChicken['Chicken'/321, l='MpServer', x=-1.63, y=71.00, z=258.41], EntityEnderman['Enderman'/322, l='MpServer', x=-0.31, y=31.00, z=273.03], EntityChicken['Chicken'/323, l='MpServer', x=-8.47, y=70.00, z=301.53], EntityBat['Bat'/324, l='MpServer', x=-18.50, y=32.39, z=310.53], EntityChicken['Chicken'/333, l='MpServer', x=5.44, y=69.00, z=246.41], EntityChicken['Chicken'/334, l='MpServer', x=11.53, y=68.00, z=250.47], EntityChicken['Chicken'/335, l='MpServer', x=12.56, y=68.00, z=256.41], EntityChicken['Chicken'/336, l='MpServer', x=5.53, y=68.00, z=262.53], EntityCreeper['Creeper'/337, l='MpServer', x=11.00, y=33.00, z=282.41], EntityChicken['Chicken'/338, l='MpServer', x=2.56, y=69.00, z=297.44], EntityChicken['Chicken'/362, l='MpServer', x=30.56, y=67.56, z=206.16], EntityChicken['Chicken'/364, l='MpServer', x=28.53, y=70.00, z=207.44], EntityZombie['Zombie'/365, l='MpServer', x=27.50, y=49.00, z=216.50], EntityZombie['Zombie'/366, l='MpServer', x=27.47, y=56.00, z=229.63], EntityBat['Bat'/367, l='MpServer', x=30.38, y=58.70, z=231.36], EntityZombie['Zombie'/368, l='MpServer', x=20.50, y=50.00, z=262.50], EntityChicken['Chicken'/369, l='MpServer', x=23.47, y=67.00, z=278.63], EntityChicken['Chicken'/377, l='MpServer', x=33.47, y=70.00, z=211.53], EntityWitch['Witch'/381, l='MpServer', x=32.50, y=26.00, z=273.13], EntityChicken['Chicken'/163, l='MpServer', x=-115.66, y=65.00, z=239.53], EntitySkeleton['Skeleton'/164, l='MpServer', x=-112.41, y=30.00, z=309.09], EntityCreeper['Creeper'/168, l='MpServer', x=-112.71, y=30.00, z=310.69], EntityChicken['Chicken'/169, l='MpServer', x=-118.44, y=77.00, z=312.44], EntityBat['Bat'/170, l='MpServer', x=-116.75, y=25.10, z=328.41], EntitySpider['Spider'/171, l='MpServer', x=-118.28, y=62.00, z=322.03], EntityPig['Pig'/172, l='MpServer', x=-118.94, y=77.00, z=318.84], EntityChicken['Chicken'/173, l='MpServer', x=-118.53, y=83.00, z=335.53], EntityChicken['Chicken'/174, l='MpServer', x=-115.53, y=79.00, z=357.44], EntityBat['Bat'/182, l='MpServer', x=-102.75, y=24.10, z=203.75], EntitySkeleton['Skeleton'/183, l='MpServer', x=-104.16, y=46.00, z=200.50], EntityCreeper['Creeper'/186, l='MpServer', x=-111.50, y=48.00, z=204.50], EntityCreeper['Creeper'/187, l='MpServer', x=-104.31, y=17.00, z=209.56], EntitySpider['Spider'/188, l='MpServer', x=-105.88, y=19.00, z=206.34], EntityZombie['Zombie'/189, l='MpServer', x=-105.16, y=17.00, z=210.53], EntitySkeleton['Skeleton'/190, l='MpServer', x=-105.75, y=49.00, z=211.31], EntityHorse['Donkey'/191, l='MpServer', x=-113.06, y=66.00, z=225.00], EntityCreeper['Creeper'/192, l='MpServer', x=-98.50, y=59.00, z=267.50], EntityHorse['Horse'/193, l='MpServer', x=-108.50, y=71.00, z=284.25], EntityCreeper['Creeper'/194, l='MpServer', x=-98.51, y=59.60, z=268.54], EntityChicken['Chicken'/195, l='MpServer', x=-107.38, y=70.00, z=281.47], EntityZombie['Zombie'/196, l='MpServer', x=-106.50, y=49.00, z=289.50], EntityChicken['Chicken'/197, l='MpServer', x=-114.44, y=77.00, z=298.56], EntityZombie['Zombie'/198, l='MpServer', x=-116.22, y=30.00, z=306.84], EntitySkeleton['Skeleton'/199, l='MpServer', x=-109.50, y=30.00, z=311.50], EntitySkeleton['Skeleton'/200, l='MpServer', x=-111.44, y=30.00, z=307.94], EntityClientPlayerMP['Player508'/456, l='MpServer', x=-40.54, y=72.62, z=278.54], EntitySkeleton['Skeleton'/201, l='MpServer', x=-97.84, y=27.00, z=321.44], EntityZombie['Zombie'/202, l='MpServer', x=-110.50, y=28.00, z=340.50], EntityZombie['Zombie'/203, l='MpServer', x=-90.00, y=18.00, z=339.44], EntityCreeper['Creeper'/204, l='MpServer', x=-109.50, y=28.00, z=345.50], EntitySkeleton['Skeleton'/205, l='MpServer', x=-102.50, y=38.00, z=345.09], EntityCreeper['Creeper'/206, l='MpServer', x=-99.50, y=26.00, z=358.38], EntitySkeleton['Skeleton'/207, l='MpServer', x=-100.34, y=26.00, z=354.84], EntityChicken['Chicken'/208, l='MpServer', x=-106.50, y=90.00, z=352.50], EntityChicken['Chicken'/209, l='MpServer', x=-102.56, y=84.00, z=357.44], EntityCreeper['Creeper'/212, l='MpServer', x=-95.91, y=20.00, z=202.69], EntitySpider['Spider'/214, l='MpServer', x=-92.50, y=54.00, z=212.50], EntityHorse['Mule'/215, l='MpServer', x=-85.09, y=67.00, z=219.25], EntityHorse['Horse'/216, l='MpServer', x=-92.00, y=67.00, z=221.06], EntityChicken['Chicken'/217, l='MpServer', x=-92.41, y=66.00, z=207.59], EntitySkeleton['Skeleton'/218, l='MpServer', x=-80.56, y=64.00, z=259.94], EntityChicken['Chicken'/219, l='MpServer', x=-98.84, y=74.01, z=293.19], EntityHorse['Horse'/220, l='MpServer', x=-94.25, y=79.00, z=290.56], EntityZombie['Zombie'/221, l='MpServer', x=-86.50, y=55.00, z=318.50], EntityZombie['Zombie'/222, l='MpServer', x=-87.59, y=55.00, z=312.00], EntityPig['Pig'/223, l='MpServer', x=-88.50, y=77.00, z=326.16], EntitySkeleton['Skeleton'/224, l='MpServer', x=-82.44, y=21.00, z=346.59], EntitySpider['Spider'/225, l='MpServer', x=-86.50, y=19.00, z=348.09], EntityZombie['Zombie'/226, l='MpServer', x=-90.97, y=18.00, z=337.47], EntitySkeleton['Skeleton'/227, l='MpServer', x=-85.09, y=33.00, z=340.47], EntitySkeleton['Skeleton'/228, l='MpServer', x=-91.66, y=38.00, z=332.86], EntityHorse['Horse'/229, l='MpServer', x=-84.00, y=73.00, z=350.28], EntityZombie['Zombie'/237, l='MpServer', x=-74.50, y=49.00, z=217.09], EntityHorse['Donkey'/238, l='MpServer', x=-70.13, y=66.00, z=226.03], EntityBat['Bat'/239, l='MpServer', x=-66.44, y=44.73, z=272.63], EntityBat['Bat'/240, l='MpServer', x=-69.03, y=48.95, z=284.34], EntityBat['Bat'/241, l='MpServer', x=-71.75, y=53.10, z=301.50], EntityChicken['Chicken'/242, l='MpServer', x=-74.41, y=74.00, z=321.63]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
at net.minecraft.client.Minecraft.run(Minecraft.java:991)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 853175336 bytes (813 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar)
UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar)
UCHIJAAAA dirtyshardcore{0.0.1} [Dirty's Hardcore Vanilla Overhaul] (bin)
GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 8400GS/PCIe/SSE2'
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce 8400GS/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
EDIT2: ok this is wierd i reloaded and it worked this time but then when i looked away it crashed again also i was trying to change this because i thought it would be better code to reference an instance rather than specifying the item but i cant get the errors to go away
------------------------------------------------------------------------------------------------------------------------------v v this part
if("tile.log".equals(event.block.getUnlocalizedName()) && event.entityPlayer.getHeldItem().getClass() == instanceof ItemAxe ) {
EDIT3: Ok I AM a retard apparently. When i read Choonster's response it was like 3 am. So i am reading through his code now because i just remembered he posted it lol.
I currently have three mods.
Dirty's Cotton 1.0.1 for 1.7.10: forum post
OP-ig Make pigs not useless! Curseforge
I'll get a banner one day. I'm busy
Dirty's Hardcore Vanilla Overhaul Mod(Cancelled until further notice): forum post
I did this:
if("tile.log".equals(e.block.getUnlocalizedName())){
if(e.entityPlayer.getHeldItem() == null){
e.newSpeed = 0;
return;
}
if(!(e.entityPlayer.getHeldItem().getItem() instanceof ItemAxe)){
e.newSpeed = 0;
}
}
Oh, didn't see that edit you made. Guess this was useless.
Animate your minecraft builds with Animated Structures: Link Removed
Sgt_SuiZ you are the man! i used your result since it was the closest to what i was trying to get working. and it was most definitely not useless.
thanks to Choonster as well now when i get the base speed for all blocks reduced ill be done with this feature of my mod but wood is working great!
I currently have three mods.
Dirty's Cotton 1.0.1 for 1.7.10: forum post
OP-ig Make pigs not useless! Curseforge
I'll get a banner one day. I'm busy
Dirty's Hardcore Vanilla Overhaul Mod(Cancelled until further notice): forum post
ok 1 last question before i mark this as solved i am continueing with this method.
@SubscribeEvent // blocks that mine slower barehanded use a ?string array? maybe
public void playerDigsSlow(BreakSpeed event){
if("tile.dirt".equals(event.block.getUnlocalizedName()) || "tile.grass".equals(event.block.getUnlocalizedName())){
if(event.entityPlayer.getHeldItem() == null){
event.newSpeed = 0.1f;
return;}
if(!(event.entityPlayer.getHeldItem().getItem() instanceof ItemSpade || event.entityPlayer.getHeldItem().getItem() == MItem.diggingStick)){
event.newSpeed = 0.1f;
}
}
}
i am aware that i can manually add new blocks to this sand, gravel , stone etc. but if i wanted to slow down steves speed on the player itself is there a simpler way?
EDIT: I decided to go ahead and mark this solved i have all the info I NEED to make this work but i am still open to suggestions and thanks again everyone!
I currently have three mods.
Dirty's Cotton 1.0.1 for 1.7.10: forum post
OP-ig Make pigs not useless! Curseforge
I'll get a banner one day. I'm busy
Dirty's Hardcore Vanilla Overhaul Mod(Cancelled until further notice): forum post
There's no good reason to use the unlocalised names to compare Blocks, just compare the Block instances directly with ==. Vanilla Block instances are stored in the Blocks class.
Look at the canToolHarvestBlock method in the code I posted to see how to correctly determine whether the player's held item can harvest the specified Block. Don't assume that all spades extend from ItemSpade (because tools from mods like Tinkers Construct don't), use the harvest tool/level methods Forge provides for you. In 1.7.10, most of the IBlockState parameters are replaced with metadata parameters.
If you need to know whether a Block requires a tool to harvest (e.g. Stone vs. Sand), use Block#getMaterial and Material#isToolNotRequired.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.