Skip to content

Commit

Permalink
Fixrdf fuel rsdgustyr
Browse files Browse the repository at this point in the history
  • Loading branch information
LudoCrypt committed Dec 17, 2023
1 parent 9d73961 commit cb8d030
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 50 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true

version=1.2.7
version=1.2.8
maven_group=net.ludocrypt
archives_base_name=the_corners
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quilt_loader = "0.21.0"
quilted_fabric_api = "7.4.0+0.90.0-1.20.1"
terraformersmc_modmenu = "7.2.2"
limlib = "11.0.0"
specialmodels = "1.3.3"
specialmodels = "1.4.9"

cloth = "11.1.106"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
import net.ludocrypt.corners.config.CornerConfig;
import net.ludocrypt.specialmodels.api.SpecialModelRenderer;
import net.ludocrypt.specialmodels.impl.render.MutableQuad;
import net.minecraft.block.BlockState;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.ShaderProgram;
import net.minecraft.client.render.chunk.ChunkRenderRegion;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Axis;
import net.minecraft.util.math.BlockPos;
Expand All @@ -32,16 +36,6 @@ public ChristmasRenderer(String id) {
@ClientOnly
private double gazeWaiting = 0;

@Override
@ClientOnly
public MutableQuad modifyQuad(MutableQuad quad) {
quad.getV1().setUv(new Vec2f(0.0F, 0.0F));
quad.getV2().setUv(new Vec2f(0.0F, 1.0F));
quad.getV3().setUv(new Vec2f(1.0F, 1.0F));
quad.getV4().setUv(new Vec2f(1.0F, 0.0F));
return quad;
}

@Override
@ClientOnly
public void setup(MatrixStack matrices, Matrix4f viewMatrix, Matrix4f positionMatrix, float tickDelta,
Expand Down Expand Up @@ -125,6 +119,17 @@ public void setup(MatrixStack matrices, Matrix4f viewMatrix, Matrix4f positionMa

}

@Override
@ClientOnly
public MutableQuad modifyQuad(ChunkRenderRegion chunkRenderRegion, BlockPos pos, BlockState state, BakedModel model,
BakedQuad quadIn, long modelSeed, MutableQuad quad) {
quad.getV1().setUv(new Vec2f(0.0F, 0.0F));
quad.getV2().setUv(new Vec2f(0.0F, 1.0F));
quad.getV3().setUv(new Vec2f(1.0F, 1.0F));
quad.getV4().setUv(new Vec2f(1.0F, 0.0F));
return quad;
}

public static float[] hexToRGBA(String hex) {
float[] rgba = new float[4];
hex = hex.replace("#", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import net.ludocrypt.corners.init.CornerBlocks;
import net.ludocrypt.corners.mixin.GameRendererAccessor;
import net.ludocrypt.specialmodels.api.SpecialModelRenderer;
import net.ludocrypt.specialmodels.impl.render.MutableQuad;
import net.ludocrypt.specialmodels.impl.render.Vec4b;
import net.minecraft.block.BlockState;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.ShaderProgram;
import net.minecraft.client.render.chunk.ChunkRenderRegion;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.screen.PlayerScreenHandler;
import net.minecraft.state.property.Properties;
Expand Down Expand Up @@ -66,13 +66,8 @@ public void setup(MatrixStack matrices, Matrix4f viewMatrix, Matrix4f positionMa

@Override
@ClientOnly
public MutableQuad modifyQuad(MutableQuad quad) {
return quad;
}

@Override
@ClientOnly
public Vec4b appendState(ChunkRenderRegion chunkRenderRegion, BlockPos pos, BlockState state, long modelSeed) {
public Vec4b appendState(ChunkRenderRegion chunkRenderRegion, BlockPos pos, BlockState state, BakedModel model,
long modelSeed) {

if (state.isOf(CornerBlocks.DEEP_BOOKSHELF)) {
byte b1 = 0;
Expand Down Expand Up @@ -107,7 +102,7 @@ public Vec4b appendState(ChunkRenderRegion chunkRenderRegion, BlockPos pos, Bloc
return new Vec4b(b1, b2, b3, b4);
}

return super.appendState(chunkRenderRegion, pos, state, modelSeed);
return super.appendState(chunkRenderRegion, pos, state, model, modelSeed);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
import net.ludocrypt.corners.mixin.GameRendererAccessor;
import net.ludocrypt.specialmodels.api.SpecialModelRenderer;
import net.ludocrypt.specialmodels.impl.render.MutableQuad;
import net.minecraft.block.BlockState;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.ShaderProgram;
import net.minecraft.client.render.chunk.ChunkRenderRegion;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Axis;
import net.minecraft.util.math.BlockPos;
Expand Down Expand Up @@ -59,7 +63,8 @@ public void setup(MatrixStack matrices, Matrix4f viewMatrix, Matrix4f positionMa

@Override
@ClientOnly
public MutableQuad modifyQuad(MutableQuad quad) {
public MutableQuad modifyQuad(ChunkRenderRegion chunkRenderRegion, BlockPos pos, BlockState state, BakedModel model,
BakedQuad quadIn, long modelSeed, MutableQuad quad) {
quad.getV1().setUv(new Vec2f(0.0F, 0.0F));
quad.getV2().setUv(new Vec2f(0.0F, 1.0F));
quad.getV3().setUv(new Vec2f(1.0F, 1.0F));
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/net/ludocrypt/corners/init/CornerBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.quiltmc.qsl.block.content.registry.api.BlockContentRegistries;
import org.quiltmc.qsl.block.content.registry.api.FlammableBlockEntry;
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
import org.quiltmc.qsl.item.content.registry.impl.ItemContentRegistriesInitializer;
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;

import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries;
Expand Down Expand Up @@ -165,16 +164,6 @@ public static void init() {
BlockContentRegistries.FLAMMABLE.put(GAIA_FENCE_GATE, new FlammableBlockEntry(5, 20));
BlockContentRegistries.FLAMMABLE.put(GAIA_LEAVES, new FlammableBlockEntry(30, 60));

ItemContentRegistriesInitializer.FUEL_MAP.put(NYLON_FIBER_BLOCK.asItem(), 100);
ItemContentRegistriesInitializer.FUEL_MAP.put(NYLON_FIBER_STAIRS.asItem(), 100);
ItemContentRegistriesInitializer.FUEL_MAP.put(NYLON_FIBER_SLAB.asItem(), 100);
ItemContentRegistriesInitializer.FUEL_MAP.put(DRYWALL.asItem(), 300);
ItemContentRegistriesInitializer.FUEL_MAP.put(WOODEN_RADIO.asItem(), 300);
ItemContentRegistriesInitializer.FUEL_MAP.put(TUNED_RADIO.asItem(), 300);
ItemContentRegistriesInitializer.FUEL_MAP.put(BROKEN_RADIO.asItem(), 300);
ItemContentRegistriesInitializer.FUEL_MAP.put(GROWN_RADIO.asItem(), 300);
ItemContentRegistriesInitializer.FUEL_MAP.put(DEEP_BOOKSHELF.asItem(), 300);

ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(new ModifyEntries() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"replace": false,
"values": {
"corners:gaia_fence": 300,
"corners:gaia_fence_gate": 300
"corners:gaia_fence_gate": 300,
"corners:nylon_fiber_block": 100,
"corners:nylon_fiber_stairs": 100,
"corners:nylon_fiber_slab": 100,
"corners:drywall": 300,
"corners:grown_radio": 300,
"corners:broken_radio": 300,
"corners:wooden_radio": 300,
"corners:tuned_radio": 300,
"corners:deep_bookshelf": 300
}
}
20 changes: 4 additions & 16 deletions src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,12 @@
"limlib:registrar": "net.ludocrypt.corners.init.CornerWorlds"
},
"depends": [
{
"id": "quilt_loader",
"versions": ">=0.17.0-"
},
{
"id": "quilted_fabric_api",
"versions": ">=4.0.0-"
},
{
"id": "minecraft",
"versions": ">=1.19.2"
},
"quilt_loader",
"quilted_fabric_api",
"minecraft",
"limlib",
"cloth-config",
{
"id": "specialmodels",
"environment": "client"
}
"specialmodels"
]
},
"mixin": "corners.mixins.json",
Expand Down

0 comments on commit cb8d030

Please sign in to comment.