forked from FabricMC/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove BeforeBake, AfterBake, BeforeBakeBlock, AfterBakeBlock - Remove DelegatingUnbakedModel - Add WrapperGroupableModel - Add documentation and extra constructor to WrapperUnbakedModel
- Loading branch information
1 parent
95b1481
commit 2424258
Showing
12 changed files
with
98 additions
and
557 deletions.
There are no files selected for viewing
50 changes: 0 additions & 50 deletions
50
...c/client/java/net/fabricmc/fabric/api/client/model/loading/v1/DelegatingUnbakedModel.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...rc/client/java/net/fabricmc/fabric/api/client/model/loading/v1/WrapperGroupableModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package net.fabricmc.fabric.api.client.model.loading.v1; | ||
|
||
import net.minecraft.block.BlockState; | ||
import net.minecraft.client.render.model.BakedModel; | ||
import net.minecraft.client.render.model.Baker; | ||
import net.minecraft.client.render.model.GroupableModel; | ||
|
||
/** | ||
* A simple implementation of {@link GroupableModel} that delegates all method calls to the {@link #wrapped} field. | ||
* Implementations must set the {@link #wrapped} field somehow. | ||
*/ | ||
public abstract class WrapperGroupableModel implements GroupableModel { | ||
protected GroupableModel wrapped; | ||
|
||
protected WrapperGroupableModel() { | ||
} | ||
|
||
protected WrapperGroupableModel(GroupableModel wrapped) { | ||
this.wrapped = wrapped; | ||
} | ||
|
||
@Override | ||
public void resolve(Resolver resolver) { | ||
wrapped.resolve(resolver); | ||
} | ||
|
||
@Override | ||
public BakedModel bake(Baker baker) { | ||
return wrapped.bake(baker); | ||
} | ||
|
||
@Override | ||
public Object getEqualityGroup(BlockState state) { | ||
return wrapped.getEqualityGroup(state); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
...api-v1/src/client/java/net/fabricmc/fabric/impl/client/model/loading/ModelBakerHooks.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.