-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c1a49e
commit ed9d4ed
Showing
5 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/org/blocovermelho/bvextension/mixin/DisableEndermanGriefing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.blocovermelho.bvextension.mixin; | ||
|
||
import net.minecraft.entity.ai.goal.Goal; | ||
import net.minecraft.entity.ai.goal.GoalSelector; | ||
import net.minecraft.entity.mob.EndermanEntity; | ||
import org.blocovermelho.bvextension.Settings; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(EndermanEntity.class) | ||
public abstract class DisableEndermanGriefing { | ||
@Redirect(method = "initGoals", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/ai/goal/GoalSelector;add(ILnet/minecraft/entity/ai/goal/Goal;)V", ordinal = 7)) | ||
public void bvext$noop_endermanGriefingPick(GoalSelector instance, int priority, Goal goal) { | ||
if(Settings.disableEndermanGriefing) { | ||
return; | ||
} else { | ||
instance.add(priority, goal); | ||
} | ||
} | ||
|
||
@Redirect(method = "initGoals", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/ai/goal/GoalSelector;add(ILnet/minecraft/entity/ai/goal/Goal;)V", ordinal = 6)) | ||
public void bvext$noop_endermanGriefingPlace(GoalSelector instance, int priority, Goal goal) { | ||
if(Settings.disableEndermanGriefing) { | ||
return; | ||
} else { | ||
instance.add(priority, goal); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"carpet.rule.carefulBreak.desc": "Places the mined block in the player inventory when sneaking", | ||
"carpet.rule.botsDontSleep.desc" : "Makes carpet bots don't count towards playersSleepingPercentage", | ||
"carpet.rule.botPlayerListPrefix.desc": "Adds a prefix to bots on the player list" | ||
"carpet.rule.botPlayerListPrefix.desc": "Adds a prefix to bots on the player list", | ||
"carpet.rule.disableEndermanGriefing.desc" : "Removes the hability for enderman to pick and place blocks" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"carpet.rule.carefulBreak.desc": "Coloca o bloco minerado direto no inventário quando o jogador está agachado", | ||
"carpet.rule.botsDontSleep.desc" : "Faz com que bots do carpet não contem para a gamerule playersSleepingPercentage", | ||
"carpet.rule.botPlayerListPrefix.desc": "Adiciona um prefixo aos bots na lista de jogadores" | ||
"carpet.rule.botPlayerListPrefix.desc": "Adiciona um prefixo aos bots na lista de jogadores", | ||
"carpet.rule.disableEndermanGriefing.desc" : "Desabilita os endermans de pegar/colocar blocos" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters