Skip to content

Commit 5e3b931

Browse files
committed
upload main lol
1 parent 88c462c commit 5e3b931

8 files changed

Lines changed: 17 additions & 47 deletions

File tree

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ org.gradle.configuration-cache=false
77

88
# Fabric Properties
99
# check these on https://fabricmc.net/develop
10-
minecraft_version=1.21.1
10+
minecraft_version=1.21.11
1111
loader_version=0.18.4
1212
loom_version=1.15-SNAPSHOT
1313

@@ -17,4 +17,4 @@ maven_group=com.wfphantom
1717
archives_base_name=neobeefix
1818

1919
# Dependencies
20-
fabric_version=0.116.8+1.21.1
20+
fabric_version=0.141.3+1.21.11
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package com.wfphantom.neobeefix.mixin.client;
22

3+
import net.minecraft.client.renderer.entity.BeeRenderer;
34
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
4-
import net.minecraft.world.entity.LivingEntity;
5-
import net.minecraft.world.entity.animal.Bee;
65
import org.spongepowered.asm.mixin.Mixin;
76
import org.spongepowered.asm.mixin.injection.At;
87
import org.spongepowered.asm.mixin.injection.Inject;
@@ -11,7 +10,7 @@
1110
@Mixin(LivingEntityRenderer.class)
1211
public class BeeRendererMixin {
1312
@Inject(method = "getFlipDegrees", at = @At("HEAD"), cancellable = true)
14-
private void beeFlips180(LivingEntity entity, CallbackInfoReturnable<Float> cir){
15-
if (entity instanceof Bee) cir.setReturnValue(180.0F);
13+
private void beeFlips180(CallbackInfoReturnable<Float> cir){
14+
if ((Object) this instanceof BeeRenderer) cir.setReturnValue(180.0F);
1615
}
1716
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.wfphantom.neobeefix.mixin;
22

33
import net.minecraft.world.DifficultyInstance;
4+
import net.minecraft.world.entity.EntitySpawnReason;
45
import net.minecraft.world.entity.Mob;
5-
import net.minecraft.world.entity.MobSpawnType;
66
import net.minecraft.world.entity.SpawnGroupData;
7-
import net.minecraft.world.entity.animal.Bee;
7+
import net.minecraft.world.entity.animal.bee.Bee;
88
import net.minecraft.world.level.ServerLevelAccessor;
99
import org.jetbrains.annotations.Nullable;
1010
import org.spongepowered.asm.mixin.Mixin;
@@ -15,7 +15,7 @@
1515
@Mixin(Mob.class)
1616
public class BeeGravityMixin {
1717
@Inject(method = "finalizeSpawn", at = @At("HEAD"))
18-
private void noGravityOnSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType reason, @Nullable SpawnGroupData spawnData, CallbackInfoReturnable<SpawnGroupData> cir) {
18+
private void noGravityOnSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason reason, @Nullable SpawnGroupData spawnData, CallbackInfoReturnable<SpawnGroupData> cir) {
1919
if ((Object) this instanceof Bee bee) bee.setNoGravity(true);
2020
}
2121
}

src/main/java/com/wfphantom/neobeefix/mixin/BeeMixin.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
package com.wfphantom.neobeefix.mixin;
22

3-
import net.minecraft.nbt.CompoundTag;
3+
import com.mojang.serialization.Codec;
44
import net.minecraft.server.level.ServerLevel;
55
import net.minecraft.world.entity.AgeableMob;
6-
import net.minecraft.world.entity.animal.Bee;
7-
import net.minecraft.world.level.Level;
6+
import net.minecraft.world.entity.animal.bee.Bee;
7+
import net.minecraft.world.level.storage.ValueInput;
88
import org.spongepowered.asm.mixin.Mixin;
99
import org.spongepowered.asm.mixin.injection.At;
1010
import org.spongepowered.asm.mixin.injection.Inject;
11-
import org.spongepowered.asm.mixin.injection.Redirect;
1211
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1312
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1413

1514
@Mixin(Bee.class)
1615
public class BeeMixin {
17-
@Redirect(method = "wantsToEnterHive", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;isNight()Z"))
18-
private boolean noSkylight_isNotNight(Level level) {
19-
return level.dimensionType().hasSkyLight() && level.isNight();
20-
}
21-
@Redirect(method = "wantsToEnterHive", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;isRaining()Z"))
22-
private boolean noSkylight_isNotRaining(Level level) {
23-
return level.dimensionType().hasSkyLight() && level.isRaining();
24-
}
2516
@Inject(method = "readAdditionalSaveData", at = @At("TAIL"))
26-
private void noGravityOnLoad(CompoundTag tag, CallbackInfo ci) {
27-
if (!tag.contains("NoGravity")) ((Bee) (Object) this).setNoGravity(true);
17+
private void noGravityOnLoad(ValueInput in, CallbackInfo ci) {
18+
if (in.read("NoGravity", Codec.BOOL).isEmpty()) ((Bee) (Object) this).setNoGravity(true);
2819
}
2920
@Inject(method = "getBreedOffspring(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/AgeableMob;)Lnet/minecraft/world/entity/AgeableMob;", at = @At("RETURN"))
3021
private void noGravityOnBreed(ServerLevel level, AgeableMob otherParent, CallbackInfoReturnable<AgeableMob> cir) {

src/main/java/com/wfphantom/neobeefix/mixin/BeehiveBlockEntityMixin.java

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.wfphantom.neobeefix.mixin;
22

3+
import net.minecraft.server.level.ServerLevel;
34
import net.minecraft.world.entity.Entity;
4-
import net.minecraft.world.entity.animal.Bee;
5-
import net.minecraft.world.level.Level;
5+
import net.minecraft.world.entity.animal.bee.Bee;
66
import net.minecraft.world.level.block.TurtleEggBlock;
77
import org.spongepowered.asm.mixin.Mixin;
88
import org.spongepowered.asm.mixin.injection.At;
@@ -12,7 +12,7 @@
1212
@Mixin(TurtleEggBlock.class)
1313
public class TurtleEggBlockMixin {
1414
@Inject(method = "canDestroyEgg", at = @At("HEAD"), cancellable = true)
15-
private void beesCannotDestroyEggs(Level level, Entity entity, CallbackInfoReturnable<Boolean> cir){
15+
private void beesCannotDestroyEggs(ServerLevel level, Entity entity, CallbackInfoReturnable<Boolean> cir) {
1616
if (entity instanceof Bee) cir.setReturnValue(false);
1717
}
1818
}

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
],
3030
"depends": {
3131
"fabricloader": ">=0.18.2",
32-
"minecraft": "1.21.1",
32+
"minecraft": "1.21.11",
3333
"java": ">=21",
3434
"fabric-api": "*"
3535
},

src/main/resources/neobeefix.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compatibilityLevel": "JAVA_21",
55
"mixins": [
66
"TurtleEggBlockMixin",
7-
"BeehiveBlockEntityMixin",
87
"BeeMixin",
98
"BeeGravityMixin",
109
"RandomPosMixin",

0 commit comments

Comments
 (0)