-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix armor checks triggering for non-armor equipment
- Loading branch information
Showing
9 changed files
with
67 additions
and
5 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
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
22 changes: 22 additions & 0 deletions
22
polymer-core/src/testmod/java/eu/pb4/polymertest/BuggedItem.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,22 @@ | ||
package eu.pb4.polymertest; | ||
|
||
import eu.pb4.polymer.core.api.item.PolymerItem; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.Items; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
|
||
public class BuggedItem extends Item implements PolymerItem { | ||
|
||
public BuggedItem(Settings settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) { | ||
//if(!PolymerResourcePackUtils.hasPack(player)) return vanillaItem; | ||
return Items.SHIELD; | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
polymer-core/src/testmod/java/eu/pb4/polymertest/mixin/RedstoneLampMixin.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,14 @@ | ||
package eu.pb4.polymertest.mixin; | ||
|
||
import net.minecraft.block.RedstoneLampBlock; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(RedstoneLampBlock.class) | ||
public class RedstoneLampMixin { | ||
@ModifyConstant(method = "neighborUpdate", constant = @Constant(intValue = 4)) | ||
private int fastLamps(int i) { | ||
return 1; | ||
} | ||
} |
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
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
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
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