Remove a few no longer needed mixins (#1243)
This commit is contained in:
1 parent
763abe68c9
commit
212b6a792e
12 files changed
+10
-152
No files matched your search
@@ -1,53 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.BiomeEffectsInterface;
|
||||
import net.minecraft.world.biome.BiomeEffects;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Mixin(BiomeEffects.class)
|
||||
public class BiomeEffects_scarpetMixin implements BiomeEffectsInterface
|
||||
{
|
||||
@Shadow @Final private int fogColor;
|
||||
|
||||
@Shadow @Final private Optional<Integer> foliageColor;
|
||||
|
||||
@Shadow @Final private int skyColor;
|
||||
|
||||
@Shadow @Final private int waterColor;
|
||||
|
||||
@Shadow @Final private int waterFogColor;
|
||||
|
||||
@Override
|
||||
public int getCMFogColor()
|
||||
{
|
||||
return fogColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Integer> getCMFoliageColor()
|
||||
{
|
||||
return foliageColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCMSkyColor()
|
||||
{
|
||||
return skyColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCMWaterColor()
|
||||
{
|
||||
return waterColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCMWaterFogColor()
|
||||
{
|
||||
return waterFogColor;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.BrainInterface;
|
||||
import net.minecraft.entity.ai.brain.Brain;
|
||||
import net.minecraft.entity.ai.brain.Memory;
|
||||
import net.minecraft.entity.ai.brain.MemoryModuleType;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Mixin(Brain.class)
|
||||
public class Brain_Mixin implements BrainInterface
|
||||
{
|
||||
|
||||
@Shadow @Final private Map<MemoryModuleType<?>, Optional<? extends Memory<?>>> memories;
|
||||
|
||||
@Override
|
||||
public Map<MemoryModuleType<?>, Optional<? extends Memory<?>>> getMobMemories()
|
||||
{
|
||||
return memories;
|
||||
}
|
||||
}
|
||||
@@ -42,11 +42,6 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAgeCM() {
|
||||
return this.itemAge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPickupDelayCM() {
|
||||
return this.pickupDelay;
|
||||
@@ -105,7 +100,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
|
||||
self.setStack(selfStack);
|
||||
|
||||
this.pickupDelay = Math.max(((ItemEntityInterface)other).getPickupDelayCM(), this.pickupDelay);
|
||||
this.itemAge = Math.min(((ItemEntityInterface)other).getAgeCM(), this.itemAge);
|
||||
this.itemAge = Math.min(other.getItemAge(), this.itemAge);
|
||||
|
||||
otherStack.decrement(amount);
|
||||
if (otherStack.isEmpty())
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.MemoryInterface;
|
||||
import net.minecraft.entity.ai.brain.Memory;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(Memory.class)
|
||||
public class Memory_scarpetMixin implements MemoryInterface
|
||||
{
|
||||
@Shadow private long expiry;
|
||||
|
||||
@Override
|
||||
public long getScarpetExpiry()
|
||||
{
|
||||
return expiry;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.BrainInterface;
|
||||
import carpet.fakes.MemoryInterface;
|
||||
import carpet.helpers.ParticleDisplay;
|
||||
import carpet.utils.Messenger;
|
||||
import carpet.utils.MobAI;
|
||||
@@ -63,14 +61,14 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity
|
||||
if (MobAI.isTracking(this, MobAI.TrackingType.IRON_GOLEM_SPAWNING))
|
||||
{
|
||||
long time;
|
||||
Optional<? extends Memory<?>> last_seen = ((BrainInterface)this.brain).getMobMemories().get(MemoryModuleType.GOLEM_DETECTED_RECENTLY);
|
||||
Optional<? extends Memory<?>> last_seen = this.brain.getMemories().get(MemoryModuleType.GOLEM_DETECTED_RECENTLY);
|
||||
if (!last_seen.isPresent())
|
||||
{
|
||||
time = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
time = ((MemoryInterface)last_seen.get()).getScarpetExpiry();
|
||||
time = last_seen.get().getExpiry();
|
||||
}
|
||||
boolean recentlySeen = time > 0;
|
||||
Optional<Long> optional_11 = this.brain.getOptionalMemory(MemoryModuleType.LAST_SLEPT);
|
||||
|
||||
Reference in new issue
Block a user