1
0
mirror of https://github.com/cabaletta/baritone synced 2025-02-17 04:17:28 +00:00

I HATE OLD MIXIN!!!!

awesome buggy 0.7.11 hates referencing shadows in mixin superclasses wooooooo
This commit is contained in:
Brady 2023-07-01 19:38:38 -05:00
parent ccd737d0a1
commit dee7df1534
No known key found for this signature in database
GPG Key ID: 73A788379A197567
4 changed files with 7 additions and 40 deletions

View File

@ -1,37 +0,0 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.launch.mixins;
import net.minecraft.entity.Entity;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
/**
* @author Brady
*/
@Mixin(Entity.class)
public abstract class MixinEntity {
@Shadow
public World world;
@Shadow
protected EntityDataManager dataManager;
}

View File

@ -22,12 +22,13 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityFireworkRocket;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(EntityFireworkRocket.class)
public abstract class MixinEntityFireworkRocket extends MixinEntity implements IEntityFireworkRocket {
public abstract class MixinEntityFireworkRocket extends Entity implements IEntityFireworkRocket {
@Shadow
@Final
@ -39,6 +40,10 @@ public abstract class MixinEntityFireworkRocket extends MixinEntity implements I
@Shadow
public abstract boolean isAttachedToEntity();
private MixinEntityFireworkRocket(World worldIn) {
super(worldIn);
}
@Override
public EntityLivingBase getBoostedEntity() {
if (this.isAttachedToEntity() && this.boostedEntity == null) {

View File

@ -51,7 +51,7 @@ public abstract class MixinEntityLivingBase extends Entity {
@Unique
private RotationMoveEvent elytraRotationEvent;
public MixinEntityLivingBase(World worldIn) {
private MixinEntityLivingBase(World worldIn) {
super(worldIn);
}

View File

@ -16,7 +16,6 @@
"MixinChunkProviderServer",
"MixinChunkRenderContainer",
"MixinChunkRenderWorker",
"MixinEntity",
"MixinEntityFireworkRocket",
"MixinEntityLivingBase",
"MixinEntityPlayerSP",