Jump to content

Get TileEntity values inside a getHarvestTool override function


superzanti

Recommended Posts

I'm trying to dynamically set the hardness and harvest levels. Hardness was easy because  I can use the world and xyz coordinates to get my tileentity. However I can't do this with a getHarvestLevel function. What are some alternatives? What can I do?

 

Thanks,

SuperZanti

Link to comment
Share on other sites

If you are on 1.7.10, there is no appropriate way to do that, but there is also a roundabout route.

You need these:

1. You can remove drop on BlockEvent#HarvestDropsEvent.

2. You can make breaking speed slow with PlayerEvent#BreakSpeed.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Unfortunately I have a lot of mods that currently only support 1.7.10. I would rather not try to go through and update them all. Basically what I want to do is set the block I place to have all the same properties of the block directly below it. My current problem is that I can't get the mining speed right.

Link to comment
Share on other sites

I'm currently using the first method.

 

But I'm not sure how minecraft calculates breakspeed. I know it looks at several factors:

[*]The hardness

[*]The level of the tool you're holding

[*]The type of the tool you're holding

[*]If you're underwater

[*]Possibly more

How does minecraft calculate this so I can get the exact breakspeed?

Link to comment
Share on other sites

I'm currently using the first method.

 

But I'm not sure how minecraft calculates breakspeed. I know it looks at several factors:

[*]The hardness

[*]The level of the tool you're holding

[*]The type of the tool you're holding

[*]If you're underwater

[*]Possibly more

How does minecraft calculate this so I can get the exact breakspeed?

You can just modify the hardness value... The value is already given.

Multiply 0.4 when the tool's level is less than that, I saw minecraft doing that.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

But I'm not sure how minecraft calculates breakspeed.

 

http://minecraft.gamepedia.com/Hardness#Speed

 

 

Right, That all makes sense, but the damage per tic is clearly:

 

MiningDamageEquation.png

 

as per the links

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Then use a pre-configured modpack as working base
    • @TileEntity I don't have any of those mods you listed. And i don't think i have a mod who have connected connected texture etc. And removing one by one i will take ages.
    • https://github.com/Spazzigator/tameable-beasts-1.21   please help me fix the errors in my project, I'm new to java and just playing around, cheers
    • Remove mods one by one or in groups until you find the mod causing this issue Or use a pre-configured modpack as working base and add new mods   Mods which may cause this issue are usually lmft (load my fkn tags), levelz, TinkersConstruct + Addons or IguanaTweaks, Silent Gear, Tetra or similar Tool mods and Create: Connected Block Textures
    • Hello. Sorry for my bad english. So i maded a modpack for myself to play. I started to play and i noticed that i can't mine any block with pickaxe. I even tried with other pickaxe but doesn't work. Mining block is so slow and after break it doesn't drop anything, just dissapears. Tried creating new world, the same thing happens. Here's the latest log.txt (wanted to paste to pastebin, but it shows that i reached the maximum memory) : https://www.mediafire.com/file/82d1z4elnopj8kk/latest.log/file I don't understand anything in log file if someone can help it would be apreciated. Maybe there's are mod conflit , if there is, then what mods should i delete? Thank you for help. I'm new to modpack creation and don't know which mods goes together without conflit.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.