mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 22:43:56 +01:00
merge: post merge fixes & porting
This commit is contained in:
parent
5e642245b7
commit
44c2f78458
@ -42,7 +42,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
* 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)
|
||||
|
@ -32,7 +32,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
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)
|
||||
|
@ -6,6 +6,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
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
|
||||
@ -15,7 +16,7 @@ public final class PartialModelEventHandler {
|
||||
|
||||
public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
|
||||
for (ResourceLocation modelLocation : PartialModel.ALL.keySet()) {
|
||||
event.register(modelLocation);
|
||||
event.register(ModelResourceLocation.standalone(modelLocation));
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +25,7 @@ public final class PartialModelEventHandler {
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import net.neoforged.neoforge.common.NeoForge;
|
||||
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
|
||||
|
@ -19,6 +19,7 @@ import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
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;
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user