Skip to content

Commit 9d5cac7

Browse files
committed
Port to 1.21.2/3 complete.
1 parent dab9916 commit 9d5cac7

33 files changed

+201
-203
lines changed

src/client/java/org/flenarn/render/entity/custom/WeepingFishingBobberEntityRenderer.java

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
import net.minecraft.client.render.*;
88
import net.minecraft.client.render.entity.EntityRenderer;
99
import net.minecraft.client.render.entity.EntityRendererFactory;
10-
import net.minecraft.client.render.entity.state.FishingBobberEntityState;
1110
import net.minecraft.client.util.math.MatrixStack;
1211
import net.minecraft.entity.player.PlayerEntity;
13-
import net.minecraft.entity.projectile.FishingBobberEntity;
1412
import net.minecraft.item.ItemStack;
15-
import net.minecraft.item.Items;
1613
import net.minecraft.util.Arm;
1714
import net.minecraft.util.Identifier;
1815
import net.minecraft.util.math.MathHelper;
@@ -57,8 +54,8 @@ public void render(WeepingFishingBobberEntityState weepingFishingBobberEntitySta
5754

5855
int j = 16;
5956

60-
for (int k = 0; k < 6; ++k) {
61-
renderFishingLine(f, g, h, vertexConsumer1, entry1, percentage(k, 16), percentage(k + 1, 16));
57+
for (int k = 0; k <= 16; ++k) {
58+
renderFishingLine(f, g, h, vertexConsumer1, entry1, percentage(k, j), percentage(k + 1, 16));
6259
}
6360

6461
matrixStack.pop();
@@ -77,7 +74,7 @@ private Vec3d getHandPos(PlayerEntity player, float f, float tickDelta) {
7774
Vec3d vec3d = this.dispatcher.camera.getProjection().getPosition((float)i * 0.525F, -0.1F).multiply(m).rotateY(f * 0.5F).rotateX(-f * 0.7F);
7875
return player.getCameraPosVec(tickDelta).add(vec3d);
7976
} else {
80-
float g = MathHelper.lerp(tickDelta, player.prevBodyYaw, player.bodyYaw) * ((float)Math.PI / 180F);
77+
float g = MathHelper.lerp(tickDelta, player.prevBodyYaw, player.bodyYaw) * 0.017453292F;
8178
double d = MathHelper.sin(g);
8279
double e = MathHelper.cos(g);
8380
float h = player.getScale();
@@ -114,6 +111,20 @@ public WeepingFishingBobberEntityState createRenderState() {
114111
return new WeepingFishingBobberEntityState();
115112
}
116113

114+
public void updateRenderState(WeepingFishingBobberEntity weepingFishingBobberEntity, WeepingFishingBobberEntityState weepingFishingBobberEntityState, float f) {
115+
super.updateRenderState(weepingFishingBobberEntity, weepingFishingBobberEntityState, f);
116+
PlayerEntity playerEntity = weepingFishingBobberEntity.getPlayerOwner();
117+
if (playerEntity == null) {
118+
weepingFishingBobberEntityState.pos = Vec3d.ZERO;
119+
} else {
120+
float g = playerEntity.getHandSwingProgress(f);
121+
float h = MathHelper.sin(MathHelper.sqrt(g) * 3.1415927F);
122+
Vec3d vec3d = this.getHandPos(playerEntity, h, f);
123+
Vec3d vec3d2 = weepingFishingBobberEntity.getLerpedPos(f).add(0.0, 0.25, 0.0);
124+
weepingFishingBobberEntityState.pos = vec3d.subtract(vec3d2);
125+
}
126+
}
127+
117128
protected boolean canBeCulled(WeepingFishingBobberEntity weepingFishingBobberEntity) {
118129
return false;
119130
}

src/main/generated/data/nether_additions/recipe/basalt_brick_slab.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_bricks"
7-
}
5+
"S": "nether_additions:basalt_bricks"
86
},
97
"pattern": [
108
"SSS"

src/main/generated/data/nether_additions/recipe/basalt_brick_stairs.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_bricks"
7-
}
5+
"S": "nether_additions:basalt_bricks"
86
},
97
"pattern": [
108
" S",

src/main/generated/data/nether_additions/recipe/basalt_brick_wall.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_bricks"
7-
}
5+
"S": "nether_additions:basalt_bricks"
86
},
97
"pattern": [
108
"SSS",

src/main/generated/data/nether_additions/recipe/basalt_bricks.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "minecraft:smooth_basalt"
7-
}
5+
"S": "minecraft:smooth_basalt"
86
},
97
"pattern": [
108
"SS",

src/main/generated/data/nether_additions/recipe/basalt_tiles.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_bricks"
7-
}
5+
"S": "nether_additions:basalt_bricks"
86
},
97
"pattern": [
108
"SS",

src/main/generated/data/nether_additions/recipe/basalt_tiles_slab.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_tiles"
7-
}
5+
"S": "nether_additions:basalt_tiles"
86
},
97
"pattern": [
108
"SSS"

src/main/generated/data/nether_additions/recipe/chiseled_basalt.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "building",
44
"key": {
5-
"S": {
6-
"item": "nether_additions:basalt_brick_slab"
7-
}
5+
"S": "nether_additions:basalt_brick_slab"
86
},
97
"pattern": [
108
"S",

src/main/generated/data/nether_additions/recipe/lithid_soup.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22
"type": "minecraft:crafting_shapeless",
33
"category": "misc",
44
"ingredients": [
5-
{
6-
"item": "nether_additions:pyrolithid"
7-
},
8-
{
9-
"item": "minecraft:bowl"
10-
},
11-
{
12-
"item": "minecraft:warped_fungus"
13-
},
14-
{
15-
"item": "minecraft:nether_wart"
16-
}
5+
"nether_additions:pyrolithid",
6+
"minecraft:bowl",
7+
"minecraft:warped_fungus",
8+
"minecraft:nether_wart"
179
],
1810
"result": {
1911
"count": 1,

src/main/generated/data/nether_additions/recipe/weeping_fishing_rod.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
"type": "minecraft:crafting_shaped",
33
"category": "misc",
44
"key": {
5-
"G": {
6-
"item": "minecraft:gold_ingot"
7-
},
8-
"S": {
9-
"item": "minecraft:stick"
10-
},
11-
"W": {
12-
"item": "minecraft:weeping_vines"
13-
}
5+
"G": "minecraft:gold_ingot",
6+
"S": "minecraft:stick",
7+
"W": "minecraft:weeping_vines"
148
},
159
"pattern": [
1610
" G",

0 commit comments

Comments
 (0)