mappings
This commit is contained in:
1 parent
91bff6a513
commit
62ee3a17c9
2 files changed
+8
-8
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=20w48a
|
minecraft_version=20w48a
|
||||||
yarn_mappings=20w48a+build.1
|
yarn_mappings=20w48a+build.7
|
||||||
loader_version=0.10.8
|
loader_version=0.10.8
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public abstract class ExperienceOrbEntityMixin implements ExperienceOrbInterface
|
|||||||
{
|
{
|
||||||
@Shadow private int amount;
|
@Shadow private int amount;
|
||||||
|
|
||||||
@Shadow private int field_27009;
|
@Shadow private int pickingCount;
|
||||||
|
|
||||||
@Shadow protected abstract int getMendingRepairCost(int repairAmount);
|
@Shadow protected abstract int getMendingRepairCost(int repairAmount);
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@ public abstract class ExperienceOrbEntityMixin implements ExperienceOrbInterface
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
return field_27009;
|
return pickingCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCount(int i) {
|
public void setCount(int i) {
|
||||||
field_27009 = i;
|
pickingCount = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "onPlayerCollision", at = @At("HEAD"))
|
@Inject(method = "onPlayerCollision", at = @At("HEAD"))
|
||||||
@@ -78,9 +78,9 @@ public abstract class ExperienceOrbEntityMixin implements ExperienceOrbInterface
|
|||||||
void addXP(PlayerEntity playerEntity, int experience)
|
void addXP(PlayerEntity playerEntity, int experience)
|
||||||
{
|
{
|
||||||
playerEntity.addExperience(experience);
|
playerEntity.addExperience(experience);
|
||||||
if (CarpetSettings.xpNoCooldown) while(field_27009 > 1)
|
if (CarpetSettings.xpNoCooldown) while(pickingCount > 1)
|
||||||
{
|
{
|
||||||
field_27009 --;
|
pickingCount --;
|
||||||
playerEntity.addExperience(experience);
|
playerEntity.addExperience(experience);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,10 +92,10 @@ public abstract class ExperienceOrbEntityMixin implements ExperienceOrbInterface
|
|||||||
))
|
))
|
||||||
void cancelApplication(PlayerEntity player, CallbackInfo ci, Map.Entry<EquipmentSlot, ItemStack> entry, ItemStack itemStack)
|
void cancelApplication(PlayerEntity player, CallbackInfo ci, Map.Entry<EquipmentSlot, ItemStack> entry, ItemStack itemStack)
|
||||||
{
|
{
|
||||||
if (CarpetSettings.xpfix && field_27009 > 1)
|
if (CarpetSettings.xpfix && pickingCount > 1)
|
||||||
{
|
{
|
||||||
int i = Math.min(getMendingRepairAmount(this.amount), itemStack.getDamage());
|
int i = Math.min(getMendingRepairAmount(this.amount), itemStack.getDamage());
|
||||||
field_27009--;
|
pickingCount--;
|
||||||
itemStack.setDamage(itemStack.getDamage() - i);
|
itemStack.setDamage(itemStack.getDamage() - i);
|
||||||
// cancel effects of mending application
|
// cancel effects of mending application
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
|
|||||||
Reference in new issue
Block a user