Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explosions from MCHeli Bullets/Bombs/etc. are not prevented #163

Open
mstingl opened this issue Dec 10, 2017 · 3 comments
Open

Explosions from MCHeli Bullets/Bombs/etc. are not prevented #163

mstingl opened this issue Dec 10, 2017 · 3 comments

Comments

@mstingl
Copy link

mstingl commented Dec 10, 2017

Any explosions, which are caused by the bullets, rockets or bombs from the MCHeli mod are not prevented.
I also tried to implement the protections by myself, but it only works in half. Sometimes the rockets are removed and sometimes not.
But, when you set the gamerule mobGriefing to false, the explosions are prevented.

@1whohears
Copy link

Im pretty sure something like this works.

{
	"modid": "mcheli",
	"segments": [
		{
			"class": "mcheli.weapon.MCH_EntityBaseBullet",
			"type": "entity",
			"actions": "TRACKED",
			"flags": "EXPLOSIONS",
			"condition": "explode > 0",
			"explode": [
				{
					"element": "explosionPower",
					"type": "FIELD"
				}
			],
			"range": 10
		}
	]
}

But the reason why it seems like half the time it works and the other half it doesnt is because MyTown2 doesnt check every entity every single tick. It only checks once every 20. So most of the time the bullet is just too fast. So this requires a change to the mod but because its all on github thats easy. So go to:
mytown.protection.ProtectionHandlers line 108

if(MinecraftServer.getServer().getTickCounter() % 20 == 5) {
        ProtectionManager.checkExist(entity, false);
}

you can either comment out the if statement or change the 20 to some smaller number. Its safest to take out the if statement cause then the bullets are checked every tick but I dont know how that impacts performance.

@rvveber
Copy link

rvveber commented Dec 1, 2021

Or just use griefdefender, in... 2021
(look at issue creation date)

@1whohears
Copy link

Or just use griefdefender, in... 2021 (look at issue creation date)

It says 1.12-1.18 has it been tested in 1.7.10 or a similar version? I know this mod is old but I didnt know GriefDefender existed. So I'll try it out later. Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants