Skip to content

Commit

Permalink
merge: post merge fixes & porting
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Jul 28, 2024
1 parent 5e64224 commit 44c2f78
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* The shadow will be cast on blocks at most {@code min(radius, 2 * strength)} blocks below the entity.</p>
*/
public final class ShadowComponent implements EntityComponent {
private static final ResourceLocation SHADOW_TEXTURE = new ResourceLocation("textures/misc/shadow.png");
private static final ResourceLocation SHADOW_TEXTURE = ResourceLocation.withDefaultNamespace("textures/misc/shadow.png");
private static final Material SHADOW_MATERIAL = SimpleMaterial.builder()
.texture(SHADOW_TEXTURE)
.mipmap(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import net.minecraft.world.phys.Vec3;

public class MinecartVisual<T extends AbstractMinecart> extends ComponentEntityVisual<T> implements SimpleTickableVisual, SimpleDynamicVisual {
private static final ResourceLocation TEXTURE = new ResourceLocation("textures/entity/minecart.png");
private static final ResourceLocation TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/minecart.png");
private static final Material MATERIAL = SimpleMaterial.builder()
.texture(TEXTURE)
.mipmap(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.resources.ResourceLocation;
import net.neoforged.neoforge.client.event.ModelEvent;

@ApiStatus.Internal
Expand All @@ -15,7 +16,7 @@ private PartialModelEventHandler() {

public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
for (ResourceLocation modelLocation : PartialModel.ALL.keySet()) {
event.register(modelLocation);
event.register(ModelResourceLocation.standalone(modelLocation));
}
}

Expand All @@ -24,7 +25,7 @@ public static void onBakingCompleted(ModelEvent.BakingCompleted event) {
Map<ModelResourceLocation, BakedModel> models = event.getModels();

for (PartialModel partial : PartialModel.ALL.values()) {
partial.bakedModel = models.get(partial.modelLocation());
partial.bakedModel = models.get(ModelResourceLocation.standalone(partial.modelLocation()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class FlwImplXplatImpl implements FlwImplXplat {
@Override
public void dispatchReloadLevelRendererEvent(ClientLevel level) {
MinecraftForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
NeoForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import net.minecraft.client.renderer.block.ModelBlockRenderer;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.client.resources.model.ModelManager;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.BlockAndTintGetter;
Expand All @@ -30,7 +31,7 @@ public class FlwLibXplatImpl implements FlwLibXplat {
@Override
@UnknownNullability
public BakedModel getBakedModel(ModelManager modelManager, ResourceLocation location) {
return modelManager.getModel(location);
return modelManager.getModel(ModelResourceLocation.standalone(location));
}

@Override
Expand Down

0 comments on commit 44c2f78

Please sign in to comment.