Skip to content

Commit

Permalink
1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Goby56 committed Aug 24, 2024
1 parent a0898e9 commit dec756b
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 33 deletions.
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.2

# Fabric API
fabric_version=0.97.8+1.20.5
fabric_version=0.102.1+1.21.1

# Mod Properties
mod_version=0.3.0+1.20.5
mod_version=0.3.0+1.21.1
maven_group=com.goby56.wakes
archives_base_name=wakes

# Dependencies
yacl_version=3.4.2+1.20.5-fabric
yacl_version=3.5.0+1.21-fabric
iris_version=1.7.3+1.21
modmenu_version=10.0.0
modmenu_version=11.0.0
jankson_version=1.2.2
satin_version=1.18.0
satin_version=2.0.0
6 changes: 3 additions & 3 deletions src/main/java/com/goby56/wakes/WakesClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import com.goby56.wakes.particle.ModParticles;
import com.goby56.wakes.render.SplashPlaneRenderer;
import com.goby56.wakes.render.WakeRenderer;
import ladysnake.satin.api.managed.ManagedCoreShader;
import ladysnake.satin.api.managed.ShaderEffectManager;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
Expand All @@ -21,6 +19,8 @@
import net.irisshaders.iris.api.v0.IrisApi;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.util.Identifier;
import org.ladysnake.satin.api.managed.ManagedCoreShader;
import org.ladysnake.satin.api.managed.ShaderEffectManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -32,7 +32,7 @@ public class WakesClient implements ClientModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static WakesConfig CONFIG_INSTANCE;
public static final ManagedCoreShader TRANSLUCENT_NO_LIGHT_DIRECTION_PROGRAM = ShaderEffectManager.getInstance().manageCoreShader(
new Identifier(MOD_ID, "translucent_no_light_direction"), VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);
Identifier.of(MOD_ID, "translucent_no_light_direction"), VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);
public static boolean areShadersEnabled = false;

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/goby56/wakes/event/PickBoat.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public ItemStack pick(PlayerEntity player, HitResult result) {

private ItemStack getBoatFromType(BoatEntity.Type type) {
String waterCraft = type == BoatEntity.Type.BAMBOO ? "raft" : "boat";
return new ItemStack(Registries.ITEM.get(new Identifier(type.toString() + "_" + waterCraft)));
return new ItemStack(Registries.ITEM.get(Identifier.of(type.toString() + "_" + waterCraft)));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(FollowOwnerGoal.class)
@Mixin(TameableEntity.class)
public class TameableTeleportMixin {

@Inject(at = @At("TAIL"), method = "tryTeleportTo")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/goby56/wakes/particle/ModParticles.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public class ModParticles {
public static WithOwnerParticleType SPLASH_CLOUD;

public static void registerParticles() {
SPLASH_PLANE = Registry.register(Registries.PARTICLE_TYPE, new Identifier(WakesClient.MOD_ID, "splash_plane"), new WithOwnerParticleType(true));
SPLASH_PLANE = Registry.register(Registries.PARTICLE_TYPE, Identifier.of(WakesClient.MOD_ID, "splash_plane"), new WithOwnerParticleType(true));
ParticleFactoryRegistry.getInstance().register(SPLASH_PLANE, SplashPlaneParticle.Factory::new);

SPLASH_CLOUD = Registry.register(Registries.PARTICLE_TYPE, new Identifier(WakesClient.MOD_ID, "splash_cloud"), new WithOwnerParticleType(true));
SPLASH_CLOUD = Registry.register(Registries.PARTICLE_TYPE, Identifier.of(WakesClient.MOD_ID, "splash_cloud"), new WithOwnerParticleType(true));
ParticleFactoryRegistry.getInstance().register(SPLASH_CLOUD, SplashCloudParticle.Factory::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ public static <T extends Entity> void render(T entity, float yaw, float tickDelt
}

private static void renderSurface(Matrix4f matrix, Vector3f color, int light, boolean slightlyTransparent) {
BufferBuilder buffer = Tessellator.getInstance().getBuffer();
buffer.begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);
BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);
// TODO IMPROVE ANIMATION (WATER TRAVELS IN AN OUTWARDS DIRECTION)
// AND ADD A BOUNCY FEEL TO IT (BOBBING UP AND DOWN) WAIT IT IS JUST THE BOAT THAT IS DOING THAT
// MAYBE ADD TO BLAZINGLY FAST BOATS?
Expand All @@ -123,14 +122,13 @@ private static void renderSurface(Matrix4f matrix, Vector3f color, int light, bo
.texture((float) (vertex.x / tex.width + tex.uvOffset.x), (float) (vertex.y / tex.height + tex.uvOffset.y))
.overlay(OverlayTexture.DEFAULT_UV)
.light(light)
.normal((float) normal.x, (float) normal.y, (float) normal.z)
.next();
.normal((float) normal.x, (float) normal.y, (float) normal.z);
}
}

RenderSystem.disableCull();
RenderSystem.enableDepthTest();
Tessellator.getInstance().draw();
BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.enableCull();
}

Expand Down
17 changes: 6 additions & 11 deletions src/main/java/com/goby56/wakes/render/WakeTexture.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public void render(Matrix4f matrix, Camera camera, Brick brick) {
RenderSystem.setShader(RenderType.getProgram());
RenderSystem.enableDepthTest(); // Is it THIS simple? https://github.com/Goby56/wakes/issues/46

BufferBuilder buffer = Tessellator.getInstance().getBuffer();
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);
BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL);

Vector3f pos = brick.pos.add(camera.getPos().negate()).toVector3f().add(0, WakeNode.WATER_OFFSET, 0);
int light = LightmapTextureManager.MAX_LIGHT_COORDINATE;
Expand All @@ -57,30 +56,26 @@ public void render(Matrix4f matrix, Camera camera, Brick brick) {
.texture(0, 0)
.overlay(OverlayTexture.DEFAULT_UV)
.light(light)
.normal(0f, 1f, 0f)
.next();
.normal(0f, 1f, 0f);
buffer.vertex(matrix, pos.x, pos.y, pos.z + brick.dim)
.color(1f, 1f, 1f, 1f)
.texture(0, 1)
.overlay(OverlayTexture.DEFAULT_UV)
.light(light)
.normal(0f, 1f, 0f)
.next();
.normal(0f, 1f, 0f);
buffer.vertex(matrix, pos.x + brick.dim, pos.y, pos.z + brick.dim)
.color(1f, 1f, 1f, 1f)
.texture(1, 1)
.overlay(OverlayTexture.DEFAULT_UV)
.light(light)
.normal(0f, 1f, 0f)
.next();
.normal(0f, 1f, 0f);
buffer.vertex(matrix, pos.x + brick.dim, pos.y, pos.z)
.color(1f, 1f, 1f, 1f)
.texture(1, 0)
.overlay(OverlayTexture.DEFAULT_UV)
.light(light)
.normal(0f, 1f, 0f)
.next();
.normal(0f, 1f, 0f);

Tessellator.getInstance().draw();
BufferRenderer.drawWithGlobalProgram(buffer.end());
}
}
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
],
"depends": {
"fabricloader": ">=0.14.21",
"minecraft": "~1.20.5",
"minecraft": "~1.21",
"java": ">=21",
"fabric-api": "*"
},
"suggests": {
"blazingly-fast-boats": "*"
},
"recommends": {
"modmenu": ">=10.0.0",
"yet_another_config_lib_v3": ">=3.3.2"
"modmenu": ">=11.0.0",
"yet_another_config_lib_v3": ">=3.5.0"
}
}

0 comments on commit dec756b

Please sign in to comment.