Skip to content

Commit 28b55af

Browse files
committed
Emergency commit before my computer explodes
1 parent 812de81 commit 28b55af

File tree

54 files changed

+427
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+427
-180
lines changed

gradle.properties

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
44

5+
# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
6+
org.gradle.configuration-cache=false
7+
58
# Fabric Properties
69
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.21.6
8-
yarn_mappings=1.21.6+build.1
9-
loader_version=0.16.14
10-
loom_version=1.10-SNAPSHOT
10+
minecraft_version=1.21.9
11+
yarn_mappings=1.21.9+build.1
12+
loader_version=0.17.2
13+
loom_version=1.11-SNAPSHOT
1114

1215
# Mod Properties
1316
mod_version=0.0.5.1
1417
maven_group=net.db64.homelawnsecurity
1518
archives_base_name=homelawnsecurity
1619

1720
# Dependencies
18-
fabric_version=0.128.0+1.21.6
21+
fabric_version=0.134.0+1.21.9

gradle/wrapper/gradle-wrapper.jar

1.83 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/net/db64/homelawnsecurity/entity/ModEntities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static class Projectile {
4646
public static final EntityType<PeaEntity> PEA = register(
4747
"pea",
4848
EntityType.Builder.<PeaEntity>create(PeaEntity::new, SpawnGroup.MISC)
49-
.dimensions(0.25f, 0.25f));
49+
.dimensions(0.5f, 0.25f));
5050
}
5151

5252

src/main/java/net/db64/homelawnsecurity/entity/ai/MoveToGoalGoal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public MoveToGoalGoal(PathAwareEntity mob, double speed) {
2828

2929
this.mob = mob;
3030
this.speed = speed;
31-
this.world = mob.getWorld();
31+
this.world = mob.getEntityWorld();
3232
this.setControls(EnumSet.of(Control.MOVE));
3333
}
3434

src/main/java/net/db64/homelawnsecurity/entity/ai/StayOnPathGoal.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public StayOnPathGoal(PathAwareEntity mob, double speed) {
2929

3030
this.mob = mob;
3131
this.speed = speed;
32-
this.world = mob.getWorld();
32+
this.world = mob.getEntityWorld();
3333
this.setControls(EnumSet.of(Control.MOVE));
3434
}
3535

@@ -70,7 +70,7 @@ protected boolean targetPathPos() {
7070
public boolean shouldContinue() {
7171
return !(((IPathBoundEntity) mob).isWalkable(this.mob.getSteppingPos())
7272
//|| ((IPathBoundEntity) mob).isStart(this.mob.getSteppingPos()) // If the entity is on a starting block, this goal shouldn't be activated even though this block isn't pathable! This goal randomly chooses a block to path to, remember?
73-
|| mob.getWorld().getBlockState(mob.getSteppingPos()).isAir()) // Prevent stopping while over air
73+
|| mob.getEntityWorld().getBlockState(mob.getSteppingPos()).isAir()) // Prevent stopping while over air
7474
&& checkForExistingPath();
7575
}
7676

@@ -95,7 +95,7 @@ protected Vec3d locatePathPos(/*int avoidPathId*/) {
9595
if (!((IPathBoundEntity) mob).isWalkable(blockPos.down())) continue;
9696
Path path = this.mob.getNavigation().findPathTo(blockPos.getX(), blockPos.getY(), blockPos.getZ(), 1);
9797
if (path == null || !path.reachesTarget()) continue;
98-
//if (avoidPathId != -1 && LawnUtil.isCertainPath(blockPos, mob.getWorld(), avoidPathId)) continue;
98+
//if (avoidPathId != -1 && LawnUtil.isCertainPath(blockPos, mob.getEntityWorld(), avoidPathId)) continue;
9999

100100
this.mob.getNavigation().startMovingTo(blockPos.getX(), blockPos.getY(), blockPos.getZ(), this.speed);
101101
return Vec3d.ofBottomCenter(blockPos);

src/main/java/net/db64/homelawnsecurity/entity/ai/plant/PlantTargetGoal.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public class PlantTargetGoal<T extends LivingEntity> extends ActiveTargetGoal<T>
4242
boolean result = false;
4343

4444
for (int i = 1; i <= 2; i++) {
45-
int mainPathId = LawnUtil.getMainPathId(entity.getBlockPos(), entity.getWorld());
46-
int intersectingPathId = LawnUtil.getIntersectingPathId(entity.getBlockPos(), entity.getWorld());
45+
int mainPathId = LawnUtil.getMainPathId(entity.getBlockPos(), entity.getEntityWorld());
46+
int intersectingPathId = LawnUtil.getIntersectingPathId(entity.getBlockPos(), entity.getEntityWorld());
4747
//int pathId = i == 1 ? mainPathId : intersectingPathId;
4848
int otherPathId = i == 1 ? intersectingPathId : mainPathId;
4949

@@ -90,7 +90,7 @@ public class PlantTargetGoal<T extends LivingEntity> extends ActiveTargetGoal<T>
9090
return !(entity instanceof TargetZombieEntity);
9191
}
9292

93-
if (LawnUtil.getIntersectingPathId(entity.getBlockPos().down(), entity.getWorld()) != 0)
93+
if (LawnUtil.getIntersectingPathId(entity.getBlockPos().down(), entity.getEntityWorld()) != 0)
9494
// This plant needs to target entities on both paths, redirect them to a different predicate
9595
return intersectionPredicate.test(entity);
9696

@@ -179,7 +179,7 @@ protected void findClosestTarget() {
179179
ServerWorld serverWorld = getServerWorld(this.mob);
180180
if (this.targetClass != PlayerEntity.class && this.targetClass != ServerPlayerEntity.class) {
181181
this.targetEntity = serverWorld.getClosestEntity(
182-
this.mob.getWorld().getEntitiesByClass(this.targetClass, this.getSearchBox(this.getFollowRange()),
182+
this.mob.getEntityWorld().getEntitiesByClass(this.targetClass, this.getSearchBox(this.getFollowRange()),
183183
livingEntity -> rangePredicate.test(livingEntity) && pathPredicate.test(livingEntity)),
184184
this.getAndUpdateTargetPredicate(),
185185
this.mob,

src/main/java/net/db64/homelawnsecurity/entity/ai/zombie/ZombieMeleeAttackGoal.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public ZombieMeleeAttackGoal(PathAwareEntity mob, double speed, boolean pauseWhe
3535

3636
@Override
3737
public boolean canStart() {
38-
long l = this.mob.getWorld().getTime();
38+
long l = this.mob.getEntityWorld().getTime();
3939
if (l - this.lastUpdateTime < MAX_ATTACK_TIME) {
4040
return false;
4141
}
@@ -130,7 +130,7 @@ protected void attack(LivingEntity target) {
130130
if (this.canAttack(target)) {
131131
this.resetCooldown();
132132
this.mob.swingHand(Hand.MAIN_HAND);
133-
this.mob.tryAttack((ServerWorld) target.getWorld(), target);
133+
this.mob.tryAttack((ServerWorld) target.getEntityWorld(), target);
134134
}
135135
}
136136

src/main/java/net/db64/homelawnsecurity/entity/ai/zombie/ZombieTargetGoal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected void findClosestTarget() {
8888
ServerWorld serverWorld = getServerWorld(this.mob);
8989
if (this.targetClass != PlayerEntity.class && this.targetClass != ServerPlayerEntity.class) {
9090
this.targetEntity = serverWorld.getClosestEntity(
91-
this.mob.getWorld().getEntitiesByClass(this.targetClass, this.getSearchBox(this.getFollowRange()),
91+
this.mob.getEntityWorld().getEntitiesByClass(this.targetClass, this.getSearchBox(this.getFollowRange()),
9292
livingEntity -> rangePredicate.test(livingEntity) && notBehindPredicate.test(livingEntity) && hasHeadPredicate.test(livingEntity)),
9393
this.getAndUpdateTargetPredicate(),
9494
this.mob,

src/main/java/net/db64/homelawnsecurity/entity/client/other/CurrencyRenderer.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
import net.minecraft.client.item.ItemModelManager;
77
import net.minecraft.client.render.OverlayTexture;
88
import net.minecraft.client.render.VertexConsumerProvider;
9+
import net.minecraft.client.render.command.OrderedRenderCommandQueue;
910
import net.minecraft.client.render.entity.EntityRenderer;
1011
import net.minecraft.client.render.entity.EntityRendererFactory;
12+
import net.minecraft.client.render.state.CameraRenderState;
1113
import net.minecraft.client.util.math.MatrixStack;
1214
import net.minecraft.item.ItemDisplayContext;
1315
import net.minecraft.item.ItemStack;
@@ -39,10 +41,15 @@ protected int getSkyLight(CurrencyEntity entity, BlockPos pos) {
3941
return 15;
4042
}*/
4143

42-
public void render(CurrencyRenderState state, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
44+
public void render(
45+
CurrencyRenderState state,
46+
MatrixStack matrixStack,
47+
OrderedRenderCommandQueue orderedRenderCommandQueue,
48+
CameraRenderState cameraRenderState
49+
) {
4350
matrixStack.push();
4451
matrixStack.scale(state.scale, state.scale, state.scale);
45-
matrixStack.multiply(this.dispatcher.getRotation());
52+
matrixStack.multiply(cameraRenderState.orientation);
4653
/*if (state.model != null) {
4754
this.itemModelManager
4855
.renderItem(
@@ -56,10 +63,10 @@ public void render(CurrencyRenderState state, MatrixStack matrixStack, VertexCon
5663
state.model
5764
);
5865
}*/
59-
state.itemRenderState.render(matrixStack, vertexConsumerProvider, i, OverlayTexture.DEFAULT_UV);
66+
state.itemRenderState.render(matrixStack, orderedRenderCommandQueue, state.light, OverlayTexture.DEFAULT_UV, state.outlineColor);
6067

6168
matrixStack.pop();
62-
super.render(state, matrixStack, vertexConsumerProvider, i);
69+
super.render(state, matrixStack, orderedRenderCommandQueue, cameraRenderState);
6370
}
6471

6572
@Override
@@ -74,7 +81,7 @@ public void updateRenderState(CurrencyEntity entity, CurrencyRenderState state,
7481

7582
this.itemModelManager.updateForNonLivingEntity(state.itemRenderState, stack, ItemDisplayContext.GROUND, entity);
7683

77-
/*state.model = !stack.isEmpty() ? this.itemModelManager.getModel(stack, entity.getWorld(), null, entity.getId()) : null;
84+
/*state.model = !stack.isEmpty() ? this.itemModelManager.getModel(stack, entity.getEntityWorld(), null, entity.getId()) : null;
7885
state.stack = stack.copy();*/
7986
CurrencyComponent currency = stack.get(ModDataComponentTypes.CURRENCY);
8087
if (currency != null)

0 commit comments

Comments
 (0)