mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
Javadoc and typo fixes (#2782)
This commit is contained in:
parent
e022e5d10c
commit
f1e4495b13
8 changed files with 30 additions and 29 deletions
|
@ -201,7 +201,7 @@ public interface BiomeModificationContext {
|
|||
|
||||
/**
|
||||
* @see BiomeEffects#getLoopSound()
|
||||
* @see BiomeEffects.Builder#loopSound(SoundEvent)
|
||||
* @see BiomeEffects.Builder#loopSound(RegistryEntry)
|
||||
*/
|
||||
default void clearAmbientSound() {
|
||||
setAmbientSound(Optional.empty());
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.fabricmc.fabric.api.event.EventFactory;
|
|||
/**
|
||||
* This event is emitted at the beginning of the block picking process in
|
||||
* order to find any applicable ItemStack. The first non-empty ItemStack
|
||||
* will be returned, overriding vanilla behaviour.
|
||||
* will be returned, overriding vanilla behavior.
|
||||
*/
|
||||
public interface ClientPickBlockGatherCallback {
|
||||
Event<ClientPickBlockGatherCallback> EVENT = EventFactory.createArrayBacked(ClientPickBlockGatherCallback.class,
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
* JVM arguments. The server works like the usual dedicated server, except that all
|
||||
* experimental features are turned on by default.
|
||||
*
|
||||
* <p>To export the test result, set {@systemProperty fabric-api.gametest.report-file}
|
||||
* <p>To export the test result, set {@code fabric-api.gametest.report-file}
|
||||
* property to the output file path.
|
||||
*
|
||||
* <p>Example of a Gradle run config to launch GameTest:
|
||||
|
|
|
@ -144,6 +144,7 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
/**
|
||||
* @deprecated Please use {@link FabricBlockSettings#luminance(ToIntFunction)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public FabricBlockSettings lightLevel(ToIntFunction<BlockState> levelFunction) {
|
||||
return this.luminance(levelFunction);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public interface ParticleFactoryRegistry {
|
|||
*
|
||||
* <p>The factory method will be called with a sprite provider to use for that particle when it comes time.
|
||||
*
|
||||
* <p>Particle sprites will be loaded from domain:/particles/particle_name.json as per vanilla minecraft behaviour.
|
||||
* <p>Particle sprites will be loaded from domain:/particles/particle_name.json as per vanilla minecraft behavior.
|
||||
*/
|
||||
<T extends ParticleEffect> void register(ParticleType<T> type, PendingParticleFactory<T> constructor);
|
||||
|
||||
|
@ -58,7 +58,7 @@ public interface ParticleFactoryRegistry {
|
|||
/**
|
||||
* Called to create a new particle factory.
|
||||
*
|
||||
* <p>Particle sprites will be loaded from domain:/particles/particle_name.json as per vanilla minecraft behaviour.
|
||||
* <p>Particle sprites will be loaded from domain:/particles/particle_name.json as per vanilla minecraft behavior.
|
||||
*
|
||||
* @param provider The sprite provider used to supply sprite textures when drawing the mod's particle.
|
||||
*
|
||||
|
|
|
@ -65,7 +65,7 @@ public class FluidRendererMixin {
|
|||
@Inject(at = @At("HEAD"), method = "render", cancellable = true)
|
||||
public void tesselate(BlockRenderView view, BlockPos pos, VertexConsumer vertexConsumer, BlockState blockState, FluidState fluidState, CallbackInfo info) {
|
||||
if (!fabric_customRendering.get()) {
|
||||
// Prevent recursively looking up custom fluid renderers when default behaviour is being invoked
|
||||
// Prevent recursively looking up custom fluid renderers when default behavior is being invoked
|
||||
try {
|
||||
fabric_customRendering.set(true);
|
||||
tessellateViaHandler(view, pos, vertexConsumer, blockState, fluidState, info);
|
||||
|
|
|
@ -148,7 +148,7 @@ abstract class ScreenMixin implements ScreenExtensions {
|
|||
}
|
||||
|
||||
@Unique
|
||||
private <T> Event<T> ensureEventsAreInitialised(Event<T> event) {
|
||||
private <T> Event<T> ensureEventsAreInitialized(Event<T> event) {
|
||||
if (event == null) {
|
||||
throw new IllegalStateException(String.format("[fabric-screen-api-v1] The current screen (%s) has not been correctly initialised, please send this crash log to the mod author. This is usually caused by calling setScreen on the wrong thread.", this.getClass().getName()));
|
||||
}
|
||||
|
@ -158,105 +158,105 @@ abstract class ScreenMixin implements ScreenExtensions {
|
|||
|
||||
@Override
|
||||
public Event<ScreenEvents.Remove> fabric_getRemoveEvent() {
|
||||
return ensureEventsAreInitialised(this.removeEvent);
|
||||
return ensureEventsAreInitialized(this.removeEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenEvents.BeforeTick> fabric_getBeforeTickEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeTickEvent);
|
||||
return ensureEventsAreInitialized(this.beforeTickEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenEvents.AfterTick> fabric_getAfterTickEvent() {
|
||||
return ensureEventsAreInitialised(this.afterTickEvent);
|
||||
return ensureEventsAreInitialized(this.afterTickEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenEvents.BeforeRender> fabric_getBeforeRenderEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeRenderEvent);
|
||||
return ensureEventsAreInitialized(this.beforeRenderEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenEvents.AfterRender> fabric_getAfterRenderEvent() {
|
||||
return ensureEventsAreInitialised(this.afterRenderEvent);
|
||||
return ensureEventsAreInitialized(this.afterRenderEvent);
|
||||
}
|
||||
|
||||
// Keyboard
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.AllowKeyPress> fabric_getAllowKeyPressEvent() {
|
||||
return ensureEventsAreInitialised(this.allowKeyPressEvent);
|
||||
return ensureEventsAreInitialized(this.allowKeyPressEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.BeforeKeyPress> fabric_getBeforeKeyPressEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeKeyPressEvent);
|
||||
return ensureEventsAreInitialized(this.beforeKeyPressEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.AfterKeyPress> fabric_getAfterKeyPressEvent() {
|
||||
return ensureEventsAreInitialised(this.afterKeyPressEvent);
|
||||
return ensureEventsAreInitialized(this.afterKeyPressEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.AllowKeyRelease> fabric_getAllowKeyReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.allowKeyReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.allowKeyReleaseEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.BeforeKeyRelease> fabric_getBeforeKeyReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeKeyReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.beforeKeyReleaseEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenKeyboardEvents.AfterKeyRelease> fabric_getAfterKeyReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.afterKeyReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.afterKeyReleaseEvent);
|
||||
}
|
||||
|
||||
// Mouse
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AllowMouseClick> fabric_getAllowMouseClickEvent() {
|
||||
return ensureEventsAreInitialised(this.allowMouseClickEvent);
|
||||
return ensureEventsAreInitialized(this.allowMouseClickEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.BeforeMouseClick> fabric_getBeforeMouseClickEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeMouseClickEvent);
|
||||
return ensureEventsAreInitialized(this.beforeMouseClickEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AfterMouseClick> fabric_getAfterMouseClickEvent() {
|
||||
return ensureEventsAreInitialised(this.afterMouseClickEvent);
|
||||
return ensureEventsAreInitialized(this.afterMouseClickEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AllowMouseRelease> fabric_getAllowMouseReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.allowMouseReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.allowMouseReleaseEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.BeforeMouseRelease> fabric_getBeforeMouseReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeMouseReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.beforeMouseReleaseEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AfterMouseRelease> fabric_getAfterMouseReleaseEvent() {
|
||||
return ensureEventsAreInitialised(this.afterMouseReleaseEvent);
|
||||
return ensureEventsAreInitialized(this.afterMouseReleaseEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AllowMouseScroll> fabric_getAllowMouseScrollEvent() {
|
||||
return ensureEventsAreInitialised(this.allowMouseScrollEvent);
|
||||
return ensureEventsAreInitialized(this.allowMouseScrollEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.BeforeMouseScroll> fabric_getBeforeMouseScrollEvent() {
|
||||
return ensureEventsAreInitialised(this.beforeMouseScrollEvent);
|
||||
return ensureEventsAreInitialized(this.beforeMouseScrollEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event<ScreenMouseEvents.AfterMouseScroll> fabric_getAfterMouseScrollEvent() {
|
||||
return ensureEventsAreInitialised(this.afterMouseScrollEvent);
|
||||
return ensureEventsAreInitialized(this.afterMouseScrollEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,10 +154,10 @@ class FluidItemTests {
|
|||
if (PotionUtil.getPotion(testInventory.getStack(0)) != Potions.WATER) throw new AssertionError("Expected water potion.");
|
||||
|
||||
// Try to empty from water potion
|
||||
Storage<FluidVariant> waterBottleStroage = new InventoryContainerItem(testInventory, 0).find(FluidStorage.ITEM);
|
||||
Storage<FluidVariant> waterBottleStorage = new InventoryContainerItem(testInventory, 0).find(FluidStorage.ITEM);
|
||||
|
||||
try (Transaction transaction = Transaction.openOuter()) {
|
||||
if (waterBottleStroage.extract(water, Long.MAX_VALUE, transaction) != BOTTLE) throw new AssertionError("Failed to extract.");
|
||||
if (waterBottleStorage.extract(water, Long.MAX_VALUE, transaction) != BOTTLE) throw new AssertionError("Failed to extract.");
|
||||
transaction.commit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue